Skip to content

Commit

Permalink
fix code
Browse files Browse the repository at this point in the history
  • Loading branch information
aimee-889 committed Sep 27, 2024
1 parent f8c10a2 commit 6886413
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
15 changes: 8 additions & 7 deletions charts/dbildungs-iam-ldap/templates/configmap-config-script.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,18 @@ data:
sleep 10
# Loading Schemas
if ! (ldapsearch -Y EXTERNAL -H ldapi:/// -b "cn=schema,cn=config" "(cn=*ucsMail)"); then
ldapadd -Y EXTERNAL -H ldapi:/// -f /opt/bitnami/openldap/etc/schema/ucsmail.ldif
ucsmail_search_output=$(ldapsearch -Y EXTERNAL -H ldapi:/// -b "cn=schema,cn=config" "(cn=*ucsMail)")
if (echo "$ucsmail_search_output" | grep -q "numEntries: 1"); then
echo "Entry for ucsMail Schema already exists. If you need to modify it, delete it and readd it."
else
echo "Entry for ucsMail Schema already exists. Nothing to add."
ldapadd -Y EXTERNAL -H ldapi:/// -f /opt/bitnami/openldap/etc/schema/ucsmail.ldif
fi
# Adding Config Users
# Adding Config Users from Secret
/bin/bash /script/02.sh /ldap-configuration/apply/apply.ldif true
# Adding other Configs
# /bin/bash /script/02.sh /ldap-configuration/extra/apply.ldif false
# /bin/bash /script/02.sh /ldap-configuration/extra/modify.ldif true
# Adding other Configs from Configmap
/bin/bash /script/02.sh /ldap-configuration/extra/apply.ldif false
/bin/bash /script/02.sh /ldap-configuration/extra/modify.ldif true
Expand Down
3 changes: 2 additions & 1 deletion charts/dbildungs-iam-ldap/templates/configmap-extraldif.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ data:
cn: lehrer
objectclass: groupOfUniqueNames
objectclass: top
uniquemember:
dn: cn=schueler,dc=schule-sh,dc=de
cn: schueler
objectclass: groupOfUniqueNames
objectclass: top
uniquemember:
dn: ou=oeffentlicheSchulen,dc=schule-sh,dc=de
objectclass: organizationalUnit
Expand Down Expand Up @@ -55,7 +57,6 @@ data:
cn: lehrer
objectclass: groupOfUniqueNames
objectclass: top
dn: cn=lehrer,dc=schule-sh,dc=de
uniquemember: cn=ssuperadmin,ou=oeffentlicheSchulen,dc=schule-sh,dc=de
dn: cn=schueler,dc=schule-sh,dc=de
Expand Down
1 change: 1 addition & 0 deletions charts/dbildungs-iam-ldap/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ replication:

persistence:
enabled: true
# enabled: false
# existingClaim: openldap-pvc
accessModes:
- ReadWriteOnce
Expand Down

0 comments on commit 6886413

Please sign in to comment.