Skip to content
Snippets Groups Projects
Commit 8ac361d6 authored by Vineet Reddy Rajula's avatar Vineet Reddy Rajula
Browse files

Merge branch 'schedule-backup-loc' into 'master'

Add backup storage location to velero backup

See merge request !22
parents d4009015 7b4e4b20
No related branches found
No related tags found
1 merge request!22Add backup storage location to velero backup
Pipeline #6750535 passed
......@@ -37,6 +37,7 @@ spec:
export RESOURCE_NAME=$NAMESPACE-$BACKUP_NAME-$TIMESTAMP_HASH
export PROJECT_HASH=$(printf '%s' "$NAMESPACE" | md5sum | awk '{print $1}')
export VELERO_NAMESPACE={{ .Values.veleroNamespace }}
export VELERO_BACKUP_STORAGE_LOCATION={{ .Values.veleroBackupStorageLocation }}
envsubst < /tekton-task-templates/backup_resource.yaml | oc create -f -
timeout 120s sh -c -- 'while [[ $(oc get "backup/$RESOURCE_NAME" -n "$VELERO_NAMESPACE" -o jsonpath='{.status.phase}') != "Completed" ]]; do printf "Backup in progress\n"; sleep 2s; done'
backupStatus=$(oc get backup/$RESOURCE_NAME -n $VELERO_NAMESPACE -o=jsonpath='{.status.phase}' | grep -i -E 'failed|completed|partiallyfailed' || echo "Failed")
......
image: gitlab-registry.cern.ch/drupal/paas/drupal-operations/openshift-cli:velero-restore
restoreServiceAccount: ""
veleroNamespace: ""
veleroBackupStorageLocation: "default"
......@@ -25,5 +25,6 @@ spec:
matchLabels:
app: drupal
drupalSite: $DRUPALSITE
storageLocation: $VELERO_BACKUP_STORAGE_LOCATION
ttl: 87600h0m0s # 10 years (prevent cleanup of on-demand backups)
status: {}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment