1 {{- if .Values.dgbuilder.enabled -}}
3 # Copyright © 2017 Amdocs, Bell Canada, AT&T
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
21 name: {{ include "common.fullname" . }}-dbinit-job
22 namespace: {{ include "common.namespace" . }}
24 app: {{ include "common.name" . }}
25 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
26 release: {{ include "common.release" . }}
27 heritage: {{ .Release.Service }}
29 "helm.sh/hook": post-install
30 "helm.sh/hook-weight": "0"
31 "helm.sh/hook-delete-policy": before-hook-creation
37 app: {{ include "common.name" . }}-job
38 release: {{ include "common.release" . }}
39 name: {{ include "common.name" . }}
46 - "cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"
48 - name: AAI_CLIENT_NAME
49 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "login") | indent 10 }}
50 - name: AAI_CLIENT_PASSWORD
51 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "password") | indent 10 }}
52 - name: MODELSERVICE_USER
53 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "login") | indent 10 }}
54 - name: MODELSERVICE_PASSWORD
55 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "password") | indent 10 }}
57 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "login") | indent 10 }}
58 - name: RESTCONF_PASSWORD
59 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "password") | indent 10 }}
61 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "login") | indent 10 }}
62 - name: ANSIBLE_PASSWORD
63 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "password") | indent 10 }}
65 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "login") | indent 10 }}
66 - name: SCALEOUT_PASSWORD
67 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "password") | indent 10 }}
69 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "netbox-apikey" "key" "password") | indent 10 }}
71 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
72 - name: SDNC_DB_PASSWORD
73 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
75 - mountPath: /config-input
79 image: "{{ .Values.global.envsubstImage }}"
80 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
81 name: {{ include "common.name" . }}-update-config
83 - name: {{ include "common.name" . }}-readiness
88 - {{ include "common.mariadbService" . }}
94 fieldPath: metadata.namespace
95 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
96 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
98 - name: {{ include "common.name" . }}
99 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
100 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
102 - name: MYSQL_ROOT_PASSWORD
103 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
104 - name: ODL_ADMIN_USERNAME
105 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
106 - name: ODL_ADMIN_PASSWORD
107 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
109 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
110 - name: SDNC_DB_PASSWORD
111 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
113 value: {{ include "common.mariadbService" . }}
115 value: "{{.Values.config.sdncHome}}"
117 value: "{{.Values.config.etcDir}}"
119 value: "{{.Values.config.binDir}}"
120 - name: SDNC_DB_DATABASE
121 value: "{{.Values.config.dbSdnctlDatabase}}"
123 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
125 subPath: installSdncDb.sh
126 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
128 subPath: svclogic.properties
129 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
131 subPath: svclogic.properties
132 - mountPath: {{ .Values.config.configDir }}/dblib.properties
134 subPath: dblib.properties
138 - {{.Values.config.binDir }}/installSdncDb.sh
140 {{ include "common.resources" . | indent 12 }}
141 {{- if .Values.nodeSelector }}
143 {{ toYaml .Values.nodeSelector | indent 10 }}
145 {{- if .Values.affinity }}
147 {{ toYaml .Values.affinity | indent 10 }}
153 - name: docker-entrypoint-initdb-d
157 name: {{ include "common.fullname" . }}-bin
161 name: {{ include "common.fullname" . }}-properties
168 - name: "{{ include "common.namespace" . }}-docker-registry-key"