Skip to content

Commit

Permalink
[WIP] Swap v1 storage version
Browse files Browse the repository at this point in the history
This commit swaps the V1 as the storedVersion. It changes all the reconciler
logics to be based on V1.

It involes the following changes:
- Swap all v1beta1 to v1
- For deprecated fields convert from annotations to v1beta1 structs
  • Loading branch information
JeromeJu committed Apr 11, 2023
1 parent d027195 commit 70f157c
Show file tree
Hide file tree
Showing 151 changed files with 7,783 additions and 7,653 deletions.
4 changes: 2 additions & 2 deletions config/300-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
versions:
- name: v1beta1
served: true
storage: true
storage: false
subresources:
status: {}
schema:
Expand All @@ -43,7 +43,7 @@ spec:
x-kubernetes-preserve-unknown-fields: true
- name: v1
served: true
storage: false
storage: true
schema:
openAPIV3Schema:
type: object
Expand Down
4 changes: 2 additions & 2 deletions config/300-pipelinerun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
versions:
- name: v1beta1
served: true
storage: true
storage: false
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -58,7 +58,7 @@ spec:
status: {}
- name: v1
served: true
storage: false
storage: true
schema:
openAPIV3Schema:
type: object
Expand Down
4 changes: 2 additions & 2 deletions config/300-task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
versions:
- name: v1beta1
served: true
storage: true
storage: false
schema:
openAPIV3Schema:
type: object
Expand All @@ -45,7 +45,7 @@ spec:
status: {}
- name: v1
served: true
storage: false
storage: true
schema:
openAPIV3Schema:
type: object
Expand Down
4 changes: 2 additions & 2 deletions config/300-taskrun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
versions:
- name: v1beta1
served: true
storage: true
storage: false
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -58,7 +58,7 @@ spec:
status: {}
- name: v1
served: true
storage: false
storage: true
schema:
openAPIV3Schema:
type: object
Expand Down
138 changes: 25 additions & 113 deletions docs/pipeline-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ ResolutionRequestSpec
<td>
<code>params</code><br/>
<em>
<a href="#tekton.dev/v1beta1.Param">
<a href="#tekton.dev/v1.Param">
[]Param
</a>
</em>
Expand Down Expand Up @@ -345,7 +345,7 @@ ResolutionRequest CRD.</p>
<td>
<code>params</code><br/>
<em>
<a href="#tekton.dev/v1beta1.Param">
<a href="#tekton.dev/v1.Param">
[]Param
</a>
</em>
Expand Down Expand Up @@ -456,7 +456,7 @@ ConfigSource
<td>
<code>refSource</code><br/>
<em>
<a href="#tekton.dev/v1beta1.RefSource">
<a href="#tekton.dev/v1.RefSource">
RefSource
</a>
</em>
Expand Down Expand Up @@ -1570,6 +1570,9 @@ IncludeParamsList
</table>
<h3 id="tekton.dev/v1.Param">Param
</h3>
<p>
(<em>Appears on:</em><a href="#tekton.dev/v1alpha1.RunSpec">RunSpec</a>, <a href="#resolution.tekton.dev/v1beta1.ResolutionRequestSpec">ResolutionRequestSpec</a>)
</p>
<div>
<p>Param declares an ParamValues to use for the parameter called name.</p>
</div>
Expand Down Expand Up @@ -2750,7 +2753,7 @@ Refer Go&rsquo;s ParseDuration documentation for expected format: <a href="https
<h3 id="tekton.dev/v1.PipelineTaskMetadata">PipelineTaskMetadata
</h3>
<p>
(<em>Appears on:</em><a href="#tekton.dev/v1.EmbeddedTask">EmbeddedTask</a>, <a href="#tekton.dev/v1.PipelineTaskRunSpec">PipelineTaskRunSpec</a>)
(<em>Appears on:</em><a href="#tekton.dev/v1.EmbeddedTask">EmbeddedTask</a>, <a href="#tekton.dev/v1.PipelineTaskRunSpec">PipelineTaskRunSpec</a>, <a href="#tekton.dev/v1alpha1.EmbeddedRunSpec">EmbeddedRunSpec</a>)
</p>
<div>
<p>PipelineTaskMetadata contains the labels or annotations for an EmbeddedTask</p>
Expand Down Expand Up @@ -3127,7 +3130,7 @@ github.com/tektoncd/pipeline/pkg/apis/config.FeatureFlags
<h3 id="tekton.dev/v1.RefSource">RefSource
</h3>
<p>
(<em>Appears on:</em><a href="#tekton.dev/v1.Provenance">Provenance</a>)
(<em>Appears on:</em><a href="#tekton.dev/v1.Provenance">Provenance</a>, <a href="#resolution.tekton.dev/v1beta1.ResolutionRequestStatusFields">ResolutionRequestStatusFields</a>)
</p>
<div>
<p>RefSource contains the information that can uniquely identify where a remote
Expand Down Expand Up @@ -4524,7 +4527,7 @@ More info: <a href="https://kubernetes.io/docs/tasks/configure-pod-container/sec
<h3 id="tekton.dev/v1.TaskRef">TaskRef
</h3>
<p>
(<em>Appears on:</em><a href="#tekton.dev/v1.PipelineTask">PipelineTask</a>, <a href="#tekton.dev/v1.TaskRunSpec">TaskRunSpec</a>)
(<em>Appears on:</em><a href="#tekton.dev/v1.PipelineTask">PipelineTask</a>, <a href="#tekton.dev/v1.TaskRunSpec">TaskRunSpec</a>, <a href="#tekton.dev/v1alpha1.RunSpec">RunSpec</a>)
</p>
<div>
<p>TaskRef can be used to refer to a specific instance of a task.</p>
Expand Down Expand Up @@ -5614,7 +5617,7 @@ All of them need to evaluate to True for a guarded Task to be executed.</p>
<h3 id="tekton.dev/v1.WorkspaceBinding">WorkspaceBinding
</h3>
<p>
(<em>Appears on:</em><a href="#tekton.dev/v1.PipelineRunSpec">PipelineRunSpec</a>, <a href="#tekton.dev/v1.TaskRunSpec">TaskRunSpec</a>)
(<em>Appears on:</em><a href="#tekton.dev/v1.PipelineRunSpec">PipelineRunSpec</a>, <a href="#tekton.dev/v1.TaskRunSpec">TaskRunSpec</a>, <a href="#tekton.dev/v1alpha1.RunSpec">RunSpec</a>)
</p>
<div>
<p>WorkspaceBinding maps a Task&rsquo;s declared workspace to a Volume.</p>
Expand Down Expand Up @@ -6005,7 +6008,7 @@ RunSpec
<td>
<code>ref</code><br/>
<em>
<a href="#tekton.dev/v1beta1.TaskRef">
<a href="#tekton.dev/v1.TaskRef">
TaskRef
</a>
</em>
Expand Down Expand Up @@ -6036,8 +6039,8 @@ EmbeddedRunSpec
<td>
<code>params</code><br/>
<em>
<a href="#tekton.dev/v1beta1.Params">
Params
<a href="#tekton.dev/v1.Param">
[]Param
</a>
</em>
</td>
Expand Down Expand Up @@ -6129,7 +6132,7 @@ Refer Go&rsquo;s ParseDuration documentation for expected format: <a href="https
<td>
<code>workspaces</code><br/>
<em>
<a href="#tekton.dev/v1beta1.WorkspaceBinding">
<a href="#tekton.dev/v1.WorkspaceBinding">
[]WorkspaceBinding
</a>
</em>
Expand Down Expand Up @@ -6460,7 +6463,7 @@ KeyRef
<td>
<code>metadata</code><br/>
<em>
<a href="#tekton.dev/v1beta1.PipelineTaskMetadata">
<a href="#tekton.dev/v1.PipelineTaskMetadata">
PipelineTaskMetadata
</a>
</em>
Expand Down Expand Up @@ -6660,7 +6663,7 @@ Hub resource: <a href="https://artifacthub.io/*">https://artifacthub.io/*</a>,</
<td>
<code>ref</code><br/>
<em>
<a href="#tekton.dev/v1beta1.TaskRef">
<a href="#tekton.dev/v1.TaskRef">
TaskRef
</a>
</em>
Expand Down Expand Up @@ -6691,8 +6694,8 @@ EmbeddedRunSpec
<td>
<code>params</code><br/>
<em>
<a href="#tekton.dev/v1beta1.Params">
Params
<a href="#tekton.dev/v1.Param">
[]Param
</a>
</em>
</td>
Expand Down Expand Up @@ -6784,7 +6787,7 @@ Refer Go&rsquo;s ParseDuration documentation for expected format: <a href="https
<td>
<code>workspaces</code><br/>
<em>
<a href="#tekton.dev/v1beta1.WorkspaceBinding">
<a href="#tekton.dev/v1.WorkspaceBinding">
[]WorkspaceBinding
</a>
</em>
Expand Down Expand Up @@ -9348,7 +9351,7 @@ IncludeParamsList
<h3 id="tekton.dev/v1beta1.Param">Param
</h3>
<p>
(<em>Appears on:</em><a href="#tekton.dev/v1beta1.TaskRunInputs">TaskRunInputs</a>, <a href="#resolution.tekton.dev/v1beta1.ResolutionRequestSpec">ResolutionRequestSpec</a>)
(<em>Appears on:</em><a href="#tekton.dev/v1beta1.TaskRunInputs">TaskRunInputs</a>)
</p>
<div>
<p>Param declares an ParamValues to use for the parameter called name.</p>
Expand Down Expand Up @@ -9552,7 +9555,7 @@ map[string]string
<h3 id="tekton.dev/v1beta1.Params">Params
(<code>[]github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Param</code> alias)</h3>
<p>
(<em>Appears on:</em><a href="#tekton.dev/v1alpha1.RunSpec">RunSpec</a>, <a href="#tekton.dev/v1beta1.CustomRunSpec">CustomRunSpec</a>, <a href="#tekton.dev/v1beta1.IncludeParams">IncludeParams</a>, <a href="#tekton.dev/v1beta1.Matrix">Matrix</a>, <a href="#tekton.dev/v1beta1.PipelineRunSpec">PipelineRunSpec</a>, <a href="#tekton.dev/v1beta1.PipelineTask">PipelineTask</a>, <a href="#tekton.dev/v1beta1.ResolverRef">ResolverRef</a>, <a href="#tekton.dev/v1beta1.TaskRunSpec">TaskRunSpec</a>)
(<em>Appears on:</em><a href="#tekton.dev/v1beta1.CustomRunSpec">CustomRunSpec</a>, <a href="#tekton.dev/v1beta1.IncludeParams">IncludeParams</a>, <a href="#tekton.dev/v1beta1.Matrix">Matrix</a>, <a href="#tekton.dev/v1beta1.PipelineRunSpec">PipelineRunSpec</a>, <a href="#tekton.dev/v1beta1.PipelineTask">PipelineTask</a>, <a href="#tekton.dev/v1beta1.ResolverRef">ResolverRef</a>, <a href="#tekton.dev/v1beta1.TaskRunSpec">TaskRunSpec</a>)
</p>
<div>
<p>Params is a list of Param</p>
Expand Down Expand Up @@ -10820,7 +10823,7 @@ string
<h3 id="tekton.dev/v1beta1.PipelineTaskMetadata">PipelineTaskMetadata
</h3>
<p>
(<em>Appears on:</em><a href="#tekton.dev/v1alpha1.EmbeddedRunSpec">EmbeddedRunSpec</a>, <a href="#tekton.dev/v1beta1.EmbeddedCustomRunSpec">EmbeddedCustomRunSpec</a>, <a href="#tekton.dev/v1beta1.EmbeddedTask">EmbeddedTask</a>, <a href="#tekton.dev/v1beta1.PipelineTaskRunSpec">PipelineTaskRunSpec</a>)
(<em>Appears on:</em><a href="#tekton.dev/v1beta1.EmbeddedCustomRunSpec">EmbeddedCustomRunSpec</a>, <a href="#tekton.dev/v1beta1.EmbeddedTask">EmbeddedTask</a>, <a href="#tekton.dev/v1beta1.PipelineTaskRunSpec">PipelineTaskRunSpec</a>)
</p>
<div>
<p>PipelineTaskMetadata contains the labels or annotations for an EmbeddedTask</p>
Expand Down Expand Up @@ -11259,7 +11262,7 @@ github.com/tektoncd/pipeline/pkg/apis/config.FeatureFlags
<h3 id="tekton.dev/v1beta1.RefSource">RefSource
</h3>
<p>
(<em>Appears on:</em><a href="#tekton.dev/v1beta1.Provenance">Provenance</a>, <a href="#resolution.tekton.dev/v1alpha1.ResolutionRequestStatusFields">ResolutionRequestStatusFields</a>, <a href="#resolution.tekton.dev/v1beta1.ResolutionRequestStatusFields">ResolutionRequestStatusFields</a>)
(<em>Appears on:</em><a href="#tekton.dev/v1beta1.Provenance">Provenance</a>, <a href="#resolution.tekton.dev/v1alpha1.ResolutionRequestStatusFields">ResolutionRequestStatusFields</a>)
</p>
<div>
<p>RefSource contains the information that can uniquely identify where a remote
Expand Down Expand Up @@ -11428,16 +11431,6 @@ string
</tr>
</tbody>
</table>
<h3 id="tekton.dev/v1beta1.ResultType">ResultType
(<code>int</code> alias)</h3>
<p>
(<em>Appears on:</em><a href="#tekton.dev/v1beta1.RunResult">RunResult</a>)
</p>
<div>
<p>ResultType used to find out whether a RunResult is from a task result or not
Note that ResultsType is another type which is used to define the data type
(e.g. string, array, etc) we used for Results</p>
</div>
<h3 id="tekton.dev/v1beta1.ResultsType">ResultsType
(<code>string</code> alias)</h3>
<p>
Expand All @@ -11455,71 +11448,6 @@ this ResultsType.</p>
<div>
<p>RunObject is implemented by CustomRun and Run</p>
</div>
<h3 id="tekton.dev/v1beta1.RunResult">RunResult
</h3>
<p>
(<em>Appears on:</em><a href="#tekton.dev/v1beta1.TaskRunStatusFields">TaskRunStatusFields</a>)
</p>
<div>
<p>RunResult is used to write key/value pairs to TaskRun pod termination messages.
The key/value pairs may come from the entrypoint binary, or represent a TaskRunResult.
If they represent a TaskRunResult, the key is the name of the result and the value is the
JSON-serialized value of the result.</p>
</div>
<table>
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>key</code><br/>
<em>
string
</em>
</td>
<td>
</td>
</tr>
<tr>
<td>
<code>value</code><br/>
<em>
string
</em>
</td>
<td>
</td>
</tr>
<tr>
<td>
<code>resourceName</code><br/>
<em>
string
</em>
</td>
<td>
<p>ResourceName may be used in tests, but it is not populated in termination messages.
It is preserved here for backwards compatibility and will not be ported to v1.</p>
</td>
</tr>
<tr>
<td>
<code>type</code><br/>
<em>
<a href="#tekton.dev/v1beta1.ResultType">
ResultType
</a>
</em>
</td>
<td>
</td>
</tr>
</tbody>
</table>
<h3 id="tekton.dev/v1beta1.Sidecar">Sidecar
</h3>
<p>
Expand Down Expand Up @@ -13025,7 +12953,7 @@ Default is false.</p>
<h3 id="tekton.dev/v1beta1.TaskRef">TaskRef
</h3>
<p>
(<em>Appears on:</em><a href="#tekton.dev/v1alpha1.RunSpec">RunSpec</a>, <a href="#tekton.dev/v1beta1.CustomRunSpec">CustomRunSpec</a>, <a href="#tekton.dev/v1beta1.PipelineTask">PipelineTask</a>, <a href="#tekton.dev/v1beta1.TaskRunSpec">TaskRunSpec</a>)
(<em>Appears on:</em><a href="#tekton.dev/v1beta1.CustomRunSpec">CustomRunSpec</a>, <a href="#tekton.dev/v1beta1.PipelineTask">PipelineTask</a>, <a href="#tekton.dev/v1beta1.TaskRunSpec">TaskRunSpec</a>)
</p>
<div>
<p>TaskRef can be used to refer to a specific instance of a task.</p>
Expand Down Expand Up @@ -13964,22 +13892,6 @@ All TaskRunStatus stored in RetriesStatus will have no date within the RetriesSt
</tr>
<tr>
<td>
<code>resourcesResult</code><br/>
<em>
<a href="#tekton.dev/v1beta1.RunResult">
[]RunResult
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Results from Resources built during the TaskRun.
This is tomb-stoned along with the removal of pipelineResources
Deprecated: this field is not populated and is preserved only for backwards compatibility</p>
</td>
</tr>
<tr>
<td>
<code>taskResults</code><br/>
<em>
<a href="#tekton.dev/v1beta1.TaskRunResult">
Expand Down Expand Up @@ -14369,7 +14281,7 @@ All of them need to evaluate to True for a guarded Task to be executed.</p>
<h3 id="tekton.dev/v1beta1.WorkspaceBinding">WorkspaceBinding
</h3>
<p>
(<em>Appears on:</em><a href="#tekton.dev/v1alpha1.RunSpec">RunSpec</a>, <a href="#tekton.dev/v1beta1.CustomRunSpec">CustomRunSpec</a>, <a href="#tekton.dev/v1beta1.PipelineRunSpec">PipelineRunSpec</a>, <a href="#tekton.dev/v1beta1.TaskRunSpec">TaskRunSpec</a>)
(<em>Appears on:</em><a href="#tekton.dev/v1beta1.CustomRunSpec">CustomRunSpec</a>, <a href="#tekton.dev/v1beta1.PipelineRunSpec">PipelineRunSpec</a>, <a href="#tekton.dev/v1beta1.TaskRunSpec">TaskRunSpec</a>)
</p>
<div>
<p>WorkspaceBinding maps a Task&rsquo;s declared workspace to a Volume.</p>
Expand Down
Loading

0 comments on commit 70f157c

Please sign in to comment.