-
Notifications
You must be signed in to change notification settings - Fork 34
Fix PolicyGenerator setting InformOnly on root policy #154
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 PolicyGenerator setting InformOnly on root policy #154
Conversation
|
/hold |
internal/utils.go
Outdated
| } | ||
|
|
||
| // "InformOnly" should only apply to ConfigurationPolicies | ||
| if action == "InformOnly" { |
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.
It seems we accept any casing so this should also account for that too:
https://github.com/open-cluster-management-io/governance-policy-framework-addon/blob/6a8baf33b678533fb6ebe268edd47a421cc81143/controllers/templatesync/template_sync.go#L1345
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.
/unhold
When all ConfigurationPolicies have RemediationAction InformOnly, the root Policy is also set to have RemediationAction InformOnly. However, InformOnly is not valid on a Policy, and was thus modified to be set to inform in this case. Signed-off-by: Jeffrey Luo <[email protected]>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JeffeyL, 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 |
|
/cherry-pick release-2.10 |
|
@mprahl: once the present PR merges, I will cherry-pick it on top of release-2.10 in a new PR and assign it to you. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/cherry-pick release-2.9 |
|
@mprahl: once the present PR merges, I will cherry-pick it on top of release-2.9 in a new PR and assign it to you. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@mprahl: cannot checkout In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@mprahl: cannot checkout In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
When all ConfigurationPolicies have
RemediationActionInformOnly, the root Policy is also set to haveRemediationActionInformOnly. However,InformOnlyis not valid on a Policy, and was thus modified to be set toinformin this case.Ref: https://issues.redhat.com/browse/ACM-10534