docs/migrating-v1beta1-to-v1.md
v1beta1 to Tekton v1PipelineRun.Timeout to PipelineRun.TimeoutstaskRef.bundle and pipelineRef.bundle with Bundle ResolverTaskRunTemplate in PipelineRun.SpecThis document describes the differences between v1beta1 Tekton entities and their
v1 counterparts. It also describes the changed fields and the deprecated fields into v1.
In Tekton v1, the following fields have been changed:
| Old field | Replacement |
|---|---|
pipelineRun.spec.Timeout | pipelineRun.spec.timeouts.pipeline |
pipelineRun.spec.taskRunSpecs.taskServiceAccountName | pipelineRun.spec.taskRunSpecs.serviceAccountName |
pipelineRun.spec.taskRunSpecs.taskPodTemplate | pipelineRun.spec.taskRunSpecs.podTemplate |
taskRun.status.taskResults | taskRun.status.results |
pipelineRun.status.pipelineResults | pipelineRun.status.results |
taskRun.spec.taskRef.bundle | taskRun.spec.taskRef.resolver |
pipelineRun.spec.pipelineRef.bundle | pipelineRun.spec.pipelineRef.resolver |
task.spec.resources | removed from Task |
taskrun.spec.resources | removed from TaskRun |
taskRun.status.cloudEvents | removed from TaskRun |
taskRun.status.resourcesResult | removed from TaskRun |
pipeline.spec.resources | removed from Pipeline |
pipelineRun.spec.resources | removed from PipelineRun |
pipelineRun.spec.serviceAccountName | pipelineRun.spec.taskRunTemplate.serviceAccountName |
pipelineRun.spec.podTemplate | pipelineRun.spec.taskRunTemplate.podTemplate |
task.spec.steps[].resources | task.spec.steps[].computeResources |
task.spec.stepTemplate.resources | task.spec.stepTemplate.computeResources |
task.spec.sidecars[].resources | task.spec.sidecars[].computeResources |
taskRun.spec.sidecarOverrides | taskRun.spec.sidecarSpecs |
taskRun.spec.stepOverrides | taskRun.spec.stepSpecs |
taskRun.spec.sidecarSpecs[].resources | taskRun.spec.sidecarSpecs[].computeResources |
taskRun.spec.stepSpecs[].resources | taskRun.spec.stepSpecs[].computeResources |
resources from Task, TaskRun, Pipeline and PipelineRun <a id='replacing-resources-from-task,-taskrun,-pipeline-and-pipelinerun'> </a>PipelineResources and the resources fields of Task, TaskRun, Pipeline and PipelineRun have been removed. Please use Tasks instead. For more information, see Replacing PipelineResources
taskRef.bundle and pipelineRef.bundle with Bundle Resolver <a id='replacing-taskRef.bundle-and-pipelineRef.bundle-with-bundle-resolver'> </a>Note: taskRef.bundle and pipelineRef.bundle are now removed from v1beta1. This is kept for "history" purposes.
Bundle resolver in remote resolution should be used instead of taskRun.spec.taskRef.bundle and pipelineRun.spec.pipelineRef.bundle.
The enable-bundles-resolver feature flag must be enabled to use this feature.
# Before in v1beta1:
apiVersion: tekton.dev/v1beta1
kind: TaskRun
spec:
taskRef:
name: example-task
bundle: python:3-alpine
---
# After in v1:
apiVersion: tekton.dev/v1
kind: TaskRun
spec:
taskRef:
resolver: bundles
params:
- name: bundle
value: python:3-alpine
- name: name
value: taskName
- name: kind
value: Task
ClusterTask is deprecated. Please use the cluster resolver instead.
The enable-cluster-resolver feature flag must be enabled to use this feature.
The cluster resolver allows Pipelines, PipelineRuns, and TaskRuns to refer
to Pipelines and Tasks defined in other namespaces in the cluster.
# Before in v1beta1:
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
name: cluster-task-reference
spec:
taskRef:
name: example-task
kind: ClusterTask
---
# After in v1:
apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
name: cluster-task-reference
spec:
taskRef:
resolver: cluster
params:
- name: kind
value: task
- name: name
value: example-task
- name: namespace
value: example-namespace
For more information, see Remote resolution.
ServiceAccountName and PodTemplate under TaskRunTemplate in PipelineRun.Spec <a id='adding-serviceaccountname-and-podtemplate-under-taskruntemplate-in-pipelinerun.spec'></a>ServiceAccountName and PodTemplate are moved to TaskRunTemplate as TaskRunTemplate.ServiceAccountName and TaskRunTemplate.PodTemplate so that users can specify common configuration in TaskRunTemplate which will apply to all the TaskRuns.
# Before in v1beta1:
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
name: template-pr
spec:
pipelineRef:
name: clone-test-build
serviceAccountName: build
podTemplate:
securityContext:
fsGroup: 65532
---
# After in v1:
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: template-pr
spec:
pipelineRef:
name: clone-test-build
taskRunTemplate:
serviceAccountName: build
podTemplate:
securityContext:
fsGroup: 65532
For more information, see TEP-119.