-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add structural OpenAPI schema to Tekton CRDs #8490
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Hi @burigolucas. Thanks for your PR. I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/kind documentation |
/ok-to-test |
Hi @vdemeester, I have identified issues with the CRDs. A few of them were invalid due to recursive fields. Following the fix proposed in this issue Generating CRD manifest for struct with recursive field, I have added the markers
in the affected fields and regenerated the CRDs. I have also disabled the embedded object meta as it does not provide useful schema in my opinion and only makes the files more bloated. AFAIK, there is still one issue to be solved, namely, the CRD for the |
Yeah, that's was the inital problem 😅 |
|
@burigolucas could we refer to another schema ? |
Are you trying |
Yeah it's what (
You mean the |
I would be fine only having the shema for the |
I have just tried to remove the pipelineSpec from the schema of the pipelineRun and it is now small enough, even with both versions of the CRD. But we might need to reduce other CRDs further if we need to support |
Removed also the schema of |
- Implement POSIX script to update the OpenAPI schema to Tekton CRDs using controller-gen - Add updated CRDs with OpenAPI schema Note1: the current script 'hack/update-schemas.sh' return several errors/warnings and status code 1 from execution of the controller-gen CLI due to issues when parsing the schema from the source code. Note2: the controller-gen does not preserve the field "x-kubernetes-preserve-unknown-fields: true" in the root of the schema. This field is added by the 'hack/update-schemas.sh' script Note3: Markes were addded to avoid creating the schema for recursive types that results in invalid schemata. Related issue: kubernetes-sigs/controller-tools#585 Note4: Schema for PipelineSpec was omitted from PipelineRun to reduce size. A comment was added in the description of the field for the user to refer to the schema of Pipeline. Note5: Schema of TaskSpec was omitted from TaskRun to reduce size. A comment was added in the description of the field for the user to refer to the schema of Task.
daba633
to
f1f45fb
Compare
@burigolucas: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
I am "fine" with requiring things to be done using |
Changes
Addes Issue 1461 by implementint a POSIX script to update the OpenAPI schema to Tekton CRDs using controller-gen and adding the updated CRDs with OpenAPI schema.
Note that the current script
hack/update-schemas.sh
return several errors/warnings and status code 1 from execution of the controller-gen CLI due to issues when parsing the schema from the source code. Besides, processing multiple files at once is causing segmentation fault. Therefore, in the script, each file is processed separately.Furthermore, the controller-gen does not preserve the field "x-kubernetes-preserve-unknown-fields: true" in the root of the schema. This field is added by the
hack/update-schemas.sh
script after the CRD has been updated to include the schema.Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes