Skip to content

Latest commit

 

History

History
150 lines (132 loc) · 5.68 KB

migrating-v1beta1-to-v1.md

File metadata and controls

150 lines (132 loc) · 5.68 KB

Migrating From Tekton v1beta1 to Tekton v1

This document describes the differences between v1beta1 Tekton entities and their v1 counterparts. It also describes the changed fields and the deprecated fields into v1.

Changes to fields

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

Replacing resources from Task, TaskRun, Pipeline and PipelineRun

PipelineResources and the resources fields of Task, TaskRun, Pipeline and PipelineRun have been removed. Please use Tasks instead. For more information, see Replacing PipelineResources

Replacing taskRef.bundle and pipelineRef.bundle with Bundle Resolver

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

Replacing ClusterTask with Remote Resolution

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.

Adding TaskRunTemplate to PipelineRun.Spec

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.