1 # Copyright © 2017 Amdocs, Bell Canada
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 - "cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"
41 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
42 - name: SDNC_DB_PASSWORD
43 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
44 - name: DB_FABRIC_USER
45 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "fabric-db-creds" "key" "login") | indent 10 }}
46 - name: DB_FABRIC_PASSWORD
47 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "fabric-db-creds" "key" "password") | indent 10 }}
49 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "odl-creds" "key" "login") | indent 10 }}
51 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "odl-creds" "key" "password") | indent 10 }}
52 - name: KEYSTORE_PASSWORD
53 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "keystore-password" "key" "password") | indent 10 }}
55 - mountPath: /config-input
59 image: "{{ .Values.global.envsubstImage }}"
60 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
61 name: {{ include "common.name" . }}-update-config
67 - {{ include "common.mariadbService" . }}
69 - {{ .Values.config.sdncChartName }}
75 fieldPath: metadata.namespace
76 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
77 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
78 name: {{ include "common.name" . }}-readiness
80 - name: {{ include "common.name" . }}
81 command: ["/bin/bash"]
82 args: ["-c", "cd /opt/onap/sdnc/admportal/shell && ./start_portal.sh"]
83 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
84 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
86 - containerPort: {{ .Values.service.internalPort }}
87 # disable liveness probe when breakpoints set in debugger
88 # so K8s doesn't restart unresponsive container
89 {{ if .Values.liveness.enabled }}
92 port: {{ .Values.service.internalPort }}
93 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
94 periodSeconds: {{ .Values.liveness.periodSeconds }}
98 port: {{ .Values.service.internalPort }}
99 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
100 periodSeconds: {{ .Values.readiness.periodSeconds }}
102 - name: MYSQL_ROOT_PASSWORD
103 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-root-password" "key" "password") | indent 14 }}
104 - name: SDNC_CONFIG_DIR
105 value: "{{ .Values.config.configDir }}"
107 - mountPath: /etc/localtime
110 - mountPath: {{ .Values.config.configDir }}/admportal.json
112 subPath: admportal.json
113 - mountPath: {{ .Values.config.configDir }}/dblib.properties
115 subPath: dblib.properties
116 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
118 subPath: svclogic.properties
119 - mountPath: {{ .Values.config.configDir }}/svclogic.properties.sdnctldb01
121 subPath: svclogic.properties
122 - mountPath: {{ .Values.config.configDir }}/svclogic.properties.sdnctldb02
124 subPath: svclogic.properties.sdnctldb02
126 {{ include "common.resources" . | indent 12 }}
127 {{- if .Values.nodeSelector }}
129 {{ toYaml .Values.nodeSelector | indent 10 }}
131 {{- if .Values.affinity }}
133 {{ toYaml .Values.affinity | indent 10 }}
141 name: {{ include "common.fullname" . }}
147 - name: "{{ include "common.namespace" . }}-docker-registry-key"