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.
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
78 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
79 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
81 - mountPath: /usr/share/filebeat/filebeat.yml
84 - mountPath: /var/log/onap
85 name: {{ include "common.fullname" . }}-logs
86 - mountPath: /usr/share/filebeat/data
87 name: {{ include "common.fullname" . }}-filebeat
89 {{ include "common.resources" . }}
91 image: "{{ include "common.repository" . }}/{{ .Values.robotimage }}"
92 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
94 - name: {{ include "common.fullname" . }}-config
95 mountPath: /share/etc/config
99 {{ include "common.resources" . }}
100 - name: {{ include "common.name" . }}
101 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
102 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
105 value: {{ .Values.config.db.host }}.{{.Release.Namespace}}
107 value: {{ .Values.config.db.port | quote}}
109 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-user-secret" "key" "login") | indent 10}}
111 value: {{ .Values.config.db.mysqlDatabase }}
113 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-user-secret" "key" "password") | indent 10}}
114 - name: JAVA_TRUSTSTORE
115 value: /share/etc/certs/{{ .Values.global.truststoreFile }}
117 value: /share/etc/certs/{{ .Values.global.keystoreFile }}
118 - name: JAVA_TRUSTSTORE_PASSWORD
119 value: {{ .Values.global.truststorePassword }}
120 - name: SSL_KEYSTORE_PASSWORD
121 value: {{ .Values.global.keystorePassword }}
122 - name: AUTHENTICATION
123 value: {{ .Values.global.authentication }}
125 - containerPort: {{ .Values.service.internalPort }}
126 # disable liveness probe when breakpoints set in debugger
127 # so K8s doesn't restart unresponsive container
128 {{- if eq .Values.liveness.enabled true }}
131 port: {{ .Values.service.internalPort }}
132 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
133 periodSeconds: {{ .Values.liveness.periodSeconds }}
137 port: {{ .Values.service.internalPort }}
138 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
139 periodSeconds: {{ .Values.readiness.periodSeconds }}
141 - name: {{ include "common.fullname" . }}-logs
142 mountPath: /share/logs
143 - name: {{ include "common.fullname" . }}-logs
144 mountPath: /share/debug-logs
145 - name: {{ include "common.fullname" . }}-config
146 mountPath: /share/etc/config
147 - name: {{ include "common.fullname" . }}-certs
148 mountPath: /share/etc/certs
149 - name: {{ include "common.fullname" . }}-certs
150 mountPath: /opt/app/cmso/src/main/resources/aaf
152 {{ include "common.resources" . | indent 12 }}
153 {{- if .Values.nodeSelector }}
155 {{ toYaml .Values.nodeSelector | indent 10 }}
157 {{- if .Values.affinity }}
159 {{ toYaml .Values.affinity | indent 10 }}
162 - name: {{ include "common.fullname" . }}-config
164 name: {{ include "common.fullname" . }}
168 - key: cmso.properties
169 path: cmso.properties
170 - key: cadi.properties
171 path: cadi.properties
172 - key: optimizer.properties
173 path: optimizer.properties
174 - key: ticketmgt.properties
175 path: ticketmgt.properties
176 - key: liquibase.properties
177 path: liquibase.properties
178 - name: {{ include "common.fullname" . }}-logs
180 - name: {{ include "common.fullname" . }}-filebeat
182 - name: filebeat-conf
184 name: {{ include "common.release" . }}-cmso-filebeat-configmap
185 - name: {{ include "common.fullname" . }}-certs
187 secretName: {{ include "common.release" . }}-{{ .Values.global.commonConfigPrefix }}-certs
189 - name: "{{ include "common.namespace" . }}-docker-registry-key"