Add complete schemas to all CRDs#11244
Conversation
|
/hold There's a vendor change in here that needs to be done in pkg first. |
Codecov Report
@@ Coverage Diff @@
## main #11244 +/- ##
==========================================
+ Coverage 87.65% 87.72% +0.06%
==========================================
Files 191 191
Lines 9187 9186 -1
==========================================
+ Hits 8053 8058 +5
+ Misses 880 875 -5
+ Partials 254 253 -1
Continue to review full report at Codecov.
|
55ff3f3 to
76f068c
Compare
|
/retest |
|
/hold This got bigger now 😂 |
evankanderson
left a comment
There was a problem hiding this comment.
I'm assuming that the entirety of the CRD definition is being created by the controller-gen binary, and we're not needing to do part-and-part copying?
|
/lgtm |
0b262e3 to
9cd1ecf
Compare
|
This is ready from my perspective /unhold |
|
Nice to see this @markusthoemmes, thanks for all the hard work. |
| // RevisionTemplateSpec describes the data a revision should have when created from a template. | ||
| // Based on: https://github.com/kubernetes/api/blob/e771f807/core/v1/types.go#L3179-L3190 | ||
| type RevisionTemplateSpec struct { | ||
| // +kubebuilder:pruning:PreserveUnknownFields |
There was a problem hiding this comment.
To clarify this notation applies to the fields in metav1.ObjectMeta ? Is there a reason why we're allowing unknown fields here?
Does your patch mean this annotation is no longer necessary kubernetes-sigs/controller-tools#563 ?
There was a problem hiding this comment.
Tbh, this was kind of a stopgap solution because stuff has been failing without it. We currently print out deletionTimestamp: null to every nested ObjectMeta and just the schema would cause this to drop, so I thought the problem might be around that. Hence I added this for compatiblity.
| # 2. There's a missing feature to properly generate nested ObjectMeta | ||
| # see https://github.com/kubernetes-sigs/controller-tools/pull/563 | ||
| # 3. We need specialized logic to filter down the surface of PodSpec we allow in Knative. | ||
| controller-gen schemapatch:manifests=config/core/300-resources \ |
There was a problem hiding this comment.
can you do the wrangling of cloning/installing your repo in a tmp-dir and updating the path so folks can update the schema without going through those manual hoops
There was a problem hiding this comment.
I can take a whack at that, though I'd like to priotize the schema itself for now so we can get that baking. There'll be incremental improvements to the devx anyway as the goal ultimately is to have it run via update-codegen.sh.
|
note to other reviewers: |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dprotaso The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Proposed Changes
Fixes #912
This is a stepping stone towards generating schemas for all of our CRDs. Generating the CRDs is not yet part of
update-codegen.shsince we need to put the actual machinery in place through the hack repository, potentially forking the respective tooling to our repositories first.I thought this might still be useful. Granted, this is not based on any accepted concept right now, so I'm happy to bin it all.
Release Note