diff --git a/docs/windows.md b/docs/windows.md index fc3b39bd1dc..93c95f6b7b4 100644 --- a/docs/windows.md +++ b/docs/windows.md @@ -36,12 +36,12 @@ In order to ensure that Tasks are scheduled to a node with the correct host OS, ### Node Selectors -Node selectors are the simplest way to schedule pods to a Windows or Linux node. By default, Kubernetes nodes include a label `kubernetes.io/os` to identify the host OS. The Kubelet populates this with `runtime.GOOS` as defined by Go. Use `spec.podTemplate.nodeSelector` (or `spec.taskRunSpecs[i].taskPodTemplate.nodeSelector` in a PipelineRun) to schedule Tasks to a node with a specific label and value. +Node selectors are the simplest way to schedule pods to a Windows or Linux node. By default, Kubernetes nodes include a label `kubernetes.io/os` to identify the host OS. The Kubelet populates this with `runtime.GOOS` as defined by Go. Use `spec.podTemplate.nodeSelector` (or `spec.taskRunSpecs[i].podTemplate.nodeSelector` in a PipelineRun) to schedule Tasks to a node with a specific label and value. For example: ``` yaml -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: TaskRun metadata: name: windows-taskrun @@ -52,7 +52,7 @@ spec: nodeSelector: kubernetes.io/os: windows --- -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: TaskRun metadata: name: linux-taskrun @@ -71,7 +71,7 @@ Node affinity can be used as an alternative method of defining the OS requiremen For example: ```yaml -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: TaskRun metadata: name: windows-taskrun @@ -89,7 +89,7 @@ spec: values: - windows --- -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: TaskRun metadata: name: linux-taskrun diff --git a/examples/v1/pipelineruns/no-ci/pipelinerun-taskrunspecs.yaml b/examples/v1/pipelineruns/no-ci/pipelinerun-taskrunspecs.yaml index e0de92d4ee6..a6e1e345194 100644 --- a/examples/v1/pipelineruns/no-ci/pipelinerun-taskrunspecs.yaml +++ b/examples/v1/pipelineruns/no-ci/pipelinerun-taskrunspecs.yaml @@ -74,7 +74,7 @@ spec: - pipelineTaskName: first-add-taskspec serviceAccountName: 'default' - pipelineTaskName: second-add-taskspec - taskPodTemplate: + podTemplate: nodeSelector: disktype: ssd params: diff --git a/examples/v1/pipelineruns/no-ci/windows-node-affinity.yaml b/examples/v1/pipelineruns/no-ci/windows-node-affinity.yaml index 7dc33d58917..21b54af2ec2 100644 --- a/examples/v1/pipelineruns/no-ci/windows-node-affinity.yaml +++ b/examples/v1/pipelineruns/no-ci/windows-node-affinity.yaml @@ -31,7 +31,7 @@ spec: name: windows-pipeline-na taskRunSpecs: - pipelineTaskName: windows-task-na - taskPodTemplate: + podTemplate: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: diff --git a/examples/v1/pipelineruns/no-ci/windows-node-selectors.yaml b/examples/v1/pipelineruns/no-ci/windows-node-selectors.yaml index ced1bef6b54..06894ed9af1 100644 --- a/examples/v1/pipelineruns/no-ci/windows-node-selectors.yaml +++ b/examples/v1/pipelineruns/no-ci/windows-node-selectors.yaml @@ -31,6 +31,6 @@ spec: name: windows-pipeline-ns taskRunSpecs: - pipelineTaskName: windows-task-ns - taskPodTemplate: + podTemplate: nodeSelector: kubernetes.io/os: windows