<commit_before>{:agent-query-cache {:ttl-ms 1000}
 :authorization {;; Note that internally, Cook will select :http-basic if it's set to true,
                 ;; and fall back to :one-user only if :http-basic is false.
                 :http-basic #config/env-bool "COOK_HTTP_BASIC_AUTH"
                 :one-user #config/env "COOK_ONE_USER_AUTH"}
 :authorization-config {;; These users have admin privileges when using configfile-admins-auth;
                        ;; e.g., they can view and modify other users' jobs.
                        ;; Sets "admin" and the user defined in "COOK_ONE_USER_AUTH" to be admins for local development.
                        :admins #{"admin" #config/env "COOK_ONE_USER_AUTH"}
                        ;; What function should be used to perform user authorization?
                        ;; See the docstring in cook.rest.authorization for details.
                        :authorization-fn cook.rest.authorization/configfile-admins-auth-open-gets
                        ;; users that are allowed to do things on behalf of others
                        :impersonators #{"poser" "other-impersonator"}}
 :mesos {:leader-path "/cook-scheduler"
         ; because the minikube users and the local users may have different IDs, tests that require file permissions
         ; (like test_default_container_volumes) will fail without this set.
         :run-as-user "root"
         ; not related to mesos, but needed to enable gpu-support for GKE
         :enable-gpu-support true}
 :compute-clusters []
 :compute-cluster-options
 {:compute-cluster-templates
  {"gke-1"
   {:factory-fn cook.kubernetes.compute-cluster/factory-fn
    :config {:dynamic-cluster-config? true
             ;; Location of the kubernetes config file. Hardcoded to the location specified by bin/make-gke-test-cluster
             :config-file "../scheduler/.cook_kubeconfig_1"
             :compute-cluster-launch-rate-limits {:expire-minutes 1200
                                                                   :enforce? true
                                                                   :bucket-size 10000
                                                                   :tokens-replenished-per-minute 5000}
                              :synthetic-pods {:image "gcr.io/google-containers/alpine-with-bash:1.0"
                              :max-pods-outstanding 128
                              :user #config/env "USER"
                              :command "exit 0"
                              :pools #{"k8s-alpha" "k8s-gamma"}}
             :node-blocklist-labels ["blocklist-nodes-with-this-label-key"]
             :use-google-service-account? false
             ;; Used to work around auth problems after upgrading k8s client library to 7.0.0
             :verifying-ssl false}}
   "gke-2"
   {:factory-fn cook.kubernetes.compute-cluster/factory-fn
    :config {:dynamic-cluster-config? true
             ;; Location of the kubernetes config file. Hardcoded to the location specified by bin/make-gke-test-cluster
             :config-file "../scheduler/.cook_kubeconfig_2"
                              :compute-cluster-launch-rate-limits {:expire-minutes 1200
                                                                   :enforce? true
                                                                   :bucket-size 10000
                                                                   :tokens-replenished-per-minute 5000}
             :synthetic-pods {:image "gcr.io/google-containers/alpine-with-bash:1.0"
                              :max-pods-outstanding 128
                              :user #config/env "USER"
                              :command "exit 0"
                              :pools #{"k8s-alpha"}}
             :node-blocklist-labels ["blocklist-nodes-with-this-label-key-1" "blocklist-nodes-with-this-label-key-2"]
             :use-google-service-account? false
             ;; Used to work around auth problems after upgrading k8s client library to 7.0.0
             :verifying-ssl false}}}
  :load-clusters-on-startup? true
  :new-cluster-configurations-fn cook.compute-cluster/dummy-cluster-configurations-fn-memo
  :cluster-update-period-seconds 5
  :compute-cluster-configurations [{:name "gke-1"
                                    :template "gke-1"
                                    ;; Location of the kubernetes config file. Hardcoded to the location specified by bin/make-gke-test-cluster
                                    :config-file "../scheduler/.cook_kubeconfig_1"
                                    :state :running
                                    :state-locked? false}
                                   {:name "gke-2"
                                    :template "gke-2"
                                    ;; Location of the kubernetes config file. Hardcoded to the location specified by bin/make-gke-test-cluster
                                    :config-file "../scheduler/.cook_kubeconfig_2"
                                    :state :running
                                    :state-locked? false}]}
 :cors-origins ["https?://cors.example.com"]
 :database {:datomic-uri #config/env "COOK_DATOMIC_URI"}
 :plugins {:job-submission-validator {:batch-timeout-seconds 40
                                      :factory-fn "cook.plugins.demo-plugin/submission-factory"}
           :job-launch-filter {:age-out-last-seen-deadline-minutes 10
                               :age-out-first-seen-deadline-minutes 10000
                               :age-out-seen-count 10
                               :factory-fn "cook.plugins.demo-plugin/launch-factory"}}
 :hostname #config/env "COOK_HOSTNAME"
 :kubernetes {:add-job-label-to-pod-prefix "platform/"
              :disallowed-container-paths #{"/mnt/bad"}
              :disallowed-var-names #{"BADVAR"}
              :init-container {:command ["/bin/sh" "-c" "echo sample init container running"]
                               :image "byrnedo/alpine-curl:latest"}
              :sidecar {;; Note that Cook automatically appends the :port given below 
                        ;; as the last argument in this :command vector.
                        :command ["cook-sidecar" "--file-server-port"]
                        :health-check-endpoint "/readiness-probe"
                        :image "twosigma/cook-sidecar:latest"
                        :port 23906
                        :resource-requirements {:cpu-request 0.1
                                                :cpu-limit 0.1
                                                :memory-request 128.0}}
              :set-memory-limit? true}
 :log {:file #config/env "COOK_LOG_FILE"
       :levels {"datomic.db" :warn
                "datomic.kv-cluster" :warn
                "datomic.peer" :warn
                "cook.scheduler.data-locality" :debug
                "cook.scheduler.fenzo-utils" :debug
                "cook.scheduler.rebalancer" :debug
                "cook.scheduler.scheduler" :debug
                "cook.kubernetes.compute-cluster" :debug
                :default :info}}
 :metrics {:jmx true
           :user-metrics-interval-seconds 60}
 :nrepl {:enabled? true
         :port #config/env-int "COOK_NREPL_PORT"}
 :pools {:default "k8s-gamma"
         :job-resource-adjustment {:adjust-job-resources-fn cook.kubernetes.api/adjust-job-resources
                                   :pool-regex "^k8s-.+"}
         :default-containers<commit_msg>fix npe bug for sidecar mem limit (#1776)<commit_after>{:agent-query-cache {:ttl-ms 1000}
 :authorization {;; Note that internally, Cook will select :http-basic if it's set to true,
                 ;; and fall back to :one-user only if :http-basic is false.
                 :http-basic #config/env-bool "COOK_HTTP_BASIC_AUTH"
                 :one-user #config/env "COOK_ONE_USER_AUTH"}
 :authorization-config {;; These users have admin privileges when using configfile-admins-auth;
                        ;; e.g., they can view and modify other users' jobs.
                        ;; Sets "admin" and the user defined in "COOK_ONE_USER_AUTH" to be admins for local development.
                        :admins #{"admin" #config/env "COOK_ONE_USER_AUTH"}
                        ;; What function should be used to perform user authorization?
                        ;; See the docstring in cook.rest.authorization for details.
                        :authorization-fn cook.rest.authorization/configfile-admins-auth-open-gets
                        ;; users that are allowed to do things on behalf of others
                        :impersonators #{"poser" "other-impersonator"}}
 :mesos {:leader-path "/cook-scheduler"
         ; because the minikube users and the local users may have different IDs, tests that require file permissions
         ; (like test_default_container_volumes) will fail without this set.
         :run-as-user "root"
         ; not related to mesos, but needed to enable gpu-support for GKE
         :enable-gpu-support true}
 :compute-clusters []
 :compute-cluster-options
 {:compute-cluster-templates
  {"gke-1"
   {:factory-fn cook.kubernetes.compute-cluster/factory-fn
    :config {:dynamic-cluster-config? true
             ;; Location of the kubernetes config file. Hardcoded to the location specified by bin/make-gke-test-cluster
             :config-file "../scheduler/.cook_kubeconfig_1"
             :compute-cluster-launch-rate-limits {:expire-minutes 1200
                                                                   :enforce? true
                                                                   :bucket-size 10000
                                                                   :tokens-replenished-per-minute 5000}
                              :synthetic-pods {:image "gcr.io/google-containers/alpine-with-bash:1.0"
                              :max-pods-outstanding 128
                              :user #config/env "USER"
                              :command "exit 0"
                              :pools #{"k8s-alpha" "k8s-gamma"}}
             :node-blocklist-labels ["blocklist-nodes-with-this-label-key"]
             :use-google-service-account? false
             ;; Used to work around auth problems after upgrading k8s client library to 7.0.0
             :verifying-ssl false}}
   "gke-2"
   {:factory-fn cook.kubernetes.compute-cluster/factory-fn
    :config {:dynamic-cluster-config? true
             ;; Location of the kubernetes config file. Hardcoded to the location specified by bin/make-gke-test-cluster
             :config-file "../scheduler/.cook_kubeconfig_2"
                              :compute-cluster-launch-rate-limits {:expire-minutes 1200
                                                                   :enforce? true
                                                                   :bucket-size 10000
                                                                   :tokens-replenished-per-minute 5000}
             :synthetic-pods {:image "gcr.io/google-containers/alpine-with-bash:1.0"
                              :max-pods-outstanding 128
                              :user #config/env "USER"
                              :command "exit 0"
                              :pools #{"k8s-alpha"}}
             :node-blocklist-labels ["blocklist-nodes-with-this-label-key-1" "blocklist-nodes-with-this-label-key-2"]
             :use-google-service-account? false
             ;; Used to work around auth problems after upgrading k8s client library to 7.0.0
             :verifying-ssl false}}}
  :load-clusters-on-startup? true
  :new-cluster-configurations-fn cook.compute-cluster/dummy-cluster-configurations-fn-memo
  :cluster-update-period-seconds 5
  :compute-cluster-configurations [{:name "gke-1"
                                    :template "gke-1"
                                    ;; Location of the kubernetes config file. Hardcoded to the location specified by bin/make-gke-test-cluster
                                    :config-file "../scheduler/.cook_kubeconfig_1"
                                    :state :running
                                    :state-locked? false}
                                   {:name "gke-2"
                                    :template "gke-2"
                                    ;; Location of the kubernetes config file. Hardcoded to the location specified by bin/make-gke-test-cluster
                                    :config-file "../scheduler/.cook_kubeconfig_2"
                                    :state :running
                                    :state-locked? false}]}
 :cors-origins ["https?://cors.example.com"]
 :database {:datomic-uri #config/env "COOK_DATOMIC_URI"}
 :plugins {:job-submission-validator {:batch-timeout-seconds 40
                                      :factory-fn "cook.plugins.demo-plugin/submission-factory"}
           :job-launch-filter {:age-out-last-seen-deadline-minutes 10
                               :age-out-first-seen-deadline-minutes 10000
                               :age-out-seen-count 10
                               :factory-fn "cook.plugins.demo-plugin/launch-factory"}}
 :hostname #config/env "COOK_HOSTNAME"
 :kubernetes {:add-job-label-to-pod-prefix "platform/"
              :disallowed-container-paths #{"/mnt/bad"}
              :disallowed-var-names #{"BADVAR"}
              :init-container {:command ["/bin/sh" "-c" "echo sample init container running"]
                               :image "byrnedo/alpine-curl:latest"}
              :sidecar {;; Note that Cook automatically appends the :port given below 
                        ;; as the last argument in this :command vector.
                        :command ["cook-sidecar" "--file-server-port"]
                        :health-check-endpoint "/readiness-probe"
                        :image "twosigma/cook-sidecar:latest"
                        :port 23906
                        :resource-requirements {:cpu-request 0.1
                                                :cpu-limit 0.1
                                                :memory-request 128.0
                                                :memory-limit 128.0}}
              :set-memory-limit? true}
 :log {:file #config/env "COOK_LOG_FILE"
       :levels {"datomic.db" :warn
                "datomic.kv-cluster" :warn
                "datomic.peer" :warn
                "cook.scheduler.data-locality" :debug
                "cook.scheduler.fenzo-utils" :debug
                "cook.scheduler.rebalancer" :debug
                "cook.scheduler.scheduler" :debug
                "cook.kubernetes.compute-cluster" :debug
                :default :info}}
 :metrics {:jmx true
           :user-metrics-interval-seconds 60}
 :nrepl {:enabled? true
         :port #config/env-int "COOK_NREPL_PORT"}
 :pools {:default "k8s-gamma"
         :job-resource-adjustment {:adjust-job-resources-fn cook.kubernetes.api/adjust-job-resources
                                   :pool-regex "^k8s-.+"}
         :default-containers
{'fraction_non_alphanumeric': 0.09897565518158839, 'fraction_numerical': 0.013037115870693096, 'mean_word_length': 1.4102276370631612, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 62, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '482145', 'n_tokens_mistral': 4049, 'n_tokens_neox': 3697, 'n_words': 898}