Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
BinamB committed Oct 22, 2024
1 parent 92f3dd1 commit eda0c17
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions kube/services/jobs/indexd-single-table-migration-job.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit eda0c17

Please sign in to comment.