Skip to content

Commit

Permalink
rework the way args are used
Browse files Browse the repository at this point in the history
  • Loading branch information
edevosc2c committed Dec 1, 2023
1 parent 17cfbb5 commit 5f1d966
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 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.1
version: 0.1.2

# 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
16 changes: 8 additions & 8 deletions georchestra-backup-ldap/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ spec:
volumeMounts:
- mountPath: /backup
name: backup
command: ["/bin/bash"]
command: ["/bin/bash", "-c"]
args:
- -c
- /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;
- rm `ls -t /backup | awk 'NR>{{ .Values.configuration.keepLastBackups }}'`
- |
/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;
cd /backup rm `ls -t | awk 'NR>{{ .Values.configuration.keepLastBackups }}'`
{{- with $job.resources }}
resources:
{{ toYaml . | indent 14 }}
Expand Down

0 comments on commit 5f1d966

Please sign in to comment.