Skip to content

Commit

Permalink
fix(etcd-backup): mount CA as file directly
Browse files Browse the repository at this point in the history
Signed-off-by: Valentin Maillot <[email protected]>
  • Loading branch information
vmaillot committed Mar 26, 2024
1 parent 8da5063 commit 4046c12
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 6 additions & 0 deletions backup-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,9 @@ spec:
- name: volume-backup
persistentVolumeClaim:
claimName: etcd-backup-pvc
- name: custom-ca
configMap:
name: backup-config
items:
- key: OCP_BACKUP_S3_CA
path: /etc/pki/ca-trust/source/anchors/ca.crt
7 changes: 2 additions & 5 deletions backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,8 @@ set -xeuo pipefail
if [ "${OCP_BACKUP_S3}" = "true" ]; then
# prepare & push backup to S3

# add custom CA if any and update CA trust
if [ "${OCP_BACKUP_S3_CA}" ]; then
echo -n "${OCP_BACKUP_S3_CA}" > /etc/pki/ca-trust/source/anchors/ca.crt
update-ca-trust
fi
# update CA trust
update-ca-trust

# configure mcli assuming the bucket already exists
bash +o history
Expand Down

0 comments on commit 4046c12

Please sign in to comment.