From eda0c17cc550346aff396efabc2427250de03e66 Mon Sep 17 00:00:00 2001 From: BinamB Date: Tue, 22 Oct 2024 10:02:55 -0500 Subject: [PATCH] Add comments --- .../jobs/indexd-single-table-migration-job.yaml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/kube/services/jobs/indexd-single-table-migration-job.yaml b/kube/services/jobs/indexd-single-table-migration-job.yaml index 619463f85..f56c32010 100644 --- a/kube/services/jobs/indexd-single-table-migration-job.yaml +++ b/kube/services/jobs/indexd-single-table-migration-job.yaml @@ -1,4 +1,5 @@ # Setup for running this migration https://github.com/uc-cdis/indexd/blob/master/docs/migration_to_single_table_indexd.md +# Need to apply PriorityClass before running this job. Run kubectl apply -f indexd-single-table-migration-priority-class.yaml apiVersion: batch/v1 kind: Job metadata: @@ -79,20 +80,28 @@ spec: args: - "-c" - | - if [[ -n "$USE_DEFAULT_CREDS" == "false" ]]; then - flags="--creds-file /var/www/indexd/creds_new.json" + $flags="" + + if [[ "$USE_DEFAULT_CREDS" == "false" ]]; then + echo "Using new creds" + flags="$flags --creds-file /var/www/indexd/creds_new.json" else - flags="--creds-file /var/www/indexd/creds.json" + echo "using default creds" + flags="$flags --creds-file /var/www/indexd/creds.json" fi + if [[ -n "$START_DID" ]]; then flags="$flags --start-did $START_DID" fi + if [[ -n "$BATCH_SIZE" ]]; then flags="$flags --batch-size $BATCH_SIZE" fi + if [[ -n "$OFFSET_VALUE" ]]; then flags="$flags --start-offset $OFFSET_VALUE" fi + time python /indexd/bin/migrate_to_single_table.py $flags echo "Exit code: $?" restartPolicy: Never