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

Use enum for dependency compliance #49

Conversation

willkutler
Copy link
Contributor

Adds an enum for dependencies[].compliance and extraDependencies[].compliance to block creation of policies with that field set incorrectly. This will fix policies creating with invalid dependencies.

refs:

@mprahl
Copy link
Member

mprahl commented Jan 4, 2023

/hold

@willkutler did you also set the kubebuilder markers in the config-policy-controller?

@mprahl
Copy link
Member

mprahl commented Jan 4, 2023

@willkutler, I also noticed the enum is different here:
https://github.com/stolostron/console/pull/2317/files#diff-650ab4818c53a4c05b1eb15787248343803c6ded138db36edf237b6bd5c90b16R30

This should likely be updated with this change as well.

Copy link
Member

@dhaiducek dhaiducek left a comment

Choose a reason for hiding this comment

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

I agree with @mprahl that the propagator probably needs an update in tandem with this PR.

It looks like open-cluster-management-io/governance-policy-propagator#59 updated the ComplianceState, but the Dependency structs use a string type for its Compliance field instead of the ComplianceState struct:

@mprahl
Copy link
Member

mprahl commented Jan 4, 2023

@willkutler could you please squash your commits?

@willkutler
Copy link
Contributor Author

@mprahl is this good to go?

@willkutler
Copy link
Contributor Author

/unhold

@openshift-ci
Copy link

openshift-ci bot commented Jan 7, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhaiducek, mprahl, willkutler

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

@openshift-merge-robot openshift-merge-robot merged commit 01fcd9e into open-cluster-management-io:main Jan 7, 2023
dhaiducek pushed a commit to dhaiducek/governance-policy-addon-controller-1 that referenced this pull request Apr 12, 2023
New linting changes are required for go 1.18

Signed-off-by: Gus Parvin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants