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: {{ .Values.global.busyboxRepository | default .Values.busyboxRepository }}/{{ .Values.global.busyboxImage | default .Values.busyboxImage }}
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 "common.repository" . }}/{{ .Values.global.readinessImage }}"
50 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
52 - name: {{ include "common.name" . }}-sdnrdb-init-job
53 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
54 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
55 command: ["/bin/bash"]
56 args: ["-c", "{{ .Values.config.binDir }}/startODL.sh"]
58 - name: SDNC_AAF_ENABLED
59 value: "{{ .Values.global.aafEnabled}}"
61 value: "{{.Values.config.sdncHome}}"
63 value: "{{.Values.config.etcDir}}"
65 value: "{{.Values.config.binDir}}"
66 ## start sdnrdb parameter
70 {{ if .Values.global.aafEnabled -}}
71 value: "https://{{ .Values.elasticsearch.service.name | default "sdnrdb"}}.{{.Release.Namespace}}:{{.Values.elasticsearch.service.port | default "9200"}}"
73 value: "http://{{ .Values.elasticsearch.service.name | default "sdnrdb"}}.{{.Release.Namespace}}:{{.Values.elasticsearch.service.port | default "9200"}}"
75 - name: SDNRDBPARAMETER
77 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
78 resources: {{ include "common.resources" . | nindent 12 }}
79 {{- if .Values.nodeSelector }}
80 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
82 {{- if .Values.affinity }}
83 affinity: {{ toYaml .Values.affinity | nindent 10 }}
89 - name: docker-entrypoint-initdb-d
93 name: {{ include "common.fullname" . }}-bin
97 name: {{ include "common.fullname" . }}-properties
99 {{ include "common.certInitializer.volumes" . | nindent 6 }}
102 - name: "{{ include "common.namespace" . }}-docker-registry-key"