metadata: {{ include "common.templateMetadata" . | indent 6}}
spec:
initContainers:
- {{ include "common.certInitializer.initContainer" . | indent 6 }}
- {{ if .Values.global.aafEnabled }}
- - name: {{ include "common.name" . }}-chown
- image: {{ .Values.global.busyboxRepository | default .Values.busyboxRepository }}/{{ .Values.global.busyboxImage | default .Values.busyboxImage }}
- command: ["sh", "-c", "chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certInitializer.credsPath }}"]
- volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
- {{ end }}
- name: {{ include "common.name" . }}-readiness
command:
- /app/ready.py
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
+ image: {{ include "repositoryGenerator.image.readiness" . }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
containers:
- name: {{ include "common.name" . }}-sdnrdb-init-job
- image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+ image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
command: ["/bin/bash"]
- args: ["-c", "{{ .Values.config.binDir }}/startODL.sh"]
+ args:
+ - -c
+ - |
+ sleep 90; "{{ .Values.config.binDir }}/startODL.sh"
env:
- name: SDNC_AAF_ENABLED
- value: "{{ .Values.global.aafEnabled}}"
+ value: "false"
- name: SDNC_HOME
value: "{{.Values.config.sdncHome}}"
- name: ETC_DIR
- name: SDNRINIT
value: "true"
- name: SDNRDBURL
- {{ if .Values.global.aafEnabled -}}
- value: "https://{{ .Values.elasticsearch.service.name | default "sdnrdb"}}.{{.Release.Namespace}}:{{.Values.elasticsearch.service.port | default "9200"}}"
- {{- else -}}
value: "http://{{ .Values.elasticsearch.service.name | default "sdnrdb"}}.{{.Release.Namespace}}:{{.Values.elasticsearch.service.port | default "9200"}}"
- {{- end }}
- name: SDNRDBPARAMETER
value: "-k"
- volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
- resources: {{ include "common.resources" . | nindent 12 }}
+ resources: {{ include "common.resources" . | nindent 10 }}
+ {{- if include "common.onServiceMesh" . }}
+ - name: sdnrdb-service-mesh-wait-for-job-container
+ image: {{ include "repositoryGenerator.image.quitQuit" . }}
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ command:
+ - /bin/sh
+ - "-c"
+ args:
+ - |
+ echo "waiting 30s for istio side cars to be up"; sleep 30s;
+ /app/ready.py --service-mesh-check sdnc-sdnrdb-init-job -t 45;
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: metadata.namespace
+ {{- end }}
{{- if .Values.nodeSelector }}
nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
{{- end -}}
configMap:
name: {{ include "common.fullname" . }}-properties
defaultMode: 0644
-{{ include "common.certInitializer.volumes" . | nindent 6 }}
restartPolicy: Never
imagePullSecrets:
- name: "{{ include "common.namespace" . }}-docker-registry-key"