From 0382c4faab89352b8b7ea80a3e83860eba68a97c Mon Sep 17 00:00:00 2001 From: Maskym Vavilov Date: Thu, 21 Dec 2023 12:06:53 +0000 Subject: [PATCH] test --- config/policy-controller/rbac/role.yaml | 8 ++++++++ pkg/controllers/dnspolicy/dnspolicy_controller.go | 1 + 2 files changed, 9 insertions(+) diff --git a/config/policy-controller/rbac/role.yaml b/config/policy-controller/rbac/role.yaml index 6c0ad91f..81909ce5 100644 --- a/config/policy-controller/rbac/role.yaml +++ b/config/policy-controller/rbac/role.yaml @@ -41,6 +41,14 @@ rules: - get - list - watch +- apiGroups: + - cluster.open-cluster-management.io + resources: + - managedclusters + verbs: + - get + - list + - watch - apiGroups: - gateway.networking.k8s.io resources: diff --git a/pkg/controllers/dnspolicy/dnspolicy_controller.go b/pkg/controllers/dnspolicy/dnspolicy_controller.go index ebdf574f..bcba1eb3 100644 --- a/pkg/controllers/dnspolicy/dnspolicy_controller.go +++ b/pkg/controllers/dnspolicy/dnspolicy_controller.go @@ -64,6 +64,7 @@ type DNSPolicyReconciler struct { //+kubebuilder:rbac:groups=kuadrant.io,resources=dnspolicies,verbs=get;list;watch;update;patch;delete //+kubebuilder:rbac:groups=kuadrant.io,resources=dnspolicies/status,verbs=get;update;patch //+kubebuilder:rbac:groups=kuadrant.io,resources=dnspolicies/finalizers,verbs=update +//+kubebuilder:rbac:groups=cluster.open-cluster-management.io,resources=managedclusters,verbs=get;list;watch //+kubebuilder:rbac:groups=gateway.networking.k8s.io,resources=gateways,verbs=get;list;watch;update;patch //+kubebuilder:rbac:groups=gateway.networking.k8s.io,resources=gateways/status,verbs=get;update;patch //+kubebuilder:rbac:groups=gateway.networking.k8s.io,resources=gateways/finalizers,verbs=update