open-cluster-management-io / policy-generator-plugin

A Kustomize generator plugin to generate Open Cluster Management policies
Apache License 2.0
29 stars 31 forks source link

Policy extra ordering #84

Closed JustinKuli closed 1 year ago

JustinKuli commented 1 year ago

Follow up to https://github.com/stolostron/policy-generator-plugin/pull/82

Don't be alarmed by the huge diff: most of it is tests, in a separate commit. The main impactful changes are in the "Second try implementation of policy ordering" commit, summary:

What was `orderViaDependencies` has been moved into `policyDefaults` as
`orderPolicies`. A similar `orderManifests` option will automatically
generate manifest-level `extraDependencies` to order ConfigPolicies
within a Policy. In both cases, instead of *merging* dependency lists,
it is only allowed to define dependencies one way.

If `dependencies` or `extraDependencies` are defined at multiple levels,
the more "specific" level will override previous definitions, which is
more consistent with other settings.
sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

90.8% 90.8% Coverage
0.0% 0.0% Duplication

openshift-ci[bot] commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JustinKuli, 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: - ~~[OWNERS](https://github.com/stolostron/policy-generator-plugin/blob/main/OWNERS)~~ [JustinKuli,willkutler] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
willkutler commented 1 year ago

This looks good to me! It will be very helpful to be able to automatically generate template-specific dependencies.