From d600c55d782f567466439bb277656aab0cad2033 Mon Sep 17 00:00:00 2001 From: laurameng Date: Fri, 1 Apr 2022 12:41:08 -0400 Subject: [PATCH] wip spark testing --- scheduler/src/cook/kubernetes/api.clj | 31 ++++++++++++++++----------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/scheduler/src/cook/kubernetes/api.clj b/scheduler/src/cook/kubernetes/api.clj index 17367d4996..c3adee7f18 100644 --- a/scheduler/src/cook/kubernetes/api.clj +++ b/scheduler/src/cook/kubernetes/api.clj @@ -1335,19 +1335,24 @@ (defn job-label->pod-annotations "Given a job, return all pod annotations configured based on the job's labels" [job] - (let [{:keys [job-label-to-pod-annotation-map job-label-to-pod-annotation-lookup-key]} (config/kubernetes) - requested-pod-annotations - (if job-label-to-pod-annotation-lookup-key - (-> job - (tools/job-ent->label) - (get job-label-to-pod-annotation-lookup-key "") - ; the user can pass us multiple comma-separated values - (str/split #",")) - "")] - (->> requested-pod-annotations - (select-keys job-label-to-pod-annotation-map) - (vals) - (into {})))) + ({ + "ad.datadog.com/required-cook-job-container.check_names" "spark" + "ad.datadog.com/required-cook-job-container.init_configs" "{}" + "ad.datadog.com/required-cook-job-container.instances" "{\"spark_url\": \"%%host%%:8080\", \"cluster_name\": \"test-spark-cluster\"}" + }) + ;(let [{:keys [job-label-to-pod-annotation-map job-label-to-pod-annotation-lookup-key]} (config/kubernetes) + ; requested-pod-annotations + ; (if job-label-to-pod-annotation-lookup-key + ; (-> job + ; (tools/job-ent->label) + ; (get job-label-to-pod-annotation-lookup-key "") + ; ; the user can pass us multiple comma-separated values + ; (str/split #",")) + ; "")] + ; (->> requested-pod-annotations + ; (select-keys job-label-to-pod-annotation-map) + ; (vals) + ; (into {})))) (defn ^V1Pod task-metadata->pod "Given a task-request and other data generate the kubernetes V1Pod to launch that task."