From 29bca00325eb367114aa00ab52137fd66f89bb07 Mon Sep 17 00:00:00 2001 From: Chen Tao Date: Thu, 28 Dec 2023 16:35:20 +0800 Subject: [PATCH] fix(yurt-manager): add clusterrole for nodes/status subresources (#1884) --- .../templates/yurt-manager-auto-generated.yaml | 10 ++++++++++ .../nodelifecycle/node_lifecycle_controller.go | 2 ++ 2 files changed, 12 insertions(+) diff --git a/charts/yurt-manager/templates/yurt-manager-auto-generated.yaml b/charts/yurt-manager/templates/yurt-manager-auto-generated.yaml index 8f871137e7c..1e9a755be71 100644 --- a/charts/yurt-manager/templates/yurt-manager-auto-generated.yaml +++ b/charts/yurt-manager/templates/yurt-manager-auto-generated.yaml @@ -317,6 +317,16 @@ rules: - patch - update - watch +- apiGroups: + - "" + resources: + - nodes/status + verbs: + - get + - list + - patch + - update + - watch - apiGroups: - "" resources: diff --git a/pkg/yurtmanager/controller/nodelifecycle/node_lifecycle_controller.go b/pkg/yurtmanager/controller/nodelifecycle/node_lifecycle_controller.go index 22e6e81e41c..038fb98f81b 100644 --- a/pkg/yurtmanager/controller/nodelifecycle/node_lifecycle_controller.go +++ b/pkg/yurtmanager/controller/nodelifecycle/node_lifecycle_controller.go @@ -285,6 +285,8 @@ type ReconcileNodeLifeCycle struct { podUpdateQueue workqueue.RateLimitingInterface } +// +kubebuilder:rbac:groups=core,resources=nodes/status,verbs=get;list;watch;update;patch + // Add creates a new CsrApprover Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller // and Start it when the Manager is Started. func Add(ctx context.Context, cfg *appconfig.CompletedConfig, mgr manager.Manager) error {