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
94 - name: {{ include "common.name" . }}
95 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
96 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
99 value: {{ .Values.config.db.host }}.{{.Release.Namespace}}
101 value: {{ .Values.config.db.port | quote}}
103 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-user-secret" "key" "login") | indent 10}}
105 value: {{ .Values.config.db.mysqlDatabase }}
107 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-user-secret" "key" "password") | indent 10}}
108 - name: JAVA_TRUSTSTORE
109 value: /share/etc/certs/{{ .Values.global.truststoreFile }}
111 value: /share/etc/certs/{{ .Values.global.keystoreFile }}
112 - name: JAVA_TRUSTSTORE_PASSWORD
113 value: {{ .Values.global.truststorePassword }}
114 - name: SSL_KEYSTORE_PASSWORD
115 value: {{ .Values.global.keystorePassword }}
116 - name: AUTHENTICATION
117 value: {{ .Values.global.authentication }}
119 - containerPort: {{ .Values.service.internalPort }}
120 # disable liveness probe when breakpoints set in debugger
121 # so K8s doesn't restart unresponsive container
122 {{- if eq .Values.liveness.enabled true }}
125 port: {{ .Values.service.internalPort }}
126 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
127 periodSeconds: {{ .Values.liveness.periodSeconds }}
131 port: {{ .Values.service.internalPort }}
132 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
133 periodSeconds: {{ .Values.readiness.periodSeconds }}
135 - name: {{ include "common.fullname" . }}-logs
136 mountPath: /share/logs
137 - name: {{ include "common.fullname" . }}-logs
138 mountPath: /share/debug-logs
139 - name: {{ include "common.fullname" . }}-config
140 mountPath: /share/etc/config
141 - name: {{ include "common.fullname" . }}-certs
142 mountPath: /share/etc/certs
143 - name: {{ include "common.fullname" . }}-certs
144 mountPath: /opt/app/cmso/src/main/resources/aaf
146 {{ include "common.resources" . | indent 12 }}
147 {{- if .Values.nodeSelector }}
149 {{ toYaml .Values.nodeSelector | indent 10 }}
151 {{- if .Values.affinity }}
153 {{ toYaml .Values.affinity | indent 10 }}
156 - name: {{ include "common.fullname" . }}-config
158 name: {{ include "common.fullname" . }}
162 - key: cadi.properties
163 path: cadi.properties
164 - key: optimizer.properties
165 path: optimizer.properties
166 - key: liquibase.properties
167 path: liquibase.properties
168 - name: {{ include "common.fullname" . }}-logs
170 - name: {{ include "common.fullname" . }}-certs
172 secretName: {{ include "common.release" . }}-{{ .Values.global.commonConfigPrefix }}-certs
174 - name: "{{ include "common.namespace" . }}-docker-registry-key"