-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add examples for scheduling runs to a Windows node
Some examples have been added to demonstrate how to schedule TaskRuns and PipelineRuns on a Windows node using node selectors and node affinity constraints.
- Loading branch information
1 parent
f9d1f16
commit 5062ac4
Showing
4 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
examples/v1beta1/pipelineruns/no-ci/windows-node-affinity.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Task | ||
metadata: | ||
name: windows-task-na | ||
spec: | ||
steps: | ||
- name: ping-localhost | ||
image: mcr.microsoft.com/windows/nanoserver:1809 | ||
command: ["cmd.exe"] | ||
args: | ||
- "/S" | ||
- "/C" | ||
- "echo Hello from Windows" | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Pipeline | ||
metadata: | ||
name: windows-pipeline-na | ||
spec: | ||
tasks: | ||
- name: windows-task-na | ||
taskRef: | ||
name: windows-task-na | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
name: windows-pipeline-na-run | ||
spec: | ||
pipelineRef: | ||
name: windows-pipeline-na | ||
taskRunSpecs: | ||
- pipelineTaskName: windows-task-na | ||
taskPodTemplate: | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: kubernetes.io/os | ||
operator: In | ||
values: | ||
- windows |
36 changes: 36 additions & 0 deletions
36
examples/v1beta1/pipelineruns/no-ci/windows-node-selectors.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Task | ||
metadata: | ||
name: windows-task-ns | ||
spec: | ||
steps: | ||
- name: ping-localhost | ||
image: mcr.microsoft.com/windows/nanoserver:1809 | ||
command: ["cmd.exe"] | ||
args: | ||
- "/S" | ||
- "/C" | ||
- "echo Hello from Windows" | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Pipeline | ||
metadata: | ||
name: windows-pipeline-ns | ||
spec: | ||
tasks: | ||
- name: windows-task-ns | ||
taskRef: | ||
name: windows-task-ns | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
name: windows-pipeline-ns-run | ||
spec: | ||
pipelineRef: | ||
name: windows-pipeline-ns | ||
taskRunSpecs: | ||
- pipelineTaskName: windows-task-ns | ||
taskPodTemplate: | ||
nodeSelector: | ||
kubernetes.io/os: windows |
31 changes: 31 additions & 0 deletions
31
examples/v1beta1/taskruns/no-ci/windows-node-affinity.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Task | ||
metadata: | ||
name: windows-task-na | ||
spec: | ||
steps: | ||
- name: ping-localhost | ||
image: mcr.microsoft.com/windows/nanoserver:1809 | ||
command: ["cmd.exe"] | ||
args: | ||
- "/S" | ||
- "/C" | ||
- "echo Hello from Windows" | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: TaskRun | ||
metadata: | ||
name: windows-task-na-run | ||
spec: | ||
taskRef: | ||
name: windows-task-na | ||
podTemplate: | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: kubernetes.io/os | ||
operator: In | ||
values: | ||
- windows |
24 changes: 24 additions & 0 deletions
24
examples/v1beta1/taskruns/no-ci/windows-node-selectors.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Task | ||
metadata: | ||
name: windows-task-ns | ||
spec: | ||
steps: | ||
- name: ping-localhost | ||
image: mcr.microsoft.com/windows/nanoserver:1809 | ||
command: ["cmd.exe"] | ||
args: | ||
- "/S" | ||
- "/C" | ||
- "echo Hello from Windows" | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: TaskRun | ||
metadata: | ||
name: windows-task-ns-run | ||
spec: | ||
taskRef: | ||
name: windows-task-ns | ||
podTemplate: | ||
nodeSelector: | ||
kubernetes.io/os: windows |