Skip to content

Commit 30461c5

Browse files
lbernicktekton-robot
authored andcommitted
Add new API versions to /config
This commit adds v1 API versions to the Task, TaskRun, Pipeline, and PipelineRun CRDs, and adds the v1beta1 version to the Run CRD. These versions will not be served to users (served = false) and will not be stored in etcd (storage = false). Tekton devs can experiment with the new CRD versions by locally changing "served" to true. This follows the first step of the plan laid out in the doc "How to add a new APIVersion for your CRD" (https://docs.google.com/document/d/1omfO0O4yoUuM1Fk2E6wjfdVNK6XFSmxI3pb13xQ3rys). Go structs and conversion webhooks will be added in future commits.
1 parent a954e8f commit 30461c5

File tree

5 files changed

+129
-0
lines changed

5 files changed

+129
-0
lines changed

config/300-pipeline.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,24 @@ spec:
6161
# See https://kubernetes.io/blog/2019/06/20/crd-structural-schema/
6262
# See issue: https://github.com/knative/serving/issues/912
6363
x-kubernetes-preserve-unknown-fields: true
64+
- name: v1
65+
served: false
66+
storage: false
67+
# Opt into the status subresource so metadata.generation
68+
# starts to increment
69+
subresources:
70+
status: {}
71+
schema:
72+
openAPIV3Schema:
73+
type: object
74+
# One can use x-kubernetes-preserve-unknown-fields: true
75+
# at the root of the schema (and inside any properties, additionalProperties)
76+
# to get the traditional CRD behaviour that nothing is pruned, despite
77+
# setting spec.preserveUnknownProperties: false.
78+
#
79+
# See https://kubernetes.io/blog/2019/06/20/crd-structural-schema/
80+
# See issue: https://github.com/knative/serving/issues/912
81+
x-kubernetes-preserve-unknown-fields: true
6482
names:
6583
kind: Pipeline
6684
plural: pipelines

config/300-pipelinerun.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,37 @@ spec:
8787
# starts to increment
8888
subresources:
8989
status: {}
90+
- name: v1
91+
served: false
92+
storage: false
93+
schema:
94+
openAPIV3Schema:
95+
type: object
96+
# One can use x-kubernetes-preserve-unknown-fields: true
97+
# at the root of the schema (and inside any properties, additionalProperties)
98+
# to get the traditional CRD behaviour that nothing is pruned, despite
99+
# setting spec.preserveUnknownProperties: false.
100+
#
101+
# See https://kubernetes.io/blog/2019/06/20/crd-structural-schema/
102+
# See issue: https://github.com/knative/serving/issues/912
103+
x-kubernetes-preserve-unknown-fields: true
104+
additionalPrinterColumns:
105+
- name: Succeeded
106+
type: string
107+
jsonPath: ".status.conditions[?(@.type==\"Succeeded\")].status"
108+
- name: Reason
109+
type: string
110+
jsonPath: ".status.conditions[?(@.type==\"Succeeded\")].reason"
111+
- name: StartTime
112+
type: date
113+
jsonPath: .status.startTime
114+
- name: CompletionTime
115+
type: date
116+
jsonPath: .status.completionTime
117+
# Opt into the status subresource so metadata.generation
118+
# starts to increment
119+
subresources:
120+
status: {}
90121
names:
91122
kind: PipelineRun
92123
plural: pipelineruns

config/300-run.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,37 @@ spec:
5656
# starts to increment
5757
subresources:
5858
status: {}
59+
- name: v1beta1
60+
served: false
61+
storage: false
62+
schema:
63+
openAPIV3Schema:
64+
type: object
65+
# One can use x-kubernetes-preserve-unknown-fields: true
66+
# at the root of the schema (and inside any properties, additionalProperties)
67+
# to get the traditional CRD behaviour that nothing is pruned, despite
68+
# setting spec.preserveUnknownProperties: false.
69+
#
70+
# See https://kubernetes.io/blog/2019/06/20/crd-structural-schema/
71+
# See issue: https://github.com/knative/serving/issues/912
72+
x-kubernetes-preserve-unknown-fields: true
73+
additionalPrinterColumns:
74+
- name: Succeeded
75+
type: string
76+
jsonPath: ".status.conditions[?(@.type==\"Succeeded\")].status"
77+
- name: Reason
78+
type: string
79+
jsonPath: ".status.conditions[?(@.type==\"Succeeded\")].reason"
80+
- name: StartTime
81+
type: date
82+
jsonPath: .status.startTime
83+
- name: CompletionTime
84+
type: date
85+
jsonPath: .status.completionTime
86+
# Opt into the status subresource so metadata.generation
87+
# starts to increment
88+
subresources:
89+
status: {}
5990
names:
6091
kind: Run
6192
plural: runs

config/300-task.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,24 @@ spec:
6161
# starts to increment
6262
subresources:
6363
status: {}
64+
- name: v1
65+
served: false
66+
storage: false
67+
schema:
68+
openAPIV3Schema:
69+
type: object
70+
# One can use x-kubernetes-preserve-unknown-fields: true
71+
# at the root of the schema (and inside any properties, additionalProperties)
72+
# to get the traditional CRD behaviour that nothing is pruned, despite
73+
# setting spec.preserveUnknownProperties: false.
74+
#
75+
# See https://kubernetes.io/blog/2019/06/20/crd-structural-schema/
76+
# See issue: https://github.com/knative/serving/issues/912
77+
x-kubernetes-preserve-unknown-fields: true
78+
# Opt into the status subresource so metadata.generation
79+
# starts to increment
80+
subresources:
81+
status: {}
6482
names:
6583
kind: Task
6684
plural: tasks

config/300-taskrun.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,37 @@ spec:
8787
# starts to increment
8888
subresources:
8989
status: {}
90+
- name: v1
91+
served: false
92+
storage: false
93+
schema:
94+
openAPIV3Schema:
95+
type: object
96+
# One can use x-kubernetes-preserve-unknown-fields: true
97+
# at the root of the schema (and inside any properties, additionalProperties)
98+
# to get the traditional CRD behaviour that nothing is pruned, despite
99+
# setting spec.preserveUnknownProperties: false.
100+
#
101+
# See https://kubernetes.io/blog/2019/06/20/crd-structural-schema/
102+
# See issue: https://github.com/knative/serving/issues/912
103+
x-kubernetes-preserve-unknown-fields: true
104+
additionalPrinterColumns:
105+
- name: Succeeded
106+
type: string
107+
jsonPath: ".status.conditions[?(@.type==\"Succeeded\")].status"
108+
- name: Reason
109+
type: string
110+
jsonPath: ".status.conditions[?(@.type==\"Succeeded\")].reason"
111+
- name: StartTime
112+
type: date
113+
jsonPath: .status.startTime
114+
- name: CompletionTime
115+
type: date
116+
jsonPath: .status.completionTime
117+
# Opt into the status subresource so metadata.generation
118+
# starts to increment
119+
subresources:
120+
status: {}
90121
names:
91122
kind: TaskRun
92123
plural: taskruns

0 commit comments

Comments
 (0)