diff --git a/image/tools/entrypoint.sh b/image/tools/entrypoint.sh index cbf816c..6c364cf 100755 --- a/image/tools/entrypoint.sh +++ b/image/tools/entrypoint.sh @@ -29,7 +29,9 @@ if [[ -z "$component" ]]; then fi source "$DIR/lib/backend/$archive_backend.sh" -source "$DIR/lib/encryption/$encryption_engine.sh" +if [[ -n "$encryption_engine" ]]; then + source "$DIR/lib/encryption/$encryption_engine.sh" +fi source "$DIR/lib/component/$component.sh" DATESTAMP=$(date '+%Y-%m-%d') @@ -41,9 +43,12 @@ export HOME=$DEST component_dump_data $DEST echo '==> Component data dump completed' encrypt_prepare $DEST -encrypted_files="$(encrypt_archive $ARCHIVES_DEST)" -echo "$encrypted_files" -echo '==> Data encryption completed' +if [[ -n "$encryption_engine" ]]; then + encrypted_files="$(encrypt_archive $ARCHIVES_DEST)" + echo '==> Data encryption completed' +else + encrypted_files="$ARCHIVES_DEST/*" +fi upload_archive $encrypted_files $DATESTAMP backups/$component echo '==> Archive upload completed' diff --git a/image/tools/lib/encryption/gpg.sh b/image/tools/lib/encryption/gpg.sh index 595e580..3880839 100644 --- a/image/tools/lib/encryption/gpg.sh +++ b/image/tools/lib/encryption/gpg.sh @@ -7,7 +7,7 @@ function encrypt_prepare { gpg --import $key_path gpg --list-keys } - + function encrypt_archive { dest=$1 diff --git a/templates/openshift/backup-cronjob-template.yaml b/templates/openshift/backup-cronjob-template.yaml index 7d6642c..d376528 100644 --- a/templates/openshift/backup-cronjob-template.yaml +++ b/templates/openshift/backup-cronjob-template.yaml @@ -55,7 +55,6 @@ parameters: value: s3 - name: ENCRYPTION description: Encryption engine to encrypt component archive before uploading it - value: gpg - name: COMPONENT_SECRET_NAME description: Component secret name to create environment variables from required: true diff --git a/templates/openshift/backup-job-template.yaml b/templates/openshift/backup-job-template.yaml index 4853bb9..c6d9c0d 100644 --- a/templates/openshift/backup-job-template.yaml +++ b/templates/openshift/backup-job-template.yaml @@ -47,7 +47,6 @@ parameters: value: s3 - name: ENCRYPTION description: Encryption engine to encrypt component archive before uploading it - value: gpg - name: COMPONENT_SECRET_NAME description: Component secret name to create environment variables from required: true