From f38bf3a1972589e7b009c3e4ba2b96ad36ccb6df Mon Sep 17 00:00:00 2001 From: Eric Stroczynski Date: Mon, 9 Nov 2020 21:52:44 -0800 Subject: [PATCH] This commit adds leases.coordination.k8s.io to the leader-election-role Role under the same rule as configmaps. These permissions are required by default by controller-runtime's leader election, which uses configmapsleases as the default election type. go/v3-alpha: add leases.coordination.k8s.io to leader election RBAC --- .../internal/templates/config/rbac/leader_election_role.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/plugin/v3/scaffolds/internal/templates/config/rbac/leader_election_role.go b/pkg/plugin/v3/scaffolds/internal/templates/config/rbac/leader_election_role.go index 065e790a1b2..acdef4c0291 100644 --- a/pkg/plugin/v3/scaffolds/internal/templates/config/rbac/leader_election_role.go +++ b/pkg/plugin/v3/scaffolds/internal/templates/config/rbac/leader_election_role.go @@ -48,8 +48,10 @@ metadata: rules: - apiGroups: - "" + - coordination.k8s.io resources: - configmaps + - leases verbs: - get - list