Skip to content

Commit

Permalink
add value dbpMoodle.backup.s3_certificate_path & dbpMoodle.backup.s3_…
Browse files Browse the repository at this point in the history
…certificate_key to be able to include a certificate for s3 endpoints with self signed certificates for backup/restore jobs
  • Loading branch information
JannikBadenhop committed Nov 22, 2024
1 parent f3c84c6 commit 4d40dc4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions charts/dbp-moodle/scripts/restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4d40dc4

Please sign in to comment.