1 # Copyright (c) 2018 AT&T
2 # Copyright (C) 2020 Wipro Limited.
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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
19 name: {{ include "common.fullname" . }}
20 namespace: {{ include "common.namespace" . }}
22 app: {{ include "common.name" . }}
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
24 release: {{ include "common.release" . }}
25 heritage: {{ .Release.Service }}
29 app: {{ include "common.name" . }}
30 replicas: {{ .Values.replicaCount }}
34 app: {{ include "common.name" . }}
35 release: {{ include "common.release" . }}
42 - {{ .Values.config.db.container }}
48 fieldPath: metadata.namespace
49 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
50 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
51 name: {{ include "common.name" . }}-readiness
52 - name: {{ include "common.name" . }}-db-config-readiness
57 - "{{ include "common.release" . }}-cmso-db-config-config-job"
63 fieldPath: metadata.namespace
64 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
65 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
66 - name: {{ include "common.name" . }}-chown
67 command: ["/bin/sh", "-c", "chown -Rf 1000:1000 /share/"]
68 image: "{{ .Values.global.busyBoxRepository }}/{{ .Values.global.busyBoxImage }}"
69 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
71 - name: {{ include "common.fullname" . }}-logs
72 mountPath: /share/logs
74 image: "{{ include "common.repository" . }}/{{ .Values.dbinit.image }}"
75 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
78 value: {{ .Values.config.db.host }}.{{.Release.Namespace}}
80 value: {{ .Values.config.db.port | quote}}
82 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-user-secret" "key" "login") | indent 10}}
84 value: {{ .Values.config.db.mysqlDatabase }}
86 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-user-secret" "key" "password") | indent 10}}
87 terminationMessagePolicy: File
89 - name: {{ include "common.fullname" . }}-config
90 mountPath: /share/etc/config
91 - name: {{ include "common.fullname" . }}-logs
92 mountPath: /share/logs
93 {{ include "common.certInitializer.initContainer" . | indent 6 }}
97 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
98 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
100 - mountPath: /usr/share/filebeat/filebeat.yml
101 subPath: filebeat.yml
103 - mountPath: /var/log/onap
104 name: {{ include "common.fullname" . }}-logs
105 - mountPath: /usr/share/filebeat/data
106 name: {{ include "common.fullname" . }}-filebeat
108 {{ include "common.resources" . }}
109 - name: mso-simulator
110 image: "{{ include "common.repository" . }}/{{ .Values.robotimage }}"
111 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
113 - name: {{ include "common.fullname" . }}-config
114 mountPath: /share/etc/config
116 - containerPort: 5000
118 {{ include "common.resources" . }}
119 - name: {{ include "common.name" . }}
120 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
121 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
124 value: {{ .Values.config.db.host }}.{{.Release.Namespace}}
126 value: {{ .Values.config.db.port | quote}}
128 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-user-secret" "key" "login") | indent 10}}
130 value: {{ .Values.config.db.mysqlDatabase }}
132 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-user-secret" "key" "password") | indent 10}}
133 - name: JAVA_TRUSTSTORE
134 value: /share/etc/osaaf/local/{{ .Values.global.truststoreFile }}
136 value: /share/etc/osaaf/local/{{ .Values.global.keystoreFile }}
137 - name: JAVA_TRUSTSTORE_PASSWORD
138 value: {{ .Values.global.truststorePassword }}
139 - name: AUTHENTICATION
140 value: {{ .Values.global.authentication }}
146 export SSL_KEYSTORE_PASSWORD=$(cat /share/etc/osaaf/local/.pass)
149 - containerPort: {{ .Values.service.internalPort }}
150 # disable liveness probe when breakpoints set in debugger
151 # so K8s doesn't restart unresponsive container
152 {{- if eq .Values.liveness.enabled true }}
155 port: {{ .Values.service.internalPort }}
156 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
157 periodSeconds: {{ .Values.liveness.periodSeconds }}
161 port: {{ .Values.service.internalPort }}
162 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
163 periodSeconds: {{ .Values.readiness.periodSeconds }}
165 {{ include "common.certInitializer.volumeMount" . | indent 8 }}
166 - name: {{ include "common.fullname" . }}-logs
167 mountPath: /share/logs
168 - name: {{ include "common.fullname" . }}-logs
169 mountPath: /share/debug-logs
170 - name: {{ include "common.fullname" . }}-config
171 mountPath: /share/etc/config
172 - name: {{ include "common.fullname" . }}-certs
173 mountPath: /share/etc/certs
174 - name: {{ include "common.fullname" . }}-certs
175 mountPath: /opt/app/cmso/src/main/resources/aaf
177 {{ include "common.resources" . | indent 12 }}
178 {{- if .Values.nodeSelector }}
180 {{ toYaml .Values.nodeSelector | indent 10 }}
182 {{- if .Values.affinity }}
184 {{ toYaml .Values.affinity | indent 10 }}
187 {{ include "common.certInitializer.volumes" . | nindent 8 }}
188 - name: {{ include "common.fullname" . }}-config
190 name: {{ include "common.fullname" . }}
194 - key: cmso.properties
195 path: cmso.properties
196 - key: cadi.properties
197 path: cadi.properties
198 - key: optimizer.properties
199 path: optimizer.properties
200 - key: ticketmgt.properties
201 path: ticketmgt.properties
202 - key: liquibase.properties
203 path: liquibase.properties
204 - name: {{ include "common.fullname" . }}-logs
206 - name: {{ include "common.fullname" . }}-filebeat
208 - name: filebeat-conf
210 name: {{ include "common.release" . }}-cmso-filebeat-configmap
211 - name: {{ include "common.fullname" . }}-certs
213 secretName: {{ include "common.release" . }}-{{ .Values.global.commonConfigPrefix }}-certs
215 - name: "{{ include "common.namespace" . }}-docker-registry-key"