Skip to content

feat: Controllers can now watch only the namespace they're deployed in #378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 18, 2021

Conversation

metacosm
Copy link
Collaborator

This is achieved by using JOSDK_WATCH_CURRENT as the only value of the
namespaces configuration for the controller.

Fixes #372

@adam-sandor
Copy link
Collaborator

Can you describe what the indended business logic will be after this PR? Even reading the issue doesn't give me a good understanding of what the current state is and what are we trying to achieve here.

@metacosm
Copy link
Collaborator Author

@adam-sandor the idea is that currently, it's not possible to configure a controller to watch only the namespace it is deployed on. It used to be possible (it was even the default configuration at some point) but since we reverted back to the behavior of watching all namespaces by default, it's not possible anymore. The use case is to be able to automatically watch only the "current" namespace where the operator is deployed in, without having to know its name beforehand. This makes most sense in multi-tenant, dynamically provisioned clusters.

This is achieved by using `JOSDK_WATCH_CURRENT` as the only value of the
namespaces configuration for the controller.

Fixes #372
@adam-sandor
Copy link
Collaborator

Got it, thank for explaining. It makes sense to have this I agree. PR approved.

@adam-sandor adam-sandor self-requested a review March 18, 2021 09:17
@metacosm metacosm merged commit e7f2f83 into master Mar 18, 2021
@metacosm metacosm deleted the fix-372 branch March 18, 2021 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Controller to watch resources only where it is deployed
2 participants