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.
15 apiVersion: extensions/v1beta1
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 }}
26 replicas: {{ .Values.replicaCount }}
30 app: {{ include "common.name" . }}
31 release: {{ include "common.release" . }}
38 - {{ .Values.config.db.container }}
44 fieldPath: metadata.namespace
45 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
46 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
47 name: {{ include "common.name" . }}-readiness
48 - name: {{ include "common.name" . }}-chown
49 command: ["/bin/sh", "-c", "chown -Rf 1000:1000 /share/"]
50 image: "{{ .Values.global.busyBoxRepository }}/{{ .Values.global.busyBoxImage }}"
51 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
53 - name: {{ include "common.fullname" . }}-logs
54 mountPath: /share/logs
56 image: "{{ include "common.repository" . }}/{{ .Values.dbinit.image }}"
57 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
60 value: {{ .Values.config.db.host }}.{{.Release.Namespace}}
62 value: {{ .Values.config.db.port | quote}}
64 value: {{ .Values.config.db.root }}
66 value: {{ .Values.config.db.mysqlDatabase }}
68 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-root-password" "key" "password") | indent 10}}
69 terminationMessagePolicy: File
71 - name: {{ include "common.fullname" . }}-config
72 mountPath: /share/etc/config
73 - name: {{ include "common.fullname" . }}-logs
74 mountPath: /share/logs
76 - name: {{ include "common.name" . }}
77 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
78 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
81 value: {{ .Values.config.db.host }}.{{.Release.Namespace}}
83 value: {{ .Values.config.db.port | quote}}
85 value: {{ .Values.config.db.root }}
87 value: {{ .Values.config.db.mysqlDatabase }}
89 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-root-password" "key" "password") | indent 10}}
90 - name: JAVA_TRUSTSTORE
91 value: /share/etc/certs/{{ .Values.global.truststoreFile }}
93 value: /share/etc/certs/{{ .Values.global.keystoreFile }}
94 - name: JAVA_TRUSTSTORE_PASSWORD
95 value: {{ .Values.global.truststorePassword }}
96 - name: SSL_KEYSTORE_PASSWORD
97 value: {{ .Values.global.keystorePassword }}
98 - name: AUTHENTICATION
99 value: {{ .Values.global.authentication }}
101 - containerPort: {{ .Values.service.internalPort }}
102 # disable liveness probe when breakpoints set in debugger
103 # so K8s doesn't restart unresponsive container
104 {{- if eq .Values.liveness.enabled true }}
107 port: {{ .Values.service.internalPort }}
108 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
109 periodSeconds: {{ .Values.liveness.periodSeconds }}
113 port: {{ .Values.service.internalPort }}
114 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
115 periodSeconds: {{ .Values.readiness.periodSeconds }}
117 - name: {{ include "common.fullname" . }}-logs
118 mountPath: /share/logs
119 - name: {{ include "common.fullname" . }}-logs
120 mountPath: /share/debug-logs
121 - name: {{ include "common.fullname" . }}-config
122 mountPath: /share/etc/config
123 - name: {{ include "common.fullname" . }}-certs
124 mountPath: /share/etc/certs
125 - name: {{ include "common.fullname" . }}-certs
126 mountPath: /opt/app/cmso/src/main/resources/aaf
128 {{ include "common.resources" . | indent 12 }}
129 {{- if .Values.nodeSelector }}
131 {{ toYaml .Values.nodeSelector | indent 10 }}
133 {{- if .Values.affinity }}
135 {{ toYaml .Values.affinity | indent 10 }}
138 - name: {{ include "common.fullname" . }}-config
140 name: {{ include "common.fullname" . }}
144 - key: cadi.properties
145 path: cadi.properties
146 - key: optimizer.properties
147 path: optimizer.properties
148 - key: liquibase.properties
149 path: liquibase.properties
150 - name: {{ include "common.fullname" . }}-logs
152 - name: {{ include "common.fullname" . }}-certs
154 secretName: {{ include "common.release" . }}-{{ .Values.global.commonConfigPrefix }}-certs
156 - name: "{{ include "common.namespace" . }}-docker-registry-key"