Skip to content

Commit

Permalink
Add priority class
Browse files Browse the repository at this point in the history
  • Loading branch information
BinamB committed Oct 15, 2024
1 parent 9671171 commit 92f3dd1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
14 changes: 7 additions & 7 deletions kube/services/jobs/indexd-single-table-migration-job.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Setup for running this migration https://github.com/uc-cdis/indexd/blob/master/docs/migration_to_single_table_indexd.md
apiVersion: batch/v1
kind: PriorityClass
kind: Job
metadata:
name: indexd-single-table-migration
preemtionPolicy: Never
spec:
template:
metadata:
labels:
app: gen3job
spec:
priorityClassName: indexd-single-table-migration-priority # Assigning the priority class
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
Expand Down Expand Up @@ -46,13 +46,13 @@ spec:
GEN3_INDEXD_IMAGE
env:
- name: START_DID
GEN3_START_DID |-value: ""-|
GEN3_START_DID|-value: ""-|
- name: BATCH_SIZE
GEN3_BATCH_SIZE |-value: ""-|
GEN3_BATCH_SIZE|-value: ""-|
- name: OFFSET_VALUE
GEN3_OFFSET_VALUE |-value: ""-|
GEN3_OFFSET_VALUE|-value: ""-|
- name: USE_DEFAULT_CREDS
GEN3_USE_DEFAULT_CREDS |-value: "True"-|
GEN3_USE_DEFAULT_CREDS|-value: "false"-|
volumeMounts:
- name: "config-volume"
readOnly: true
Expand Down Expand Up @@ -82,7 +82,7 @@ spec:
if [[ -n "$USE_DEFAULT_CREDS" == "false" ]]; then
flags="--creds-file /var/www/indexd/creds_new.json"
else
flags="--creds-file /var/www/indexd/creds_new.json"
flags="--creds-file /var/www/indexd/creds.json"
fi
if [[ -n "$START_DID" ]]; then
flags="$flags --start-did $START_DID"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: indexd-single-table-migration-priority
value: 100000 # High value for high priority
globalDefault: false
description: "Priority class for Indexd migration job"

0 comments on commit 92f3dd1

Please sign in to comment.