diff --git a/manifests/install/charts/as-a-second-scheduler/templates/deployment.yaml b/manifests/install/charts/as-a-second-scheduler/templates/deployment.yaml index 067393ac3..e926f9f2b 100644 --- a/manifests/install/charts/as-a-second-scheduler/templates/deployment.yaml +++ b/manifests/install/charts/as-a-second-scheduler/templates/deployment.yaml @@ -21,6 +21,10 @@ spec: serviceAccountName: {{ .Values.controller.name }} containers: - name: scheduler-plugins-controller + args: + {{- if .Values.controller.leaderElect }} + - --enableLeaderElection + {{- end }} image: {{ .Values.controller.image }} imagePullPolicy: IfNotPresent {{- with .Values.controller.resources }} diff --git a/manifests/install/charts/as-a-second-scheduler/templates/rbac.yaml b/manifests/install/charts/as-a-second-scheduler/templates/rbac.yaml index 9025fa601..e01682dbc 100644 --- a/manifests/install/charts/as-a-second-scheduler/templates/rbac.yaml +++ b/manifests/install/charts/as-a-second-scheduler/templates/rbac.yaml @@ -104,6 +104,9 @@ rules: - apiGroups: [""] resources: ["events"] verbs: ["create", "patch", "update"] +- apiGroups: ["coordination.k8s.io"] + resources: ["leases"] + verbs: ["create", "get", "update"] - apiGroups: [""] resources: ["nodes"] verbs: ["get", "list", "watch", "patch"] diff --git a/manifests/install/charts/as-a-second-scheduler/values.yaml b/manifests/install/charts/as-a-second-scheduler/values.yaml index 4b036c256..5f5531d1c 100644 --- a/manifests/install/charts/as-a-second-scheduler/values.yaml +++ b/manifests/install/charts/as-a-second-scheduler/values.yaml @@ -19,6 +19,7 @@ controller: name: scheduler-plugins-controller image: registry.k8s.io/scheduler-plugins/controller:v0.30.6 replicaCount: 1 + leaderElect: false priorityClassName: "" resources: {} nodeSelector: {}