Skip to content

Make the default configuration for watched namespaces more explicit #1176

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

Closed
metacosm opened this issue Apr 22, 2022 · 0 comments · Fixed by #1177
Closed

Make the default configuration for watched namespaces more explicit #1176

metacosm opened this issue Apr 22, 2022 · 0 comments · Fixed by #1177
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@metacosm
Copy link
Collaborator

The default value (if no value is provided via the @ControllerConfiguration annotation) is currently considered as a request to watch all namespaces. While the default behavior shouldn't change (i.e., if no value is provided all namespaces should still be watched by default), the value should be more explicit and have a clearer semantics.

Similarly, if a user currently specifies a list of namespaces to watch but if that list also includes the Constants.WATCH_CURRENT_NAMESPACE value, then the behavior will be changed to only watching the namespace in which the operator is deployed. This is potential source of error so this should actually be an error to use Constants.WATCH_CURRENT_NAMESPACE in combination with any other value. We will also match this semantics for the new explicit constant to watch all namespaces.

@metacosm metacosm added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 22, 2022
@metacosm metacosm self-assigned this Apr 22, 2022
metacosm added a commit that referenced this issue Apr 22, 2022
This uses the constant that was initially introduced for the same reason
on KubernetesDependent, which is now moved to Constants. Uncovered
several issues with configuration overriding in the process and added
test coverage.

Fixes #1176
metacosm added a commit that referenced this issue Apr 22, 2022
* feat: make default watched namespaces behavior explicit

This uses the constant that was initially introduced for the same reason
on KubernetesDependent, which is now moved to Constants. Uncovered
several issues with configuration overriding in the process and added
test coverage.

Fixes #1176

* refactor: DEPLOYED_NAMESPACE_ONLY -> CURRENT_NAMESPACE_ONLY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant