2 # Copyright © 2017 Amdocs, Bell Canada, AT&T
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.
20 name: {{ include "common.fullname" . }}-dbinit-job
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 "helm.sh/hook": post-install
29 "helm.sh/hook-weight": "0"
30 "helm.sh/hook-delete-policy": before-hook-creation
36 app: {{ include "common.name" . }}-job
37 release: {{ include "common.release" . }}
38 name: {{ include "common.name" . }}
45 - "cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"
47 - name: AAI_CLIENT_NAME
48 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "login") | indent 10 }}
49 - name: AAI_CLIENT_PASSWORD
50 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "password") | indent 10 }}
51 - name: MODELSERVICE_USER
52 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "login") | indent 10 }}
53 - name: MODELSERVICE_PASSWORD
54 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "password") | indent 10 }}
56 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "login") | indent 10 }}
57 - name: RESTCONF_PASSWORD
58 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "password") | indent 10 }}
60 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "login") | indent 10 }}
61 - name: ANSIBLE_PASSWORD
62 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "password") | indent 10 }}
64 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "login") | indent 10 }}
65 - name: SCALEOUT_PASSWORD
66 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "password") | indent 10 }}
68 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "netbox-apikey" "key" "password") | indent 10 }}
70 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
71 - name: SDNC_DB_PASSWORD
72 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
74 - mountPath: /config-input
78 image: "{{ .Values.global.envsubstImage }}"
79 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
80 name: {{ include "common.name" . }}-update-config
82 - name: {{ include "common.name" . }}-readiness
87 - {{ include "common.mariadbService" . }}
93 fieldPath: metadata.namespace
94 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
95 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
97 - name: {{ include "common.name" . }}
98 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
99 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
101 - name: MYSQL_ROOT_PASSWORD
102 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
103 - name: ODL_ADMIN_USERNAME
104 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
105 - name: ODL_ADMIN_PASSWORD
106 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
108 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
109 - name: SDNC_DB_PASSWORD
110 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
112 value: {{ include "common.mariadbService" . }}
114 value: "{{.Values.config.sdncHome}}"
116 value: "{{.Values.config.etcDir}}"
118 value: "{{.Values.config.binDir}}"
119 - name: SDNC_DB_DATABASE
120 value: "{{.Values.config.dbSdnctlDatabase}}"
122 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
124 subPath: installSdncDb.sh
125 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
127 subPath: svclogic.properties
128 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
130 subPath: svclogic.properties
131 - mountPath: {{ .Values.config.configDir }}/dblib.properties
133 subPath: dblib.properties
137 - {{.Values.config.binDir }}/installSdncDb.sh
139 {{ include "common.resources" . | indent 12 }}
140 {{- if .Values.nodeSelector }}
142 {{ toYaml .Values.nodeSelector | indent 10 }}
144 {{- if .Values.affinity }}
146 {{ toYaml .Values.affinity | indent 10 }}
152 - name: docker-entrypoint-initdb-d
156 name: {{ include "common.fullname" . }}-bin
160 name: {{ include "common.fullname" . }}-properties
167 - name: "{{ include "common.namespace" . }}-docker-registry-key"