-
Notifications
You must be signed in to change notification settings - Fork 38
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
Pravega-operator pod crashing if WATCH_NAMESPACE not set #205
Comments
Closing this since we agree to use WATCH_NAMESPACE |
Does |
There are no changes to the code, and the issue is a regression from |
In |
@jkhalack, pravega-operator always creates the cluster in one namespace. There is a 1-to-1 mapping between an operator instance and pravega-cluster instance and the 'operator' and 'pravega-cluster' always need to exist in the same namespace for the operator to function correctly. |
@pbelgundi |
Somehow two aspects are being mixed up; here is the typical/correct solution.
@pbelgundi is making an undue assertion about how many Pravega clusters could be managed by an instance of the operator. It would be unusual to limit it as was suggested. That said, Nautilus deploys one instance. The wrong conclusion was reached in #206. @Tristan1900 had the correct solution IMO. Note that the
If you survey the various operators that are based on Operator SDK, you will see the pattern that I described. |
@jkhalack, I agree that operator should not be crashing when WATCH_NAMESPACE is not set and we have merged a PR for the same (see merged PR above) |
@EronWright I agree that WATCH_NAMESPACE and NAMESPACE in which the operator itself runs can be 2 separate namespaces and may have nothing to do with each other. However, for these reasons I do not see the need for a separate "WEBHOOK_NAMESPACE" variable, that would decide the namespace for webhook service:
As such, above PR makes sure webhook service is always deployed in the same namespace where the operator itself runs and there is no need for a separate WEBHOOK_NAMESPACE to be set. |
Closing this issue since setting WATCH_NAMESPACE="" does not cause operator to fail after this fix. |
@pbelgundi to better explain my rationale for suggesting
The latest version of controller-runtime has a breaking change, it doesn't program the webhook service anymore. So, this discussion is moot, don't feel a need to change anything now. ref: https://github.com/operator-framework/operator-sdk/blob/v0.10.x/pkg/k8sutil/k8sutil.go#L62 |
Problem Description
We are deploying
pravega-operator
with the intent for it to watch all namespaces (soWATCH_NAMESPACE=''
). If used to work just fine in version0.3.2
.When we try to switch to
pravega-operator:0.4.0
, thepravega-operator
keeps crashing.Pravega-operator Log
Problem Location
Webhook code
The text was updated successfully, but these errors were encountered: