Skip to content

Commit

Permalink
try adding the schema
Browse files Browse the repository at this point in the history
  • Loading branch information
aimee-889 committed Sep 26, 2024
1 parent 501707f commit 4a9abcc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
21 changes: 19 additions & 2 deletions charts/dbildungs-iam-ldap/templates/configmap-config-script.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ data:
ldapmodify -Y EXTERNAL -H ldapi:/// -f /ldap-configuration/modify/modify.ldif
# no sure why this sleep is needed again - but it is
sleep 10
/bin/bash /script/02.sh
# /bin/bash /script/02.sh
ldapapply -Y EXTERNAL -H ldapi:/// -f /script/schemas.ldif
# this script is needed so that Helm Chart is stable if persistence is enabled
# it applies changes if they are new, but modifies them if they already exist
Expand Down Expand Up @@ -69,4 +71,19 @@ data:
# Process the last entry in the file
if [[ -n "$current_dn" ]]; then
process_entry "$current_dn" "$current_entry"
fi
fi
schemas.ldif: |
# add custom schema
dn: cn=ucsMail,cn=schema,cn=config
objectClass: olcSchemaConfig
cn: ucsMail
olcAttributeTypes: ( 1.3.6.1.4.1.10176.1010.1.1 NAME 'mailPrimaryAddress' DESC 'Primary mailaddresses for the user' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
olcAttributeTypes: ( 1.3.6.1.4.1.10176.1010.1.2 NAME 'mailAlternativeAddress' DESC 'Secondary (alias) mailaddresses for the same user' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
olcAttributeTypes: ( 1.3.6.1.4.1.10176.1010.1.3 NAME 'mailGlobalSpamFolder'DESC 'Move Spam to global spam folder instead of local spam folder' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
olcAttributeTypes: ( 1.3.6.1.4.1.10176.1010.1.47 NAME 'mailForwardAddress'DESC 'External mail addresses to forward the users emails to' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
olcAttributeTypes: ( 1.3.6.1.4.1.10176.1010.1.51 NAME 'mailForwardCopyToSelf' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{10} SINGLE-VALUE )
olcAttributeTypes: ( 1.3.6.1.4.1.10176.1010.1.60 NAME 'univentionMailHomeServer' DESC 'home server of users mailbox' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} SINGLE-VALUE )
olcAttributeTypes: ( 1.3.6.1.4.1.10176.1010.1.92 NAME 'univentionMailUserQuota' DESC 'Mailbox hard quota limit in MB' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
olcObjectClasses: ( 1.3.6.1.4.1.10176.1010.2.1 NAME 'univentionMail' DESC 'Univention Mail Preferences' SUP top AUXILIARY MUST uid MAY ( univentionMailHomeServer $ mailPrimaryAddress $ mailAlternativeAddress $ mailGlobalSpamFolder $ univentionMailUserQuota $ mailForwardAddress $ mailForwardCopyToSelf ) )
1 change: 1 addition & 0 deletions charts/dbildungs-iam-ldap/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ spec:
fi
cp /tmp-init-scripts/01.sh /script/01.sh &&
cp /tmp-init-scripts/02.sh /script/02.sh &&
cp /tmp-init-scripts/schemas.ldif /script/schemas.ldif
chmod +x /script/01.sh
chmod +x /script/02.sh
{{- if .Values.global.existingSecret }}
Expand Down

0 comments on commit 4a9abcc

Please sign in to comment.