diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index 2b27d00..77c3ca7 100755 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -153,6 +153,12 @@ Return the proper Openldap init container image name {{- include "common.images.image" (dict "imageRoot" .Values.initTLSSecret.image "global" .Values.global) -}} {{- end -}} +{{/* +Return the proper Openldap init container image name +*/}} +{{- define "openldap.initSchemaImage" -}} +{{- include "common.images.image" (dict "imageRoot" .Values.initSchema.image "global" .Values.global) -}} +{{- end -}} {{/* Return the proper Openldap volume permissions init container image name diff --git a/templates/statefulset.yaml b/templates/statefulset.yaml index fb42f04..b23bbd4 100644 --- a/templates/statefulset.yaml +++ b/templates/statefulset.yaml @@ -42,8 +42,8 @@ spec: spec: initContainers: - name: init-schema - image: debian - imagePullPolicy: {{ .Values.initTLSSecret.image.pullPolicy | quote }} + image: {{ include "openldap.initSchemaImage" . }} + imagePullPolicy: {{ .Values.initSchema.image.pullPolicy | quote }} command: - sh - -c @@ -305,7 +305,7 @@ spec: - name: cm-custom-ldif-files configMap: name: {{ .Values.customLdifCm }} - - name: custom-ldif-files + - name: custom-ldif-files emptyDir: medium: Memory {{- end }} diff --git a/values.yaml b/values.yaml index c2e8cc4..50dd2a3 100644 --- a/values.yaml +++ b/values.yaml @@ -65,6 +65,12 @@ image: # Valid log levels: none, error, warning, info (default), debug, trace logLevel: info +initSchema: + image: + repository: debian + tag: latest + pullPolicy: Always + pullSecrets: [] extraLabels: {}