Reloader icon indicating copy to clipboard operation
Reloader copied to clipboard

failed to list *v1.Namespace: the server could not find the requested resource

Open riddhichheda03 opened this issue 9 months ago • 5 comments

Hi, We are trying to deploy reloader on openshift v4.16 and we are using namespaceselector to monitor specific namespaces. And we have given all the necessary access to the SA. We are getting below error: time="2025-03-06T14:19:39Z" level=info msg="Starting Controller to watch resource type: secrets" W0306 14:19:39.762652 1 reflector.go:561] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:243: failed to list *v1.Namespace: the server could not find the requested resource E0306 14:19:39.762726 1 reflector.go:158] "Unhandled Error" err="pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:243: Failed to watch *v1.Namespace: failed to list *v1.Namespace: the server could not find the requested resource" logger="UnhandledError"

Could you please help us on this?

riddhichheda03 avatar Mar 06 '25 14:03 riddhichheda03

hi @riddhichheda03 is the cluster under load, how many namespaces do you have in the cluster? and which version of reloader is running

MuneebAijaz avatar Mar 06 '25 14:03 MuneebAijaz

Without using namespaceselector it is able to monitor the secrets and config for my specified namespaces. But with namespaceselector it gives above error.

riddhichheda03 avatar Mar 06 '25 15:03 riddhichheda03

Can you share what namespace selector are you using? And are you able to see namespaces with that selector using kubectl get ns -l <selector>

MuneebAijaz avatar Mar 06 '25 16:03 MuneebAijaz

yes, I am using namespaceselector as "managedby=test". oc get ns -l managedby=test NAME STATUS AGE test-project1 Active 407d test-project2 Active 226d

We have deployed reloader 1.3 using helm. Also how can we monitor multiple namesapces ?

riddhichheda03 avatar Mar 06 '25 16:03 riddhichheda03

I have noticed the same behaviour using version v1.4.0 with helm 2.0.0 and Kubernetes: Client Version: v1.32.2 Kustomize Version: v5.5.0 Server Version: v1.31.7

When no namespace selector is set and the watchGlobally is set to true it works.

This returns the expected namespace: kubectl get ns -l kubernetes.io/metadata.name=test

gegetoth avatar Apr 17 '25 12:04 gegetoth

Hi, Have you merged the fix #933 to main? We are using the version v1.4.5 and still facing this issue of "failed to list *v1.Namespace: the server could not find the requested resource"

prasathtt avatar Jul 10 '25 18:07 prasathtt