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

Add support for generating placement with raw data #93

Closed willkutler closed 1 year ago

willkutler commented 1 year ago

Placements can now be generated by nesting a full labelSelector or clusterSelector YAML under the placement key, in addition to the legacy method of listing key/value pairs under placement. This allows users to specify multiple clusters in the values array of a placement or placementRule, and to use matchLabels instead of matchExpressions (only supported by placement).

Signed-off-by: Will Kutler wkutler@redhat.com

willkutler commented 1 year ago

/hold refactoring to fix code smells

willkutler commented 1 year ago

/unhold

willkutler commented 1 year ago

@mprahl second round of review changes are in the latest commit

willkutler commented 1 year ago

@mprahl new review is done

mprahl commented 1 year ago

@willkutler this looks great. Just fix that one typo and squash your commits. I'll approve it afterwards.

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 0 Code Smells

90.9% 90.9% Coverage
0.0% 0.0% Duplication

willkutler commented 1 year ago

@mprahl @dhaiducek I think this should be good to go

openshift-ci[bot] commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

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