From cf1ed93a97c926335af5a27d4976a6c307f35edb Mon Sep 17 00:00:00 2001 From: xuezhaojun Date: Tue, 19 Dec 2023 23:20:35 +0800 Subject: [PATCH] Add delete manifestwork permission for cluster-proxy-addon. (#556) Signed-off-by: xuezhaojun --- .../toggle/cluster-proxy-addon/templates/clusterrole.yaml | 1 + pkg/templates/rbac_gen.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/templates/charts/toggle/cluster-proxy-addon/templates/clusterrole.yaml b/pkg/templates/charts/toggle/cluster-proxy-addon/templates/clusterrole.yaml index 0f9d165f0..7e75e06b2 100644 --- a/pkg/templates/charts/toggle/cluster-proxy-addon/templates/clusterrole.yaml +++ b/pkg/templates/charts/toggle/cluster-proxy-addon/templates/clusterrole.yaml @@ -117,6 +117,7 @@ rules: - create - update - patch + - delete - apiGroups: - coordination.k8s.io resources: diff --git a/pkg/templates/rbac_gen.go b/pkg/templates/rbac_gen.go index 9428c0c03..755dedaf1 100644 --- a/pkg/templates/rbac_gen.go +++ b/pkg/templates/rbac_gen.go @@ -325,7 +325,7 @@ package main //+kubebuilder:rbac:groups=work.open-cluster-management.io,resources=manifestworks,verbs=create;update;get;list;watch;delete;deletecollection;patch //+kubebuilder:rbac:groups=work.open-cluster-management.io,resources=manifestworks,verbs=get;list;watch //+kubebuilder:rbac:groups=work.open-cluster-management.io,resources=manifestworks,verbs=get;list;watch;create;update;delete;deletecollection;patch;execute-as -//+kubebuilder:rbac:groups=work.open-cluster-management.io,resources=manifestworks,verbs=get;list;watch;create;update;patch +//+kubebuilder:rbac:groups=work.open-cluster-management.io,resources=manifestworks,verbs=get;list;watch;create;update;patch;delete //+kubebuilder:rbac:groups=work.open-cluster-management.io,resources=manifestworks,verbs=get;list;watch;update //+kubebuilder:rbac:groups=work.open-cluster-management.io,resources=manifestworks/status;manifestworkreplicasets/status,verbs=update;patch //+kubebuilder:rbac:groups=work.open-cluster-management.io,resources=manifestworks;manifestworks/finalizers,verbs=create;delete;get;list;patch;update;watch