1 # Copyright © 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 }}
95 - name: {{ include "common.name" . }}
96 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
97 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
100 value: {{ .Values.config.db.host }}.{{.Release.Namespace}}
102 value: {{ .Values.config.db.port | quote}}
104 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-user-secret" "key" "login") | indent 10}}
106 value: {{ .Values.config.db.mysqlDatabase }}
108 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-user-secret" "key" "password") | indent 10}}
109 - name: JAVA_TRUSTSTORE
110 value: /share/etc/osaaf/local/{{ .Values.global.truststoreFile }}
112 value: /share/etc/osaaf/local/{{ .Values.global.keystoreFile }}
113 - name: JAVA_TRUSTSTORE_PASSWORD
114 value: {{ .Values.global.truststorePassword }}
115 - name: AUTHENTICATION
116 value: {{ .Values.global.authentication }}
122 export SSL_KEYSTORE_PASSWORD=$(cat /share/etc/osaaf/local/.pass)
125 - containerPort: {{ .Values.service.internalPort }}
126 # disable liveness probe when breakpoints set in debugger
127 # so K8s doesn't restart unresponsive container
128 {{- if eq .Values.liveness.enabled true }}
131 port: {{ .Values.service.internalPort }}
132 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
133 periodSeconds: {{ .Values.liveness.periodSeconds }}
137 port: {{ .Values.service.internalPort }}
138 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
139 periodSeconds: {{ .Values.readiness.periodSeconds }}
141 {{ include "common.certInitializer.volumeMount" . | indent 8 }}
142 - name: {{ include "common.fullname" . }}-logs
143 mountPath: /share/logs
144 - name: {{ include "common.fullname" . }}-logs
145 mountPath: /share/debug-logs
146 - name: {{ include "common.fullname" . }}-config
147 mountPath: /share/etc/config
148 - name: {{ include "common.fullname" . }}-certs
149 mountPath: /share/etc/certs
150 - name: {{ include "common.fullname" . }}-certs
151 mountPath: /opt/app/cmso/src/main/resources/aaf
153 {{ include "common.resources" . | indent 12 }}
154 {{- if .Values.nodeSelector }}
156 {{ toYaml .Values.nodeSelector | indent 10 }}
158 {{- if .Values.affinity }}
160 {{ toYaml .Values.affinity | indent 10 }}
163 {{ include "common.certInitializer.volumes" . | nindent 8 }}
164 - name: {{ include "common.fullname" . }}-config
166 name: {{ include "common.fullname" . }}
170 - key: cadi.properties
171 path: cadi.properties
172 - key: optimizer.properties
173 path: optimizer.properties
174 - key: liquibase.properties
175 path: liquibase.properties
176 - name: {{ include "common.fullname" . }}-logs
178 - name: {{ include "common.fullname" . }}-certs
180 secretName: {{ include "common.release" . }}-{{ .Values.global.commonConfigPrefix }}-certs
182 - name: "{{ include "common.namespace" . }}-docker-registry-key"