2 # Copyright © 2020 highstreet technologies GmbH
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.
16 {{ if .Values.config.sdnr.enabled -}}
19 metadata: {{- include "common.resourceMetadata" (dict "suffix" "sdnrdb-init-job" "dot" . ) | nindent 2 }}
23 metadata: {{ include "common.templateMetadata" . | indent 6}}
26 {{ include "common.certInitializer.initContainer" . | indent 6 }}
27 {{ if .Values.global.aafEnabled }}
28 - name: {{ include "common.name" . }}-chown
29 image: {{ include "repositoryGenerator.image.busybox" . }}
30 command: ["sh", "-c", "chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certInitializer.credsPath }}"]
31 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
33 - name: {{ include "common.name" . }}-readiness
38 - {{.Values.elasticsearch.nameOverride}}-elasticsearch
40 - {{.Values.elasticsearch.nameOverride}}-nginx
42 - {{.Values.elasticsearch.nameOverride}}-master
48 fieldPath: metadata.namespace
49 image: {{ include "repositoryGenerator.image.readiness" . }}
50 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
52 - name: {{ include "common.name" . }}-sdnrdb-init-job
53 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
54 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
55 command: ["/bin/bash"]
59 sleep 90; "{{ .Values.config.binDir }}/startODL.sh"
61 - name: SDNC_AAF_ENABLED
62 value: "{{ .Values.global.aafEnabled}}"
64 value: "{{.Values.config.sdncHome}}"
66 value: "{{.Values.config.etcDir}}"
68 value: "{{.Values.config.binDir}}"
69 ## start sdnrdb parameter
73 {{ if .Values.global.aafEnabled -}}
74 value: "https://{{ .Values.elasticsearch.service.name | default "sdnrdb"}}.{{.Release.Namespace}}:{{.Values.elasticsearch.service.port | default "9200"}}"
76 value: "http://{{ .Values.elasticsearch.service.name | default "sdnrdb"}}.{{.Release.Namespace}}:{{.Values.elasticsearch.service.port | default "9200"}}"
78 - name: SDNRDBPARAMETER
80 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
81 resources: {{ include "common.resources" . | nindent 12 }}
82 {{- if include "common.onServiceMesh" . }}
83 - name: sdnrdb-service-mesh-wait-for-job-container
84 image: {{ include "repositoryGenerator.image.quitQuit" . }}
85 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
91 echo "waiting 30s for istio side cars to be up"; sleep 30s;
92 /app/ready.py --service-mesh-check sdnc-sdnrdb-init-job -t 45;
98 fieldPath: metadata.namespace
100 {{- if .Values.nodeSelector }}
101 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
103 {{- if .Values.affinity }}
104 affinity: {{ toYaml .Values.affinity | nindent 10 }}
110 - name: docker-entrypoint-initdb-d
114 name: {{ include "common.fullname" . }}-bin
118 name: {{ include "common.fullname" . }}-properties
120 {{ include "common.certInitializer.volumes" . | nindent 6 }}
123 - name: "{{ include "common.namespace" . }}-docker-registry-key"