1 # Copyright © 2017 Amdocs, Bell Canada, 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.
18 name: {{ include "common.fullname" . }}-dbinit-job
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 "helm.sh/hook": post-install
27 "helm.sh/hook-weight": "0"
28 "helm.sh/hook-delete-policy": before-hook-creation
34 app: {{ include "common.name" . }}-job
35 release: {{ include "common.release" . }}
36 name: {{ include "common.name" . }}
43 - "cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"
45 - name: AAI_CLIENT_NAME
46 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "aai-user-creds" "key" "login") | indent 10 }}
47 - name: AAI_CLIENT_PASSWORD
48 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "aai-user-creds" "key" "password") | indent 10 }}
49 - name: MODELSERVICE_USER
50 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "modeling-user-creds" "key" "login") | indent 10 }}
51 - name: MODELSERVICE_PASSWORD
52 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "modeling-user-creds" "key" "password") | indent 10 }}
54 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "restconf-creds" "key" "login") | indent 10 }}
55 - name: RESTCONF_PASSWORD
56 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "restconf-creds" "key" "password") | indent 10 }}
58 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "ansible-creds" "key" "login") | indent 10 }}
59 - name: ANSIBLE_PASSWORD
60 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "ansible-creds" "key" "password") | indent 10 }}
62 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "scaleout-creds" "key" "login") | indent 10 }}
63 - name: SCALEOUT_PASSWORD
64 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "scaleout-creds" "key" "password") | indent 10 }}
66 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "netbox-apikey" "key" "password") | indent 10 }}
68 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
69 - name: SDNC_DB_PASSWORD
70 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
72 - mountPath: /config-input
76 image: "{{ .Values.global.envsubstImage }}"
77 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
78 name: {{ include "common.name" . }}-update-config
80 - name: {{ include "common.name" . }}-readiness
85 - {{ include "common.mariadbService" . }}
91 fieldPath: metadata.namespace
92 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
93 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
95 - name: {{ include "common.name" . }}
96 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
97 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
99 - name: MYSQL_ROOT_PASSWORD
100 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
101 - name: ODL_ADMIN_USERNAME
102 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
103 - name: ODL_ADMIN_PASSWORD
104 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
106 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
107 - name: SDNC_DB_PASSWORD
108 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
110 value: {{ include "common.mariadbService" . }}
112 value: "{{.Values.config.sdncHome}}"
114 value: "{{.Values.config.etcDir}}"
116 value: "{{.Values.config.binDir}}"
117 - name: SDNC_DB_DATABASE
118 value: "{{.Values.config.dbSdnctlDatabase}}"
120 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
122 subPath: installSdncDb.sh
123 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
125 subPath: svclogic.properties
126 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
128 subPath: svclogic.properties
129 - mountPath: {{ .Values.config.configDir }}/dblib.properties
131 subPath: dblib.properties
135 - {{.Values.config.binDir }}/installSdncDb.sh
137 {{ include "common.resources" . | indent 12 }}
138 {{- if .Values.nodeSelector }}
140 {{ toYaml .Values.nodeSelector | indent 10 }}
142 {{- if .Values.affinity }}
144 {{ toYaml .Values.affinity | indent 10 }}
150 - name: docker-entrypoint-initdb-d
154 name: {{ include "common.fullname" . }}-bin
158 name: {{ include "common.fullname" . }}-properties
165 - name: "{{ include "common.namespace" . }}-docker-registry-key"