diff --git a/georchestra-backup-ldap/Chart.yaml b/georchestra-backup-ldap/Chart.yaml index d6694cf..d4ee7e7 100644 --- a/georchestra-backup-ldap/Chart.yaml +++ b/georchestra-backup-ldap/Chart.yaml @@ -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 diff --git a/georchestra-backup-ldap/templates/cronjob.yaml b/georchestra-backup-ldap/templates/cronjob.yaml index 1b0a1c9..cad4935 100644 --- a/georchestra-backup-ldap/templates/cronjob.yaml +++ b/georchestra-backup-ldap/templates/cronjob.yaml @@ -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: diff --git a/georchestra-backup-ldap/values.yaml b/georchestra-backup-ldap/values.yaml index 87f54f8..e990558 100644 --- a/georchestra-backup-ldap/values.yaml +++ b/georchestra-backup-ldap/values.yaml @@ -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