From 44948ddfb67097885b5be8a0cc8282f6f719258d Mon Sep 17 00:00:00 2001 From: Alex Kalenyuk Date: Wed, 6 Nov 2024 21:58:07 +0200 Subject: [PATCH] Add RBAC for secrets in the CDI namespace (#3516) This is just some backlog that was left from https://github.com/kubevirt/containerized-data-importer/pull/3314#discussion_r1660113610; Basically, the config-controller is broken with ingress as the first get call for the secret attempts to start caching them, and the RBAC for that is missing. https://sdk.operatorframework.io/docs/faqs/#after-deploying-my-operator-i-see-errors-like-failed-to-watch-external-type Signed-off-by: Alex Kalenyuk --- cmd/cdi-controller/controller.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/cdi-controller/controller.go b/cmd/cdi-controller/controller.go index b835b06e39..0f78f9ab51 100644 --- a/cmd/cdi-controller/controller.go +++ b/cmd/cdi-controller/controller.go @@ -413,6 +413,9 @@ func getCacheOptions(apiClient client.Client, cdiNamespace string) cache.Options &v1.ConfigMap{}: { Field: namespaceSelector, }, + &v1.Secret{}: { + Field: namespaceSelector, + }, }, }