From 502c2ab9805d988cd5a3af1d97c8e7fc5e687d7a Mon Sep 17 00:00:00 2001 From: Zbynek Roubalik Date: Wed, 24 Apr 2024 20:43:25 +0200 Subject: [PATCH] add `flowcontrol.apiserver.k8s.io` to RBAC Signed-off-by: Zbynek Roubalik --- config/rbac/role.yaml | 8 ++++++++ controllers/keda/scaledobject_controller.go | 1 + 2 files changed, 9 insertions(+) diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 6ca6d10cfe0..709bd4d0b9b 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -107,6 +107,14 @@ rules: - cloudeventsources/status verbs: - '*' +- apiGroups: + - flowcontrol.apiserver.k8s.io + resources: + - flowschemas + - prioritylevelconfigurations + verbs: + - list + - watch - apiGroups: - keda.sh resources: diff --git a/controllers/keda/scaledobject_controller.go b/controllers/keda/scaledobject_controller.go index 27625f6f10a..ea97fa9b337 100755 --- a/controllers/keda/scaledobject_controller.go +++ b/controllers/keda/scaledobject_controller.go @@ -65,6 +65,7 @@ import ( // +kubebuilder:rbac:groups="apps",resources=deployments;statefulsets,verbs=list;watch // +kubebuilder:rbac:groups="coordination.k8s.io",namespace=keda,resources=leases,verbs="*" // +kubebuilder:rbac:groups="",resources="limitranges",verbs=list;watch +// +kubebuilder:rbac:groups=flowcontrol.apiserver.k8s.io,resources=prioritylevelconfigurations;flowschemas,verbs=list;watch // ScaledObjectReconciler reconciles a ScaledObject object type ScaledObjectReconciler struct {