Skip to content

Commit

Permalink
add command to openldap container to ensure non-first containers dont…
Browse files Browse the repository at this point in the history
… try to init certain stuff

- more detail: #148 (comment)
  • Loading branch information
davidfrickert committed Sep 10, 2024
1 parent 7e6e020 commit 312d16b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,22 @@ spec:
{{- if .Values.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
command:
- sh
- -c
- |
host=$(hostname)
if [ "$host" = "{{ template "openldap.fullname" . }}-0" ]
then
echo "This is the first openldap pod so let's init all additional schemas and ldifs here"
else
echo "This is not the first openldap pod so let's not init anything"
unset LDAP_CONFIGURE_PPOLICY LDAP_PPOLICY_HASH_CLEARTEXT
export LDAP_SKIP_DEFAULT_TREE=yes
fi
/opt/bitnami/scripts/openldap/entrypoint.sh /opt/bitnami/scripts/openldap/run.sh
env:
- name: POD_NAME
valueFrom:
Expand Down

0 comments on commit 312d16b

Please sign in to comment.