Skip to content
This repository was archived by the owner on Apr 24, 2023. It is now read-only.

Commit cbe92f5

Browse files
author
Scott Crosby
committed
Gross hack
1 parent 3a747a1 commit cbe92f5

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

  • scheduler/src/cook/kubernetes

scheduler/src/cook/kubernetes/api.clj

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,7 +1581,15 @@
15811581
(when use-checkpoint-injection?
15821582
(let [{:keys [command]} checkpoint-container
15831583
container (V1Container.)
1584-
resources (V1ResourceRequirements.)]
1584+
resources (V1ResourceRequirements.)
1585+
; Gross hack becuase init containers are running in the wrong order, fetch the tickets early.
1586+
ticket-volumemount
1587+
(doto (V1VolumeMount.)
1588+
(.setName "kerberos-ticket-volume")
1589+
(.setMountPath "/var/secret")
1590+
(.readOnly true))
1591+
]
1592+
15851593
; container
15861594
(.setName container cook-container-name-for-checkpoint-injection)
15871595
(.setImage container image)
@@ -1590,7 +1598,8 @@
15901598
(.setWorkingDir container init-container-workdir)
15911599
(.setEnv container main-env-vars)
15921600
(.setVolumeMounts container (filterv some? (concat [(init-container-workdir-volume-mount-fn false)
1593-
(scratch-space-volume-mount-fn false)]
1601+
(scratch-space-volume-mount-fn false)
1602+
ticket-volumemount]
15941603
init-container-checkpoint-volume-mounts)))
15951604
(set-mem-cpu-resources resources total-memory-request total-memory-limit total-cpu-request total-cpu-limit)
15961605
(.setResources container resources)

0 commit comments

Comments
 (0)