       (when exceeded-restart-kill-threshold?
         (try
           (if (leader?-fn)
-            (kill-restart-threshold-exceeded-pod scheduler-config instance)
+            (kill-restart-threshold-exceeded-pod scheduler instance)
             (log/info "skipping deleting frequently restarting pod on non-leader"
                       {:pod-name pod-name :restart-count primary-container-restart-count :service-id service-id}))
           (catch Throwable e

                        watch-connect-timeout-ms (assoc :connect-timeout-ms watch-connect-timeout-ms)
                        watch-socket-timeout-ms (assoc :socket-timeout-ms watch-socket-timeout-ms))
        watch-state (atom nil)
        scheduler-config {:api-server-url url
                          :cluster-name cluster-name
                          :container-running-grace-secs container-running-grace-secs
                          :http-client http-client
                          :leader?-fn leader?-fn
                          :replicaset-api-version replicaset-api-version
                          :restart-expiry-threshold restart-expiry-threshold
                          :restart-kill-threshold restart-kill-threshold
                          :service-id->failed-instances-transient-store service-id->failed-instances-transient-store
                          :watch-state watch-state}
        get-service->instances-fn #(get-service->instances scheduler-config)
        {:keys [retrieve-syncer-state-fn]} (start-scheduler-syncer-fn
                                             scheduler-name
                                             get-service->instances-fn

   when a new pod failure is listed in the given pod's lastState container status.
   Note that unique instance-ids are deterministically generated each time the pod is restarted
   by passing the pod's restartCount value to the pod->instance-id function."
  [{:keys [service-id] :as live-instance} {:keys [service-id->failed-instances-transient-store] :as scheduler} pod]
  (try
    (let [primary-container-status (get-in pod [:status :containerStatuses 0])]
      (when-let [newest-failure (get-in primary-container-status [:lastState :terminated])]
