1 # Copyright © 2020 highstreet technologies GmbH
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.
14 {{ if .Values.config.sdnr.enabled -}}
17 metadata: {{- include "common.resourceMetadata" (dict "suffix" "sdnrdb-init-job" "dot" . ) | nindent 2 }}
21 metadata: {{ include "common.templateMetadata" . | indent 6}}
24 {{ include "common.certInitializer.initContainer" . | indent 6 }}
25 {{ if .Values.global.aafEnabled }}
26 - name: {{ include "common.name" . }}-chown
27 image: {{ .Values.global.busyboxRepository | default .Values.busyboxRepository }}/{{ .Values.global.busyboxImage | default .Values.busyboxImage }}
28 command: ["sh", "-c", "chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certInitializer.credsPath }}"]
29 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
31 - name: {{ include "common.name" . }}-readiness
36 - {{.Values.elasticsearch.nameOverride}}-elasticsearch
38 - {{.Values.elasticsearch.nameOverride}}-nginx
40 - {{.Values.elasticsearch.nameOverride}}-master
46 fieldPath: metadata.namespace
47 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
48 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
50 - name: {{ include "common.name" . }}-sdnrdb-init-job
51 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
52 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
53 command: ["/bin/bash"]
54 args: ["-c", "{{ .Values.config.binDir }}/startODL.oom.sh"]
56 - name: SDNC_AAF_ENABLED
57 value: "{{ .Values.global.aafEnabled}}"
59 value: "{{.Values.config.sdncHome}}"
61 value: "{{.Values.config.etcDir}}"
63 value: "{{.Values.config.binDir}}"
64 ## start sdnrdb parameter
68 {{ if .Values.global.aafEnabled -}}
69 value: "https://{{ .Values.elasticsearch.service.name | default "sdnrdb"}}.{{.Release.Namespace}}:{{.Values.elasticsearch.service.port | default "9200"}}"
71 value: "http://{{ .Values.elasticsearch.service.name | default "sdnrdb"}}.{{.Release.Namespace}}:{{.Values.elasticsearch.service.port | default "9200"}}"
73 - name: SDNRDBPARAMETER
75 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
76 resources: {{ include "common.resources" . | nindent 12 }}
77 {{- if .Values.nodeSelector }}
78 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
80 {{- if .Values.affinity }}
81 affinity: {{ toYaml .Values.affinity | nindent 10 }}
87 - name: docker-entrypoint-initdb-d
91 name: {{ include "common.fullname" . }}-bin
95 name: {{ include "common.fullname" . }}-properties
97 {{ include "common.certInitializer.volumes" . | nindent 6 }}
100 - name: "{{ include "common.namespace" . }}-docker-registry-key"