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

Add backup storage location to velero backup

parent 01a846b4
No related branches found
No related tags found
No related merge requests found
Pipeline #4606308 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