-
Notifications
You must be signed in to change notification settings - Fork 40
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: create all resources in the operator namespace #56
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- can we remove
operator_namespace
vars fromdefaults.go
andmanager.env
?
@@ -57,6 +57,10 @@ spec: | |||
valueFrom: | |||
fieldRef: | |||
fieldPath: metadata.namespace | |||
- name: POD_NAMESPACE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- any scenario where
POD_NAMESPACE
will be different toWATCH_NAMESPACE
, if not we can use the same i guess?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that this may be something we might want to support in the future but I agree that this will be the same for now. I will remove WATCH_NAMESPACE.
Adds the POD_NAMESPACE env var to the operator container spec. This is the namespace the operator pod is running in and all resources will be created in this namespace. Removes the WATCH_NAMESPACE env var as the operator will now watch only its own namespace. Signed-off-by: N Balachandran <nibalach@redhat.com>
The operator creates all resources in its own namespace instead of the LVMCluster resource namespace. Signed-off-by: N Balachandran <nibalach@redhat.com>
This updates the tests to include the new Namespace field in LVMClusterReconciler. Signed-off-by: N Balachandran <nibalach@redhat.com>
Updates the CSV with the changes to the manager. Signed-off-by: N Balachandran <nibalach@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: leelavg, nbalacha The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This fix creates all resources in the operator namespace instead of the LVMCluster namespace. This is required if, in future, the operator will be extended to watch all namespaces.