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 OpenAPI support #159

Closed edcdavid closed 4 months ago

edcdavid commented 6 months ago

This is an attempt to resolve https://github.com/open-cluster-management-io/policy-generator-plugin/issues/142

In this PR we define a new openapi field in the policy genrator manifest object. This object has the same definition as the similarly define object in kustomize (see https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/openapi/)

The openapi object defined a openapi path per manifest, which allows merging CRDs containing list of objects. The openapi schema file can cover multiple CRs.

Docs (part of this PR): link

dhaiducek commented 4 months ago

@mprahl Could you give this another review (and unhold if you approve)?

openshift-ci[bot] commented 4 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhaiducek, edcdavid, 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: - ~~[OWNERS](https://github.com/open-cluster-management-io/policy-generator-plugin/blob/main/OWNERS)~~ [dhaiducek,mprahl] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
mprahl commented 4 months ago

/unhold

@edcdavid thanks for the contribution!