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

Commit d600c55

Browse files
committed
wip spark testing
1 parent 2a6c7f6 commit d600c55

File tree

1 file changed

+18
-13
lines changed
  • scheduler/src/cook/kubernetes

1 file changed

+18
-13
lines changed

scheduler/src/cook/kubernetes/api.clj

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,19 +1335,24 @@
13351335
(defn job-label->pod-annotations
13361336
"Given a job, return all pod annotations configured based on the job's labels"
13371337
[job]
1338-
(let [{:keys [job-label-to-pod-annotation-map job-label-to-pod-annotation-lookup-key]} (config/kubernetes)
1339-
requested-pod-annotations
1340-
(if job-label-to-pod-annotation-lookup-key
1341-
(-> job
1342-
(tools/job-ent->label)
1343-
(get job-label-to-pod-annotation-lookup-key "")
1344-
; the user can pass us multiple comma-separated values
1345-
(str/split #","))
1346-
"")]
1347-
(->> requested-pod-annotations
1348-
(select-keys job-label-to-pod-annotation-map)
1349-
(vals)
1350-
(into {}))))
1338+
({
1339+
"ad.datadog.com/required-cook-job-container.check_names" "spark"
1340+
"ad.datadog.com/required-cook-job-container.init_configs" "{}"
1341+
"ad.datadog.com/required-cook-job-container.instances" "{\"spark_url\": \"%%host%%:8080\", \"cluster_name\": \"test-spark-cluster\"}"
1342+
})
1343+
;(let [{:keys [job-label-to-pod-annotation-map job-label-to-pod-annotation-lookup-key]} (config/kubernetes)
1344+
; requested-pod-annotations
1345+
; (if job-label-to-pod-annotation-lookup-key
1346+
; (-> job
1347+
; (tools/job-ent->label)
1348+
; (get job-label-to-pod-annotation-lookup-key "")
1349+
; ; the user can pass us multiple comma-separated values
1350+
; (str/split #","))
1351+
; "")]
1352+
; (->> requested-pod-annotations
1353+
; (select-keys job-label-to-pod-annotation-map)
1354+
; (vals)
1355+
; (into {}))))
13511356

13521357
(defn ^V1Pod task-metadata->pod
13531358
"Given a task-request and other data generate the kubernetes V1Pod to launch that task."

0 commit comments

Comments
 (0)