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
49 image: "{{ include "common.repository" . }}/{{ .Values.dbinit.image }}"
50 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
53 value: {{ .Values.config.db.host }}.{{.Release.Namespace}}
55 value: {{ .Values.config.db.port | quote}}
57 value: {{ .Values.config.db.root }}
59 value: {{ .Values.config.db.mysqlDatabase }}
61 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-root-password" "key" "password") | indent 10}}
62 terminationMessagePolicy: File
64 - name: {{ include "common.fullname" . }}-config
65 mountPath: /share/etc/config
66 - name: {{ include "common.fullname" . }}-logs
67 mountPath: /share/logs
69 - name: {{ include "common.name" . }}
70 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
71 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
74 value: {{ .Values.config.db.host }}.{{.Release.Namespace}}
76 value: {{ .Values.config.db.port | quote}}
78 value: {{ .Values.config.db.root }}
80 value: {{ .Values.config.db.mysqlDatabase }}
82 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-root-password" "key" "password") | indent 10}}
83 - name: JAVA_TRUSTSTORE
84 value: /share/etc/certs/{{ .Values.global.truststoreFile }}
86 value: /share/etc/certs/{{ .Values.global.keystoreFile }}
87 - name: JAVA_TRUSTSTORE_PASSWORD
88 value: {{ .Values.global.truststorePassword }}
89 - name: SSL_KEYSTORE_PASSWORD
90 value: {{ .Values.global.keystorePassword }}
91 - name: AUTHENTICATION
92 value: {{ .Values.global.authentication }}
94 - containerPort: {{ .Values.service.internalPort }}
95 # disable liveness probe when breakpoints set in debugger
96 # so K8s doesn't restart unresponsive container
97 {{- if eq .Values.liveness.enabled true }}
100 port: {{ .Values.service.internalPort }}
101 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
102 periodSeconds: {{ .Values.liveness.periodSeconds }}
106 port: {{ .Values.service.internalPort }}
107 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
108 periodSeconds: {{ .Values.readiness.periodSeconds }}
110 - name: {{ include "common.fullname" . }}-logs
111 mountPath: /share/logs
112 - name: {{ include "common.fullname" . }}-logs
113 mountPath: /share/debug-logs
114 - name: {{ include "common.fullname" . }}-config
115 mountPath: /share/etc/config
116 - name: {{ include "common.fullname" . }}-certs
117 mountPath: /share/etc/certs
118 - name: {{ include "common.fullname" . }}-certs
119 mountPath: /opt/app/cmso/src/main/resources/aaf
121 {{ include "common.resources" . | indent 12 }}
122 {{- if .Values.nodeSelector }}
124 {{ toYaml .Values.nodeSelector | indent 10 }}
126 {{- if .Values.affinity }}
128 {{ toYaml .Values.affinity | indent 10 }}
131 - name: {{ include "common.fullname" . }}-config
133 name: {{ include "common.fullname" . }}
137 - key: cadi.properties
138 path: cadi.properties
139 - key: optimizer.properties
140 path: optimizer.properties
141 - key: liquibase.properties
142 path: liquibase.properties
143 - name: {{ include "common.fullname" . }}-logs
145 - name: {{ include "common.fullname" . }}-certs
147 secretName: {{ include "common.release" . }}-{{ .Values.global.commonConfigPrefix }}-certs
149 - name: "{{ include "common.namespace" . }}-docker-registry-key"