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
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
71 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
72 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
74 - mountPath: /usr/share/filebeat/filebeat.yml
77 - mountPath: /var/log/onap
78 name: {{ include "common.fullname" . }}-logs
79 - mountPath: /usr/share/filebeat/data
80 name: {{ include "common.fullname" . }}-filebeat
82 {{ include "common.resources" . }}
84 image: "{{ include "common.repository" . }}/{{ .Values.robotimage }}"
85 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
87 - name: {{ include "common.fullname" . }}-config
88 mountPath: /share/etc/config
92 {{ include "common.resources" . }}
93 - name: {{ include "common.name" . }}
94 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
95 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
98 value: {{ .Values.config.db.host }}.{{.Release.Namespace}}
100 value: {{ .Values.config.db.port | quote}}
102 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-user-secret" "key" "login") | indent 10}}
104 value: {{ .Values.config.db.mysqlDatabase }}
106 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cmso-db-user-secret" "key" "password") | indent 10}}
107 - name: JAVA_TRUSTSTORE
108 value: /share/etc/certs/{{ .Values.global.truststoreFile }}
110 value: /share/etc/certs/{{ .Values.global.keystoreFile }}
111 - name: JAVA_TRUSTSTORE_PASSWORD
112 value: {{ .Values.global.truststorePassword }}
113 - name: SSL_KEYSTORE_PASSWORD
114 value: {{ .Values.global.keystorePassword }}
115 - name: AUTHENTICATION
116 value: {{ .Values.global.authentication }}
118 - containerPort: {{ .Values.service.internalPort }}
119 # disable liveness probe when breakpoints set in debugger
120 # so K8s doesn't restart unresponsive container
121 {{- if eq .Values.liveness.enabled true }}
124 port: {{ .Values.service.internalPort }}
125 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
126 periodSeconds: {{ .Values.liveness.periodSeconds }}
130 port: {{ .Values.service.internalPort }}
131 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
132 periodSeconds: {{ .Values.readiness.periodSeconds }}
134 - name: {{ include "common.fullname" . }}-logs
135 mountPath: /share/logs
136 - name: {{ include "common.fullname" . }}-logs
137 mountPath: /share/debug-logs
138 - name: {{ include "common.fullname" . }}-config
139 mountPath: /share/etc/config
140 - name: {{ include "common.fullname" . }}-certs
141 mountPath: /share/etc/certs
142 - name: {{ include "common.fullname" . }}-certs
143 mountPath: /opt/app/cmso/src/main/resources/aaf
145 {{ include "common.resources" . | indent 12 }}
146 {{- if .Values.nodeSelector }}
148 {{ toYaml .Values.nodeSelector | indent 10 }}
150 {{- if .Values.affinity }}
152 {{ toYaml .Values.affinity | indent 10 }}
155 - name: {{ include "common.fullname" . }}-config
157 name: {{ include "common.fullname" . }}
161 - key: cmso.properties
162 path: cmso.properties
163 - key: cadi.properties
164 path: cadi.properties
165 - key: optimizer.properties
166 path: optimizer.properties
167 - key: ticketmgt.properties
168 path: ticketmgt.properties
169 - key: liquibase.properties
170 path: liquibase.properties
171 - name: {{ include "common.fullname" . }}-logs
173 - name: {{ include "common.fullname" . }}-filebeat
175 - name: filebeat-conf
177 name: {{ include "common.release" . }}-cmso-filebeat-configmap
178 - name: {{ include "common.fullname" . }}-certs
180 secretName: {{ include "common.release" . }}-{{ .Values.global.commonConfigPrefix }}-certs
182 - name: "{{ include "common.namespace" . }}-docker-registry-key"