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
96 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
97 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
99 - mountPath: /usr/share/filebeat/filebeat.yml
100 subPath: filebeat.yml
102 - mountPath: /var/log/onap
103 name: {{ include "common.fullname" . }}-logs
104 - mountPath: /usr/share/filebeat/data
105 name: {{ include "common.fullname" . }}-filebeat
107 {{ include "common.resources" . }}
108 - name: mso-simulator
109 image: "{{ include "common.repository" . }}/{{ .Values.robotimage }}"
110 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
112 - name: {{ include "common.fullname" . }}-config
113 mountPath: /share/etc/config
115 - containerPort: 5000
117 {{ include "common.resources" . }}
118 - name: {{ include "common.name" . }}
119 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
120 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
123 value: {{ .Values.config.db.host }}.{{.Release.Namespace}}
125 value: {{ .Values.config.db.port | quote}}
127 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-user-secret" "key" "login") | indent 10}}
129 value: {{ .Values.config.db.mysqlDatabase }}
131 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-user-secret" "key" "password") | indent 10}}
132 - name: JAVA_TRUSTSTORE
133 value: /share/etc/certs/{{ .Values.global.truststoreFile }}
135 value: /share/etc/certs/{{ .Values.global.keystoreFile }}
136 - name: JAVA_TRUSTSTORE_PASSWORD
137 value: {{ .Values.global.truststorePassword }}
138 - name: SSL_KEYSTORE_PASSWORD
139 value: {{ .Values.global.keystorePassword }}
140 - name: AUTHENTICATION
141 value: {{ .Values.global.authentication }}
143 - containerPort: {{ .Values.service.internalPort }}
144 # disable liveness probe when breakpoints set in debugger
145 # so K8s doesn't restart unresponsive container
146 {{- if eq .Values.liveness.enabled true }}
149 port: {{ .Values.service.internalPort }}
150 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
151 periodSeconds: {{ .Values.liveness.periodSeconds }}
155 port: {{ .Values.service.internalPort }}
156 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
157 periodSeconds: {{ .Values.readiness.periodSeconds }}
159 - name: {{ include "common.fullname" . }}-logs
160 mountPath: /share/logs
161 - name: {{ include "common.fullname" . }}-logs
162 mountPath: /share/debug-logs
163 - name: {{ include "common.fullname" . }}-config
164 mountPath: /share/etc/config
165 - name: {{ include "common.fullname" . }}-certs
166 mountPath: /share/etc/certs
167 - name: {{ include "common.fullname" . }}-certs
168 mountPath: /opt/app/cmso/src/main/resources/aaf
170 {{ include "common.resources" . | indent 12 }}
171 {{- if .Values.nodeSelector }}
173 {{ toYaml .Values.nodeSelector | indent 10 }}
175 {{- if .Values.affinity }}
177 {{ toYaml .Values.affinity | indent 10 }}
180 - name: {{ include "common.fullname" . }}-config
182 name: {{ include "common.fullname" . }}
186 - key: cmso.properties
187 path: cmso.properties
188 - key: cadi.properties
189 path: cadi.properties
190 - key: optimizer.properties
191 path: optimizer.properties
192 - key: ticketmgt.properties
193 path: ticketmgt.properties
194 - key: liquibase.properties
195 path: liquibase.properties
196 - name: {{ include "common.fullname" . }}-logs
198 - name: {{ include "common.fullname" . }}-filebeat
200 - name: filebeat-conf
202 name: {{ include "common.release" . }}-cmso-filebeat-configmap
203 - name: {{ include "common.fullname" . }}-certs
205 secretName: {{ include "common.release" . }}-{{ .Values.global.commonConfigPrefix }}-certs
207 - name: "{{ include "common.namespace" . }}-docker-registry-key"