-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add flag to disable PlacementRule watches #232
Add flag to disable PlacementRule watches #232
Conversation
aec8bb9
to
044cd6d
Compare
Some deployments will not want to install the PlacementRule CRD, since it is an older API which may eventually be removed. This adds an argument to the propagator which will disable all watches on PlacementRules, allowing the controllers to run in those environments. In addition, if the flag is not set, the controller will check for the PlacementRule CRD on the cluster, and if not found, disable those watches (which would otherwise fail and prevent the controller from working). Refs: - https://issues.redhat.com/browse/ACM-2609 Signed-off-by: Justin Kulikauskas <[email protected]>
044cd6d
to
8a51190
Compare
@@ -11,7 +11,7 @@ import ( | |||
"open-cluster-management.io/governance-policy-propagator/test/utils" | |||
) | |||
|
|||
var _ = Describe("Test unexpect policy handling", func() { | |||
var _ = Describe("Test unexpect policy handling", Label("non-placement-rule"), func() { |
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.
Everything is good! but Why is this test in non-placementRule?
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.
This is the one test I found that didn't use PlacementRule. In the future, I'm hoping we have others (maybe we already do, I didn't look super hard).
For this PR, I just needed at least one test for that suite to make sure that the controller didn't crash when the PlacementRule CRD was no longer present.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JustinKuli, mprahl The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
474fdc8
into
open-cluster-management-io:main
Some deployments will not want to install the PlacementRule CRD, since it is an older API which may eventually be removed. This adds an argument to the propagator which will disable all watches on PlacementRules, allowing the controllers to run in those environments.
In addition, if the flag is not set, the controller will check for the PlacementRule CRD on the cluster, and if not found, disable those watches (which would otherwise fail and prevent the controller from working).
Refs: