From f90c2396e5be08111356719b07275403a2b1dc08 Mon Sep 17 00:00:00 2001 From: Michael Nairn Date: Mon, 5 Feb 2024 13:51:44 +0000 Subject: [PATCH] Add missing secret get/list rbac --- .../kuadrant-dns-operator.clusterserviceversion.yaml | 10 +++++++++- config/rbac/role.yaml | 8 ++++++++ internal/provider/factory.go | 2 ++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/bundle/manifests/kuadrant-dns-operator.clusterserviceversion.yaml b/bundle/manifests/kuadrant-dns-operator.clusterserviceversion.yaml index 4f9c6367..4afcaa1d 100644 --- a/bundle/manifests/kuadrant-dns-operator.clusterserviceversion.yaml +++ b/bundle/manifests/kuadrant-dns-operator.clusterserviceversion.yaml @@ -69,7 +69,7 @@ metadata: } ] capabilities: Basic Install - createdAt: "2024-02-03T00:24:09Z" + createdAt: "2024-02-05T13:50:08Z" operators.operatorframework.io/builder: operator-sdk-v1.33.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v4 name: kuadrant-dns-operator.v0.0.1 @@ -103,6 +103,14 @@ spec: spec: clusterPermissions: - rules: + - apiGroups: + - "" + resources: + - secrets + verbs: + - get + - list + - watch - apiGroups: - kuadrant.io resources: diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index a33b8ae2..93144d85 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -4,6 +4,14 @@ kind: ClusterRole metadata: name: manager-role rules: +- apiGroups: + - "" + resources: + - secrets + verbs: + - get + - list + - watch - apiGroups: - kuadrant.io resources: diff --git a/internal/provider/factory.go b/internal/provider/factory.go index 2ba1c672..8a309634 100644 --- a/internal/provider/factory.go +++ b/internal/provider/factory.go @@ -12,6 +12,8 @@ import ( "github.com/kuadrant/kuadrant-dns-operator/api/v1alpha1" ) +// +kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch + var errUnsupportedProvider = fmt.Errorf("provider type given is not supported") // ProviderConstructor constructs a provider given a Secret resource and a Context.