From 4d40dc4b2b06d7eb3b02b64961c5a73f93f2e09f Mon Sep 17 00:00:00 2001 From: Jannik Badenhop Date: Fri, 22 Nov 2024 10:36:03 +0000 Subject: [PATCH] add value dbpMoodle.backup.s3_certificate_path & dbpMoodle.backup.s3_certificate_key to be able to include a certificate for s3 endpoints with self signed certificates for backup/restore jobs --- charts/dbp-moodle/scripts/restore.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/charts/dbp-moodle/scripts/restore.sh b/charts/dbp-moodle/scripts/restore.sh index 9bd0160..f2a5566 100644 --- a/charts/dbp-moodle/scripts/restore.sh +++ b/charts/dbp-moodle/scripts/restore.sh @@ -20,6 +20,11 @@ health_file="/tmp/healthy" # Create liveness probe file touch "${health_file}" +{{ if and .Values.dbpMoodle.backup.s3_certificate_path .Values.dbpMoodle.backup.s3_certificate_key }} +printf "Appendending custom certificate (%s/%s) to /etc/ssl/certs/ca-certificates.crt\n" "{{ .Values.dbpMoodle.backup.s3_certificate_path }}" "{{ .Values.dbpMoodle.backup.s3_certificate_key }}" +cat "{{ .Values.dbpMoodle.backup.s3_certificate_path }}/{{ .Values.dbpMoodle.backup.s3_certificate_key }}" >> /etc/ssl/certs/ca-certificates.crt +{{ end }} + # Deployment has "-moodle" appended if the Release.Name does not contain "moodle" deployment_name="{{ .Release.Name }}" if [[ "$deployment_name" != "moodle" && "$deployment_name" != *"moodle"* ]]; then