Skip to content

Commit

Permalink
extend the ability to set more ldap parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
edevosc2c committed Dec 1, 2023
1 parent b61a0f0 commit 6e2f87d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion georchestra-backup-ldap/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.4
version: 0.1.5

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
10 changes: 5 additions & 5 deletions georchestra-backup-ldap/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ spec:
command: ["/bin/bash", "-c"]
args:
- |
/usr/bin/ldapsearch -H {{ $ldapTargetConfiguration.service }} -xLLL -D "cn=admin,{{ $ldapTargetConfiguration.baseDC }}" -w {{ $ldapTargetConfiguration.secret }} -b "ou=users,{{ $ldapTargetConfiguration.baseDC }}" > /backup/ldap-$(date +"%s").ldif;
/usr/bin/ldapsearch -H {{ $ldapTargetConfiguration.service }} -xLLL -D "cn=admin,{{ $ldapTargetConfiguration.baseDC }}" -w {{ $ldapTargetConfiguration.secret }} -b "ou=pendingusers,{{ $ldapTargetConfiguration.baseDC }}" >> /backup/ldap-$(date +"%s").ldif;
/usr/bin/ldapsearch -H {{ $ldapTargetConfiguration.service }} -xLLL -D "cn=admin,{{ $ldapTargetConfiguration.baseDC }}" -w {{ $ldapTargetConfiguration.secret }} -b "ou=orgs,{{ $ldapTargetConfiguration.baseDC }}" >> /backup/ldap-$(date +"%s").ldif;
/usr/bin/ldapsearch -H {{ $ldapTargetConfiguration.service }} -xLLL -D "cn=admin,{{ $ldapTargetConfiguration.baseDC }}" -w {{ $ldapTargetConfiguration.secret }} -b "ou=pendingorgs,{{ $ldapTargetConfiguration.baseDC }}" >> /backup/ldap-$(date +"%s").ldif;
/usr/bin/ldapsearch -H {{ $ldapTargetConfiguration.service }} -xLLL -D "cn=admin,{{ $ldapTargetConfiguration.baseDC }}" -w {{ $ldapTargetConfiguration.secret }} -b "ou=roles,{{ $ldapTargetConfiguration.baseDC }}" >> /backup/ldap-$(date +"%s").ldif;
/usr/bin/ldapsearch -H {{ $ldapTargetConfiguration.service }} -xLLL -D "{{ $ldapTargetConfiguration.adminDn }}" -w {{ $ldapTargetConfiguration.secret }} -b "{{ $ldapTargetConfiguration.usersRdn }},{{ $ldapTargetConfiguration.baseDn }}" > /backup/ldap-$(date +"%s").ldif;
/usr/bin/ldapsearch -H {{ $ldapTargetConfiguration.service }} -xLLL -D "{{ $ldapTargetConfiguration.adminDn }}" -w {{ $ldapTargetConfiguration.secret }} -b "{{ $ldapTargetConfiguration.pendingusersRdn }},{{ $ldapTargetConfiguration.baseDn }}" >> /backup/ldap-$(date +"%s").ldif;
/usr/bin/ldapsearch -H {{ $ldapTargetConfiguration.service }} -xLLL -D "{{ $ldapTargetConfiguration.adminDn }}" -w {{ $ldapTargetConfiguration.secret }} -b "{{ $ldapTargetConfiguration.orgs }},{{ $ldapTargetConfiguration.baseDn }}" >> /backup/ldap-$(date +"%s").ldif;
/usr/bin/ldapsearch -H {{ $ldapTargetConfiguration.service }} -xLLL -D "{{ $ldapTargetConfiguration.adminDn }}" -w {{ $ldapTargetConfiguration.secret }} -b "{{ $ldapTargetConfiguration.pendingorgs }},{{ $ldapTargetConfiguration.baseDn }}" >> /backup/ldap-$(date +"%s").ldif;
/usr/bin/ldapsearch -H {{ $ldapTargetConfiguration.service }} -xLLL -D "{{ $ldapTargetConfiguration.adminDn }}" -w {{ $ldapTargetConfiguration.secret }} -b "{{ $ldapTargetConfiguration.roles }},{{ $ldapTargetConfiguration.baseDn }}" >> /backup/ldap-$(date +"%s").ldif;
cd /backup && rm `ls -t | awk 'NR>{{ .Values.configuration.keepLastBackups }}'`
{{- with $job.resources }}
resources:
Expand Down
11 changes: 10 additions & 1 deletion georchestra-backup-ldap/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,18 @@ job:
configuration:
keepLastBackups: "10"
ldapTarget:
# the url to the ldap kubernetes service
service: "ldap://georchestra-ldap-svc:389"
# ldap secret - the password set in helm chart georchestra for adminPassword
secret: "secret"
baseDC: "dc=georchestra,dc=org"
# same as helm chart georchestra values
baseDn: "dc=georchestra,dc=org"
adminDn: "cn=admin,dc=georchestra,dc=org"
usersRdn: "ou=users"
pendingusersRdn: "ou=pendingusers"
rolesRdn: "ou=roles"
orgsRdn: "ou=orgs"
pendingorgs: "ou=pendingorgs"

persistence:
## Persistent Volume Storage Class
Expand Down

0 comments on commit 6e2f87d

Please sign in to comment.