blob: 96942ddae570c1d50ab17eab5b36c2c3f888e7cf [file] [log] [blame]
Sylvain Desbureaux37dc40c2020-11-21 22:46:57 +01001{{/*
2# Copyright (c) 2019 Intel Corporation.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15*/}}
16
17apiVersion: apps/v1
18kind: Deployment
Andreas Geissler718fb742023-03-09 09:44:02 +010019metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
Sylvain Desbureaux37dc40c2020-11-21 22:46:57 +010020spec:
Andreas Geissler718fb742023-03-09 09:44:02 +010021 selector: {{- include "common.selectors" . | nindent 4 }}
Sylvain Desbureaux37dc40c2020-11-21 22:46:57 +010022 replicas: {{ .Values.replicaCount }}
Sylvain Desbureaux37dc40c2020-11-21 22:46:57 +010023 template:
Andreas Geissler718fb742023-03-09 09:44:02 +010024 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
Sylvain Desbureaux37dc40c2020-11-21 22:46:57 +010025 spec:
26 containers:
27 - env:
28 - name: MSB_PROTO
Andreas Geissler718fb742023-03-09 09:44:02 +010029 value: "http"
Sylvain Desbureaux37dc40c2020-11-21 22:46:57 +010030 - name: MSB_ADDR
31 value: "{{ .Values.config.msbgateway }}.{{ include "common.namespace" . }}"
32 - name: MSB_PORT
Andreas Geissler718fb742023-03-09 09:44:02 +010033 value: "{{ .Values.config.msbPort }}"
Sylvain Desbureaux37dc40c2020-11-21 22:46:57 +010034 - name: AAI_ADDR
Andreas Geisslerdfa23c82022-05-13 16:54:43 +020035 value: "aai.{{ include "common.namespace" . }}"
Sylvain Desbureaux37dc40c2020-11-21 22:46:57 +010036 - name: AAI_PORT
Andreas Geissler718fb742023-03-09 09:44:02 +010037 value: "{{ .Values.config.aai.aaiPort }}"
Sylvain Desbureaux37dc40c2020-11-21 22:46:57 +010038 - name: AAI_SCHEMA_VERSION
39 value: "{{ .Values.config.aai.schemaVersion }}"
40 - name: AAI_USERNAME
41 value: "{{ .Values.config.aai.username }}"
42 - name: AAI_PASSWORD
43 value: "{{ .Values.config.aai.password }}"
44 - name: SSL_ENABLED
Andreas Geissler718fb742023-03-09 09:44:02 +010045 value: "false"
Sylvain Desbureaux37dc40c2020-11-21 22:46:57 +010046 name: {{ include "common.name" . }}
47 volumeMounts:
Maciej Wereski989c91c2021-11-17 16:45:14 +010048 - mountPath: "{{ .Values.log.path }}"
Sylvain Desbureaux37dc40c2020-11-21 22:46:57 +010049 name: starlingx-log
50 - mountPath: /opt/starlingx/starlingx/pub/config/log.yml
51 name: starlingx-logconfig
52 subPath: log.yml
53 - mountPath: /opt/artifacts/
54 name: artifact-data
Andreas Geissler718fb742023-03-09 09:44:02 +010055 resources: {{ include "common.resources" . | nindent 10 }}
Sylvain Desbureaux37dc40c2020-11-21 22:46:57 +010056 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
57 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Andreas Geissler718fb742023-03-09 09:44:02 +010058 ports: {{ include "common.containerPorts" . | nindent 10 }}
Sylvain Desbureaux37dc40c2020-11-21 22:46:57 +010059 # disable liveness probe when breakpoints set in debugger
60 # so K8s doesn't restart unresponsive container
61 {{ if .Values.liveness.enabled }}
62 livenessProbe:
63 httpGet:
64 path: /api/multicloud-starlingx/v0/swagger.json
65 port: {{ .Values.service.internalPort }}
Andreas Geissler718fb742023-03-09 09:44:02 +010066 scheme: HTTP
Sylvain Desbureaux37dc40c2020-11-21 22:46:57 +010067 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
68 periodSeconds: {{ .Values.liveness.periodSeconds }}
69 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
70 successThreshold: {{ .Values.liveness.successThreshold }}
71 failureThreshold: {{ .Values.liveness.failureThreshold }}
72 {{ end }}
73 # side car containers
Andreas Geissler718fb742023-03-09 09:44:02 +010074 {{ include "common.log.sidecar" . | nindent 6 }}
Bin Yangdf4fc032022-03-22 16:08:22 +080075 - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.memcached }}
76 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
77 name: memcached
Sylvain Desbureaux37dc40c2020-11-21 22:46:57 +010078 - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.artifactImage }}
79 name: framework-artifactbroker
80 command: ["/opt/app/distribution/bin/artifact-dist.sh"]
81 args: ["/opt/app/distribution/etc/mounted/config.json"]
82 ports:
83 - containerPort: 9014
84 protocol: TCP
85 volumeMounts:
86 - mountPath: /opt/app/distribution/etc/mounted/config.json
87 name: starlingx-logconfig
88 subPath: config.json
89 - mountPath: /data
90 name: artifact-data
farida azmy72513552021-10-12 18:55:21 +020091 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
Sylvain Desbureaux37dc40c2020-11-21 22:46:57 +010092 volumes:
93 - name: starlingx-log
94 emptyDir: {}
Andreas Geissler718fb742023-03-09 09:44:02 +010095 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 6 }}
Sylvain Desbureaux37dc40c2020-11-21 22:46:57 +010096 - name: starlingx-logconfig
97 configMap:
98 name: {{ include "common.fullname" . }}-log-configmap
99 - name: artifact-data
100 emptyDir: {}
Andreas Geisslerbd0d31a2024-03-20 09:51:32 +0100101 {{- include "common.imagePullSecrets" . | nindent 6 }}
Sylvain Desbureaux37dc40c2020-11-21 22:46:57 +0100102 restartPolicy: Always