Skip to content

✨ Add support for CRD v1 to crdschema generator - #321

Closed
marun wants to merge 1 commit into
kubernetes-sigs:masterfrom
marun:schemapatcher-crd-v1
Closed

marun wants to merge 1 commit into
kubernetes-sigs:masterfrom
marun:schemapatcher-crd-v1

Conversation

@marun

@marun marun commented Sep 18, 2019 •

Copy link
Copy Markdown
Contributor

This PR adds support to crdschema generator for CRD v1 manifests. The schema generated for a v1 CRD is also validated for structural compatibility.

Upon the advice of @sttts I have removed the structural schema validation since the implementation requires the use of code intended to be internal to the kube apiserver. Schema construction is intended to be correct, but ultimately validation can only be authoritatively performed on submission to an apiserver.

cc: @sttts

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 18, 2019
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: marun
To complete the pull request process, please assign pwittrock
You can assign the PR to them by writing /assign @pwittrock in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details 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

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 18, 2019
@marun marun changed the title WIP ✨ Add support for CRD v1 to crdschema generator ✨ Add support for CRD v1 to crdschema generator Sep 19, 2019
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 19, 2019
@marun

marun commented Sep 19, 2019

Copy link
Copy Markdown
Contributor Author

Ready for review

Comment thread pkg/schemapatcher/gen.go Resolved
Comment thread pkg/schemapatcher/gen.go Resolved
@sttts

sttts commented Oct 25, 2019

Copy link
Copy Markdown
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 25, 2019
@sttts

sttts commented Oct 25, 2019

Copy link
Copy Markdown
Contributor

@DirectXMan12 can you take a look?

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 25, 2019
Comment thread pkg/schemapatcher/gen.go Resolved
Comment thread pkg/schemapatcher/gen.go Resolved
@munnerz

munnerz commented Oct 25, 2019

Copy link
Copy Markdown
Member

Taking a quick look through this PR, I don't see any way to choose the output version when invoking the generator? It'd be great to continue to support v1beta1 so controller authors targetting Kubernetes <1.16 can use the latest controller-tools features whilst still generating compatible CRDs 😄

@sttts

sttts commented Oct 25, 2019

Copy link
Copy Markdown
Contributor

@munnerz this PR is not about the crd generator, but the schema patcher. I agree with your request, but that's a follow-up as it is unrelated. PR welcome :)

Comment thread pkg/schemapatcher/gen.go Resolved
Comment thread pkg/schemapatcher/gen.go Resolved
@sttts

sttts commented Oct 25, 2019

Copy link
Copy Markdown
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 25, 2019
@sttts

sttts commented Nov 3, 2019

Copy link
Copy Markdown
Contributor

@DirectXMan12 can we merge this?

@DirectXMan12

Copy link
Copy Markdown
Contributor

Heh, I completely missed this before I wrote #356. I'll take a look at this tomorrow, and hopefully we can unify.

@sttts

sttts commented Nov 5, 2019

Copy link
Copy Markdown
Contributor

Heh, I completely missed this before I wrote #356

This moment you spent a day writing something and then check open pull requests :) But I guess you support also crd-gen v1 output.

@marun

marun commented Nov 5, 2019

Copy link
Copy Markdown
Contributor Author

Superseded by #356

@marun marun closed this Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants