Skip to content

Commit

Permalink
correction of #145, add initSchema.image variable to customise init-s…
Browse files Browse the repository at this point in the history
…chema initContainer
  • Loading branch information
jp-gouin committed Jan 23, 2024
1 parent 8f58ef9 commit bb423f6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 6 additions & 0 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down
6 changes: 6 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}

Expand Down

0 comments on commit bb423f6

Please sign in to comment.