-
Notifications
You must be signed in to change notification settings - Fork 50
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
fix: able to override controller level namespace when set in annotation #692
Conversation
What use case is this suppose to fix, as this looks suspicious, the parameter that is now always false had been introduced for a reason. |
@metacosm added description.
The initial value is always false, but otherwise changed here: Line 211 in 9e722e7
For example when the controller configuraiton is set from params: Line 48 in 9e722e7
|
There is no such override: |
It does not make too much sense to me this way. So IMHO should be this way (precedence order):
Mainly it does not adds up to me, that it overrides the namespace if in the annotation the value is not set, but does not override it when it is set in the annotation. Those values should be overrideable in all cases. |
I don't agree and that would be a breaking change. If the user made the effort to provide a value in the annotation, then it should be taken into account, not overridden by a blanket value that applies to all controllers that are not configured. This is how this property has been designed to behave. If this is too confusing, the appropriate solution, imo, would be to remove the |
Maybe we should think through this for v5 of JOSDK and remove this property , not sure if the value make sense in the annotation. This really depends on that how a team deploys a controller, and it is something that naturally varies on platforms. Basically that is why I wrote: |
Yes, it definitely makes sense to consider cleaning things up for the next major version. I will close this PR for now, though. |
kk, I will close the related issue |
When the namespace of a controller is set to a different value, for example:
@ControllerConfiguration(namespaces = WATCH_CURRENT_NAMESPACE, ... )
Then the
quarkus.operator-sdk.namespaces
configuration override is not working, thus setting the namespace in the annotation we should consider more like a default value.