Skip to content

Commit

Permalink
Reduce size of openAPIV3Schema to support kubectl apply
Browse files Browse the repository at this point in the history
- Revise script to generate CRD schemas
- Omit schema for Pod.spec.volumes, Pod.spec.affinity, VolumeClaimTemplate
- Omit schema for TaskSpec in TaskRun
- Omit schema for TaskSpec in Pipeline
- Omit schema for PipelineSpec in PipelineRun
- Add references to schema and API version in all omitted schemas
  • Loading branch information
burigolucas committed Jan 24, 2025
1 parent fc5726e commit e4bbd38
Show file tree
Hide file tree
Showing 29 changed files with 13,180 additions and 88,317 deletions.
1,567 changes: 2 additions & 1,565 deletions config/300-crds/300-clustertask.yaml

Large diffs are not rendered by default.

395 changes: 5 additions & 390 deletions config/300-crds/300-customrun.yaml

Large diffs are not rendered by default.

21,602 changes: 888 additions & 20,714 deletions config/300-crds/300-pipeline.yaml

Large diffs are not rendered by default.

45,806 changes: 4,191 additions & 41,615 deletions config/300-crds/300-pipelinerun.yaml

Large diffs are not rendered by default.

16 changes: 0 additions & 16 deletions config/300-crds/300-resolutionrequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,6 @@ spec:
status: {}
schema:
openAPIV3Schema:
# One can use x-kubernetes-preserve-unknown-fields: true
# at the root of the schema (and inside any properties, additionalProperties)
# to get the traditional CRD behaviour that nothing is pruned, despite
# setting spec.preserveUnknownProperties: false.
#
# See https://kubernetes.io/blog/2019/06/20/crd-structural-schema/
# See issue: https://github.com/knative/serving/issues/912
x-kubernetes-preserve-unknown-fields: true
description: |-
ResolutionRequest is an object for requesting the content of
a Tekton resource like a pipeline.yaml.
Expand Down Expand Up @@ -186,14 +178,6 @@ spec:
status: {}
schema:
openAPIV3Schema:
# One can use x-kubernetes-preserve-unknown-fields: true
# at the root of the schema (and inside any properties, additionalProperties)
# to get the traditional CRD behaviour that nothing is pruned, despite
# setting spec.preserveUnknownProperties: false.
#
# See https://kubernetes.io/blog/2019/06/20/crd-structural-schema/
# See issue: https://github.com/knative/serving/issues/912
x-kubernetes-preserve-unknown-fields: true
description: |-
ResolutionRequest is an object for requesting the content of
a Tekton resource like a pipeline.yaml.
Expand Down
16 changes: 0 additions & 16 deletions config/300-crds/300-stepaction.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@ spec:
storage: false
schema:
openAPIV3Schema:
# One can use x-kubernetes-preserve-unknown-fields: true
# at the root of the schema (and inside any properties, additionalProperties)
# to get the traditional CRD behaviour that nothing is pruned, despite
# setting spec.preserveUnknownProperties: false.
#
# See https://kubernetes.io/blog/2019/06/20/crd-structural-schema/
# See issue: https://github.com/knative/serving/issues/912
x-kubernetes-preserve-unknown-fields: true
description: |-
StepAction represents the actionable components of Step.
The Step can only reference it from the cluster or using remote resolution.
Expand Down Expand Up @@ -522,14 +514,6 @@ spec:
storage: true
schema:
openAPIV3Schema:
# One can use x-kubernetes-preserve-unknown-fields: true
# at the root of the schema (and inside any properties, additionalProperties)
# to get the traditional CRD behaviour that nothing is pruned, despite
# setting spec.preserveUnknownProperties: false.
#
# See https://kubernetes.io/blog/2019/06/20/crd-structural-schema/
# See issue: https://github.com/knative/serving/issues/912
x-kubernetes-preserve-unknown-fields: true
description: |-
StepAction represents the actionable components of Step.
The Step can only reference it from the cluster or using remote resolution.
Expand Down
7,738 changes: 2,306 additions & 5,432 deletions config/300-crds/300-task.yaml

Large diffs are not rendered by default.

23,984 changes: 5,561 additions & 18,423 deletions config/300-crds/300-taskrun.yaml

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions config/300-crds/300-verificationpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,6 @@ spec:
storage: true
schema:
openAPIV3Schema:
# One can use x-kubernetes-preserve-unknown-fields: true
# at the root of the schema (and inside any properties, additionalProperties)
# to get the traditional CRD behaviour that nothing is pruned, despite
# setting spec.preserveUnknownProperties: false.
#
# See https://kubernetes.io/blog/2019/06/20/crd-structural-schema/
# See issue: https://github.com/knative/serving/issues/912
x-kubernetes-preserve-unknown-fields: true
description: |-
VerificationPolicy defines the rules to verify Tekton resources.
VerificationPolicy can config the mapping from resources to a list of public
Expand Down
85 changes: 55 additions & 30 deletions docs/pipeline-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,8 @@ PipelineSpec
<td>
<em>(Optional)</em>
<p>Specifying PipelineSpec can be disabled by setting
<code>disable-inline-spec</code> feature flag..</p>
<code>disable-inline-spec</code> feature flag.
See Pipeline.spec (API version: tekton.dev/v1)</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -1004,7 +1005,8 @@ source mounted into /workspace.</p>
</td>
<td>
<p>Volumes is a collection of volumes that are available to mount into the
steps of the build.</p>
steps of the build.
See Pod.spec.volumes (API version: v1)</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -1189,8 +1191,9 @@ TaskSpec
</td>
<td>
<em>(Optional)</em>
<p>Specifying PipelineSpec can be disabled by setting
<code>disable-inline-spec</code> feature flag..</p>
<p>Specifying TaskSpec can be disabled by setting
<code>disable-inline-spec</code> feature flag.
See Task.spec (API version: tekton.dev/v1)</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -2401,7 +2404,8 @@ PipelineSpec
<td>
<em>(Optional)</em>
<p>Specifying PipelineSpec can be disabled by setting
<code>disable-inline-spec</code> feature flag..</p>
<code>disable-inline-spec</code> feature flag.
See Pipeline.spec (API version: tekton.dev/v1)</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -2618,7 +2622,8 @@ PipelineSpec
</em>
</td>
<td>
<p>PipelineRunSpec contains the exact spec used to instantiate the run</p>
<p>PipelineSpec contains the exact spec used to instantiate the run.
See Pipeline.spec (API version: tekton.dev/v1)</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -2942,7 +2947,8 @@ EmbeddedTask
<em>(Optional)</em>
<p>TaskSpec is a specification of a task
Specifying TaskSpec can be disabled by setting
<code>disable-inline-spec</code> feature flag..</p>
<code>disable-inline-spec</code> feature flag.
See Task.spec (API version: tekton.dev/v1)</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -3071,7 +3077,8 @@ PipelineSpec
<p>PipelineSpec is a specification of a pipeline
Note: PipelineSpec is in preview mode and not yet supported
Specifying PipelineSpec can be disabled by setting
<code>disable-inline-spec</code> feature flag..</p>
<code>disable-inline-spec</code> feature flag.
See Pipeline.spec (API version: tekton.dev/v1)</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -5641,8 +5648,9 @@ TaskSpec
</td>
<td>
<em>(Optional)</em>
<p>Specifying PipelineSpec can be disabled by setting
<code>disable-inline-spec</code> feature flag..</p>
<p>Specifying TaskSpec can be disabled by setting
<code>disable-inline-spec</code> feature flag.
See Task.spec (API version: tekton.dev/v1)</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -5938,7 +5946,8 @@ Kubernetes meta/v1.Time
<td>
<em>(Optional)</em>
<p>RetriesStatus contains the history of TaskRunStatus in case of a retry in order to keep record of failures.
All TaskRunStatus stored in RetriesStatus will have no date within the RetriesStatus as is redundant.</p>
All TaskRunStatus stored in RetriesStatus will have no date within the RetriesStatus as is redundant.
FIXME</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -6148,7 +6157,8 @@ source mounted into /workspace.</p>
</td>
<td>
<p>Volumes is a collection of volumes that are available to mount into the
steps of the build.</p>
steps of the build.
See Pod.spec.volumes (API version: v1)</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -6392,7 +6402,8 @@ Kubernetes core/v1.PersistentVolumeClaim
<td>
<em>(Optional)</em>
<p>VolumeClaimTemplate is a template for a claim that will be created in the same namespace.
The PipelineRun controller is responsible for creating a unique claim for each instance of PipelineRun.</p>
The PipelineRun controller is responsible for creating a unique claim for each instance of PipelineRun.
See PersistentVolumeClaim (API version: v1)</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -8631,7 +8642,8 @@ source mounted into /workspace.</p>
</td>
<td>
<p>Volumes is a collection of volumes that are available to mount into the
steps of the build.</p>
steps of the build.
See Pod.spec.volumes (API version: v1)</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -9156,7 +9168,8 @@ PipelineSpec
<td>
<em>(Optional)</em>
<p>Specifying PipelineSpec can be disabled by setting
<code>disable-inline-spec</code> feature flag..</p>
<code>disable-inline-spec</code> feature flag.
See Pipeline.spec (API version: tekton.dev/v1beta1)</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -9689,7 +9702,8 @@ source mounted into /workspace.</p>
</td>
<td>
<p>Volumes is a collection of volumes that are available to mount into the
steps of the build.</p>
steps of the build.
See Pod.spec.volumes (API version: v1)</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -9889,8 +9903,9 @@ TaskSpec
</td>
<td>
<em>(Optional)</em>
<p>Specifying PipelineSpec can be disabled by setting
<code>disable-inline-spec</code> feature flag..</p>
<p>Specifying TaskSpec can be disabled by setting
<code>disable-inline-spec</code> feature flag.
See Task.spec (API version: tekton.dev/v1beta1)</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -11578,7 +11593,8 @@ PipelineSpec
<td>
<em>(Optional)</em>
<p>Specifying PipelineSpec can be disabled by setting
<code>disable-inline-spec</code> feature flag..</p>
<code>disable-inline-spec</code> feature flag.
See Pipeline.spec (API version: tekton.dev/v1beta1)</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -11872,7 +11888,8 @@ PipelineSpec
</em>
</td>
<td>
<p>PipelineRunSpec contains the exact spec used to instantiate the run</p>
<p>PipelineSpec contains the exact spec used to instantiate the run.
See Pipeline.spec (API version: tekton.dev/v1beta1)</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -12212,7 +12229,8 @@ EmbeddedTask
<em>(Optional)</em>
<p>TaskSpec is a specification of a task
Specifying TaskSpec can be disabled by setting
<code>disable-inline-spec</code> feature flag..</p>
<code>disable-inline-spec</code> feature flag.
See Task.spec (API version: tekton.dev/v1beta1)</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -12354,8 +12372,9 @@ PipelineSpec
<em>(Optional)</em>
<p>PipelineSpec is a specification of a pipeline
Note: PipelineSpec is in preview mode and not yet supported
Specifying TaskSpec can be disabled by setting
<code>disable-inline-spec</code> feature flag..</p>
Specifying PipelineSpec can be disabled by setting
<code>disable-inline-spec</code> feature flag.
See Pipeline.spec (API version: tekton.dev/v1beta1)</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -15627,8 +15646,9 @@ TaskSpec
</td>
<td>
<em>(Optional)</em>
<p>Specifying PipelineSpec can be disabled by setting
<code>disable-inline-spec</code> feature flag..</p>
<p>Specifying TaskSpec can be disabled by setting
<code>disable-inline-spec</code> feature flag.
See Task.spec (API version: tekton.dev/v1beta1)</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -15924,7 +15944,8 @@ CloudEventResource.</p>
<td>
<em>(Optional)</em>
<p>RetriesStatus contains the history of TaskRunStatus in case of a retry in order to keep record of failures.
All TaskRunStatus stored in RetriesStatus will have no date within the RetriesStatus as is redundant.</p>
All TaskRunStatus stored in RetriesStatus will have no date within the RetriesStatus as is redundant.
See TaskRun.status (API version: tekton.dev/v1beta1)</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -15979,7 +16000,8 @@ TaskSpec
</em>
</td>
<td>
<p>TaskSpec contains the Spec from the dereferenced Task definition used to instantiate this TaskRun.</p>
<p>TaskSpec contains the Spec from the dereferenced Task definition used to instantiate this TaskRun.
See Task.spec (API version tekton.dev/v1beta1)</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -16151,7 +16173,8 @@ source mounted into /workspace.</p>
</td>
<td>
<p>Volumes is a collection of volumes that are available to mount into the
steps of the build.</p>
steps of the build.
See Pod.spec.volumes (API version: v1)</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -16395,7 +16418,8 @@ Kubernetes core/v1.PersistentVolumeClaim
<td>
<em>(Optional)</em>
<p>VolumeClaimTemplate is a template for a claim that will be created in the same namespace.
The PipelineRun controller is responsible for creating a unique claim for each instance of PipelineRun.</p>
The PipelineRun controller is responsible for creating a unique claim for each instance of PipelineRun.
See PersistentVolumeClaim (API version: v1)</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -16822,7 +16846,8 @@ tasks in a pipeline.</p>
</td>
<td>
<em>(Optional)</em>
<p>RetriesStatus contains the history of CustomRunStatus, in case of a retry.</p>
<p>RetriesStatus contains the history of CustomRunStatus, in case of a retry.
See CustomRun.status (API version: tekton.dev/v1beta1)</p>
</td>
</tr>
<tr>
Expand Down
Loading

0 comments on commit e4bbd38

Please sign in to comment.