1 # Copyright (c) 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: "{{ .Values.global.readinessRepository }}/{{ .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
81 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
82 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
84 - mountPath: /usr/share/filebeat/filebeat.yml
87 - mountPath: /var/log/onap
88 name: {{ include "common.fullname" . }}-logs
89 - mountPath: /usr/share/filebeat/data
90 name: {{ include "common.fullname" . }}-filebeat
92 {{ include "common.resources" . }}
94 image: "{{ include "common.repository" . }}/{{ .Values.robotimage }}"
95 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
97 - name: {{ include "common.fullname" . }}-config
98 mountPath: /share/etc/config
100 - containerPort: 5000
102 {{ include "common.resources" . }}
103 - name: {{ include "common.name" . }}
104 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
105 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
108 value: {{ .Values.config.db.host }}.{{.Release.Namespace}}
110 value: {{ .Values.config.db.port | quote}}
112 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-user-secret" "key" "login") | indent 10}}
114 value: {{ .Values.config.db.mysqlDatabase }}
116 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-user-secret" "key" "password") | indent 10}}
117 - name: JAVA_TRUSTSTORE
118 value: /share/etc/certs/{{ .Values.global.truststoreFile }}
120 value: /share/etc/certs/{{ .Values.global.keystoreFile }}
121 - name: JAVA_TRUSTSTORE_PASSWORD
122 value: {{ .Values.global.truststorePassword }}
123 - name: SSL_KEYSTORE_PASSWORD
124 value: {{ .Values.global.keystorePassword }}
125 - name: AUTHENTICATION
126 value: {{ .Values.global.authentication }}
128 - containerPort: {{ .Values.service.internalPort }}
129 # disable liveness probe when breakpoints set in debugger
130 # so K8s doesn't restart unresponsive container
131 {{- if eq .Values.liveness.enabled true }}
134 port: {{ .Values.service.internalPort }}
135 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
136 periodSeconds: {{ .Values.liveness.periodSeconds }}
140 port: {{ .Values.service.internalPort }}
141 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
142 periodSeconds: {{ .Values.readiness.periodSeconds }}
144 - name: {{ include "common.fullname" . }}-logs
145 mountPath: /share/logs
146 - name: {{ include "common.fullname" . }}-logs
147 mountPath: /share/debug-logs
148 - name: {{ include "common.fullname" . }}-config
149 mountPath: /share/etc/config
150 - name: {{ include "common.fullname" . }}-certs
151 mountPath: /share/etc/certs
152 - name: {{ include "common.fullname" . }}-certs
153 mountPath: /opt/app/cmso/src/main/resources/aaf
155 {{ include "common.resources" . | indent 12 }}
156 {{- if .Values.nodeSelector }}
158 {{ toYaml .Values.nodeSelector | indent 10 }}
160 {{- if .Values.affinity }}
162 {{ toYaml .Values.affinity | indent 10 }}
165 - name: {{ include "common.fullname" . }}-config
167 name: {{ include "common.fullname" . }}
171 - key: cmso.properties
172 path: cmso.properties
173 - key: cadi.properties
174 path: cadi.properties
175 - key: optimizer.properties
176 path: optimizer.properties
177 - key: ticketmgt.properties
178 path: ticketmgt.properties
179 - key: liquibase.properties
180 path: liquibase.properties
181 - name: {{ include "common.fullname" . }}-logs
183 - name: {{ include "common.fullname" . }}-filebeat
185 - name: filebeat-conf
187 name: {{ include "common.release" . }}-cmso-filebeat-configmap
188 - name: {{ include "common.fullname" . }}-certs
190 secretName: {{ include "common.release" . }}-{{ .Values.global.commonConfigPrefix }}-certs
192 - name: "{{ include "common.namespace" . }}-docker-registry-key"