From 1bc154df3802f22f27e449dc72ca1cfcf59fadeb Mon Sep 17 00:00:00 2001 From: qiuming520 Date: Fri, 13 Oct 2023 16:16:26 +0800 Subject: [PATCH] fix kosmos-scheduler miss lease permission Signed-off-by: qiuming520 --- deploy/scheduler/deployment.yaml | 4 +++- deploy/scheduler/rbac.yaml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/deploy/scheduler/deployment.yaml b/deploy/scheduler/deployment.yaml index c92742e3b..8acc679c2 100644 --- a/deploy/scheduler/deployment.yaml +++ b/deploy/scheduler/deployment.yaml @@ -25,8 +25,10 @@ spec: - name: kosmos-scheduler image: ghcr.io/kosmos-io/scheduler:0.0.2 command: - - /scheduler + - scheduler - --leader-elect=true + - --leader-elect-resource-name=kosmos-scheduler + - --leader-elect-resource-namespace=kosmos-system - --config=/etc/kubernetes/kube-scheduler/scheduler-config.yaml resources: requests: diff --git a/deploy/scheduler/rbac.yaml b/deploy/scheduler/rbac.yaml index 5f9aa3ddb..4ac773d6c 100644 --- a/deploy/scheduler/rbac.yaml +++ b/deploy/scheduler/rbac.yaml @@ -49,6 +49,7 @@ rules: - leases resourceNames: - kube-scheduler + - kosmos-scheduler - verbs: - create apiGroups: