1 # Copyright © 2018 AT&T
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
18 name: {{ include "common.fullname" . }}
19 namespace: {{ include "common.namespace" . }}
21 app: {{ include "common.name" . }}
22 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
23 release: {{ include "common.release" . }}
24 heritage: {{ .Release.Service }}
28 app: {{ include "common.name" . }}
29 replicas: {{ .Values.replicaCount }}
33 app: {{ include "common.name" . }}
34 release: {{ include "common.release" . }}
41 - {{ .Values.config.db.container }}
47 fieldPath: metadata.namespace
48 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
49 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
50 name: {{ include "common.name" . }}-readiness
51 - name: {{ include "common.name" . }}-chown
52 command: ["/bin/sh", "-c", "chown -Rf 1000:1000 /share/"]
53 image: "{{ .Values.global.busyBoxRepository }}/{{ .Values.global.busyBoxImage }}"
54 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
56 - name: {{ include "common.fullname" . }}-logs
57 mountPath: /share/logs
59 image: "{{ include "common.repository" . }}/{{ .Values.dbinit.image }}"
60 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
63 value: {{ .Values.config.db.host }}.{{.Release.Namespace}}
65 value: {{ .Values.config.db.port | quote}}
67 value: {{ .Values.config.db.root }}
69 value: {{ .Values.config.db.mysqlDatabase }}
71 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-root-password" "key" "password") | indent 10}}
72 terminationMessagePolicy: File
74 - name: {{ include "common.fullname" . }}-config
75 mountPath: /share/etc/config
76 - name: {{ include "common.fullname" . }}-logs
77 mountPath: /share/logs
79 - name: {{ include "common.name" . }}
80 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
81 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
84 value: {{ .Values.config.db.host }}.{{.Release.Namespace}}
86 value: {{ .Values.config.db.port | quote}}
88 value: {{ .Values.config.db.root }}
90 value: {{ .Values.config.db.mysqlDatabase }}
92 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-root-password" "key" "password") | indent 10}}
93 - name: JAVA_TRUSTSTORE
94 value: /share/etc/certs/{{ .Values.global.truststoreFile }}
96 value: /share/etc/certs/{{ .Values.global.keystoreFile }}
97 - name: JAVA_TRUSTSTORE_PASSWORD
98 value: {{ .Values.global.truststorePassword }}
99 - name: SSL_KEYSTORE_PASSWORD
100 value: {{ .Values.global.keystorePassword }}
101 - name: AUTHENTICATION
102 value: {{ .Values.global.authentication }}
104 - containerPort: {{ .Values.service.internalPort }}
105 # disable liveness probe when breakpoints set in debugger
106 # so K8s doesn't restart unresponsive container
107 {{- if eq .Values.liveness.enabled true }}
110 port: {{ .Values.service.internalPort }}
111 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
112 periodSeconds: {{ .Values.liveness.periodSeconds }}
116 port: {{ .Values.service.internalPort }}
117 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
118 periodSeconds: {{ .Values.readiness.periodSeconds }}
120 - name: {{ include "common.fullname" . }}-logs
121 mountPath: /share/logs
122 - name: {{ include "common.fullname" . }}-logs
123 mountPath: /share/debug-logs
124 - name: {{ include "common.fullname" . }}-config
125 mountPath: /share/etc/config
126 - name: {{ include "common.fullname" . }}-certs
127 mountPath: /share/etc/certs
128 - name: {{ include "common.fullname" . }}-certs
129 mountPath: /opt/app/cmso/src/main/resources/aaf
131 {{ include "common.resources" . | indent 12 }}
132 {{- if .Values.nodeSelector }}
134 {{ toYaml .Values.nodeSelector | indent 10 }}
136 {{- if .Values.affinity }}
138 {{ toYaml .Values.affinity | indent 10 }}
141 - name: {{ include "common.fullname" . }}-config
143 name: {{ include "common.fullname" . }}
147 - key: cadi.properties
148 path: cadi.properties
149 - key: optimizer.properties
150 path: optimizer.properties
151 - key: liquibase.properties
152 path: liquibase.properties
153 - name: {{ include "common.fullname" . }}-logs
155 - name: {{ include "common.fullname" . }}-certs
157 secretName: {{ include "common.release" . }}-{{ .Values.global.commonConfigPrefix }}-certs
159 - name: "{{ include "common.namespace" . }}-docker-registry-key"