2 # Copyright (c) 2018 AT&T
3 # Copyright (C) 2020 Wipro Limited.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
21 name: {{ include "common.fullname" . }}
22 namespace: {{ include "common.namespace" . }}
24 app: {{ include "common.name" . }}
25 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
26 release: {{ include "common.release" . }}
27 heritage: {{ .Release.Service }}
31 app: {{ include "common.name" . }}
32 replicas: {{ .Values.replicaCount }}
36 app: {{ include "common.name" . }}
37 release: {{ include "common.release" . }}
44 - {{ .Values.config.db.container }}
50 fieldPath: metadata.namespace
51 image: {{ include "repositoryGenerator.image.readiness" . }}
52 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
53 name: {{ include "common.name" . }}-readiness
54 - name: {{ include "common.name" . }}-db-config-readiness
59 - "{{ include "common.release" . }}-cmso-db-config-config-job"
65 fieldPath: metadata.namespace
66 image: {{ include "repositoryGenerator.image.readiness" . }}
67 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
68 - name: {{ include "common.name" . }}-chown
69 command: ["/bin/sh", "-c", "chown -Rf 1000:1000 /share/"]
70 image: {{ include "repositoryGenerator.image.busybox" . }}
71 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
73 - name: {{ include "common.fullname" . }}-logs
74 mountPath: /share/logs
76 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.dbinit.image }}
77 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
80 value: {{ .Values.config.db.host }}.{{.Release.Namespace}}
82 value: {{ .Values.config.db.port | quote}}
84 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-user-secret" "key" "login") | indent 10}}
86 value: {{ .Values.config.db.mysqlDatabase }}
88 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-user-secret" "key" "password") | indent 10}}
89 terminationMessagePolicy: File
91 - name: {{ include "common.fullname" . }}-config
92 mountPath: /share/etc/config
93 - name: {{ include "common.fullname" . }}-logs
94 mountPath: /share/logs
95 {{ include "common.certInitializer.initContainer" . | indent 6 }}
99 image: {{ include "repositoryGenerator.image.logging" . }}
100 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
102 - mountPath: /usr/share/filebeat/filebeat.yml
103 subPath: filebeat.yml
105 - mountPath: /var/log/onap
106 name: {{ include "common.fullname" . }}-logs
107 - mountPath: /usr/share/filebeat/data
108 name: {{ include "common.fullname" . }}-filebeat
110 {{ include "common.resources" . }}
111 - name: mso-simulator
112 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.robotimage }}
113 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
115 - name: {{ include "common.fullname" . }}-config
116 mountPath: /share/etc/config
118 - containerPort: 5000
120 {{ include "common.resources" . }}
121 - name: {{ include "common.name" . }}
122 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
123 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
126 value: {{ .Values.config.db.host }}.{{.Release.Namespace}}
128 value: {{ .Values.config.db.port | quote}}
130 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-user-secret" "key" "login") | indent 10}}
132 value: {{ .Values.config.db.mysqlDatabase }}
134 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-user-secret" "key" "password") | indent 10}}
135 - name: JAVA_TRUSTSTORE
136 value: /share/etc/osaaf/local/{{ .Values.global.truststoreFile }}
138 value: /share/etc/osaaf/local/{{ .Values.global.keystoreFile }}
139 - name: JAVA_TRUSTSTORE_PASSWORD
140 value: {{ .Values.global.truststorePassword }}
141 - name: AUTHENTICATION
142 value: {{ .Values.global.authentication }}
144 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-aaf-creds" "key" "login") | indent 10}}
146 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-aaf-creds" "key" "password") | indent 10}}
148 value: "-Dcom.att.eelf.logging.file=logback.xml -Dcom.att.eelf.logging.path=/share/etc/config"
154 export SSL_KEYSTORE_PASSWORD=$(cat /share/etc/osaaf/local/.pass)
157 - containerPort: {{ .Values.service.internalPort }}
158 # disable liveness probe when breakpoints set in debugger
159 # so K8s doesn't restart unresponsive container
160 {{- if eq .Values.liveness.enabled true }}
163 port: {{ .Values.service.internalPort }}
164 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
165 periodSeconds: {{ .Values.liveness.periodSeconds }}
169 port: {{ .Values.service.internalPort }}
170 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
171 periodSeconds: {{ .Values.readiness.periodSeconds }}
173 {{ include "common.certInitializer.volumeMount" . | indent 8 }}
174 - name: {{ include "common.fullname" . }}-logs
175 mountPath: /share/logs
176 - name: {{ include "common.fullname" . }}-logs
177 mountPath: /share/debug-logs
178 - name: {{ include "common.fullname" . }}-config
179 mountPath: /share/etc/config
180 - name: {{ include "common.fullname" . }}-certs
181 mountPath: /share/etc/certs
182 - name: {{ include "common.fullname" . }}-certs
183 mountPath: /opt/app/cmso/src/main/resources/aaf
185 {{ include "common.resources" . | indent 12 }}
186 {{- if .Values.nodeSelector }}
188 {{ toYaml .Values.nodeSelector | indent 10 }}
190 {{- if .Values.affinity }}
192 {{ toYaml .Values.affinity | indent 10 }}
195 {{ include "common.certInitializer.volumes" . | nindent 8 }}
196 - name: {{ include "common.fullname" . }}-config
198 name: {{ include "common.fullname" . }}
202 - key: cmso.properties
203 path: cmso.properties
204 - key: cadi.properties
205 path: cadi.properties
206 - key: optimizer.properties
207 path: optimizer.properties
208 - key: ticketmgt.properties
209 path: ticketmgt.properties
210 - key: liquibase.properties
211 path: liquibase.properties
212 - name: {{ include "common.fullname" . }}-logs
214 - name: {{ include "common.fullname" . }}-filebeat
216 - name: filebeat-conf
218 name: {{ include "common.release" . }}-cmso-filebeat-configmap
219 - name: {{ include "common.fullname" . }}-certs
221 secretName: {{ include "common.release" . }}-{{ .Values.global.commonConfigPrefix }}-certs
223 - name: "{{ include "common.namespace" . }}-docker-registry-key"