2 # Copyright © 2017 Amdocs, Bell Canada
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
17 apiVersion: extensions/v1beta1
20 name: {{ include "common.fullname" . }}
21 namespace: {{ include "common.namespace" . }}
23 app: {{ include "common.name" . }}
24 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
25 release: {{ include "common.release" . }}
26 heritage: {{ .Release.Service }}
28 replicas: {{ .Values.replicaCount }}
32 app: {{ include "common.name" . }}
33 release: {{ include "common.release" . }}
40 - "cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"
43 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
44 - name: SDNC_DB_PASSWORD
45 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
46 - name: DB_FABRIC_USER
47 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "fabric-db-creds" "key" "login") | indent 10 }}
48 - name: DB_FABRIC_PASSWORD
49 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "fabric-db-creds" "key" "password") | indent 10 }}
51 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 10 }}
53 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 10 }}
54 - name: KEYSTORE_PASSWORD
55 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "keystore-password" "key" "password") | indent 10 }}
57 - mountPath: /config-input
61 image: "{{ .Values.global.envsubstImage }}"
62 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
63 name: {{ include "common.name" . }}-update-config
69 - {{ include "common.mariadbService" . }}
71 - {{ .Values.config.sdncChartName }}
77 fieldPath: metadata.namespace
78 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
79 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
80 name: {{ include "common.name" . }}-readiness
82 - name: {{ include "common.name" . }}
83 command: ["/bin/bash"]
84 args: ["-c", "cd /opt/onap/sdnc/admportal/shell && ./start_portal.sh"]
85 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
86 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
88 - containerPort: {{ .Values.service.internalPort }}
89 # disable liveness probe when breakpoints set in debugger
90 # so K8s doesn't restart unresponsive container
91 {{ if .Values.liveness.enabled }}
94 port: {{ .Values.service.internalPort }}
95 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
96 periodSeconds: {{ .Values.liveness.periodSeconds }}
100 port: {{ .Values.service.internalPort }}
101 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
102 periodSeconds: {{ .Values.readiness.periodSeconds }}
104 - name: MYSQL_ROOT_PASSWORD
105 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 14 }}
106 - name: SDNC_CONFIG_DIR
107 value: "{{ .Values.config.configDir }}"
109 - mountPath: /etc/localtime
112 - mountPath: {{ .Values.config.configDir }}/admportal.json
114 subPath: admportal.json
115 - mountPath: {{ .Values.config.configDir }}/dblib.properties
117 subPath: dblib.properties
118 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
120 subPath: svclogic.properties
121 - mountPath: {{ .Values.config.configDir }}/svclogic.properties.sdnctldb01
123 subPath: svclogic.properties
124 - mountPath: {{ .Values.config.configDir }}/svclogic.properties.sdnctldb02
126 subPath: svclogic.properties.sdnctldb02
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 }}
143 name: {{ include "common.fullname" . }}
149 - name: "{{ include "common.namespace" . }}-docker-registry-key"