Skip to content
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

Merged
merged 4 commits into from
Dec 31, 2021
Merged

fix: create all resources in the operator namespace #56

merged 4 commits into from
Dec 31, 2021

Conversation

nbalacha
Copy link
Contributor

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.

@nbalacha nbalacha requested a review from leelavg December 31, 2021 09:00
Copy link
Contributor

@leelavg leelavg left a 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 from defaults.go and manager.env?

@@ -57,6 +57,10 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAMESPACE
Copy link
Contributor

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 to WATCH_NAMESPACE, if not we can use the same i guess?

Copy link
Contributor Author

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>
Copy link
Contributor

@leelavg leelavg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 31, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 31, 2021

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@nbalacha nbalacha merged commit e0c41e7 into openshift:main Dec 31, 2021
@nbalacha nbalacha deleted the ns branch December 31, 2021 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants