fix: specify namespace when there is a namespace search #241
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issue or Design Document
Hello, this fixed for me a bug where the controller tries to access cluster-wide Oauth2Clients despite the
singleNamespaceModeproperty set to true. The role resources a correctly setup but I noticed I had a bunch of issues in the logs where the manager tries to access resources cluster-wide.Here's the logs I had:
I noticed the code used an empty variable named
NAMESPACEin my case (I use the default helm chart from https://github.com/ory/k8s).Checklist
If this pull request addresses a security vulnerability,
I confirm that I got approval (please contact [email protected]) from the maintainers to push the changes.
Further comments
I did not tests in the case where
singleNamespaceModeis set tofalse, nor have I tried a case of multiple namespace with the Helm's chart variableenabledNamespaces.