Launching all pods on single node in Matrix task
Expected Behavior
Pod should be distributed on multiple nodes and should completed in few seconds.
Actual Behavior
I have list of values which I have configured with Matrix to run all in parallel. All pods are launching parallerly but Pod are launching on single node which is impacting to other pods which are hosted in same node.
Steps to Reproduce the Problem
Use mentioned task and try to reproduce
> apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: flyway
spec:
params:
- name: db
type: string
steps:
- name: flyway
image: flyway:v1
onError: continue
command: ["/bin/sh"]
args:
- -c
- |
echo "print ${params.db}"
workspaces:
- name: space
---
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: Flyway-Pipeline
spec:
workspaces:
- name: space
- name: ssh-creds
tasks:
- name: fetchfw
taskRef:
name: git-clone
workspaces:
- name: output
workspace: space
- name: basic-auth
workspace: ssh-creds
params:
- name: url
value: https://github.com/sql.git
- name: deleteExisting
value: false
- name: revision
value: master
- name: arr0
taskRef:
name: flyway
runAfter:
- fetchfw
workspaces:
- name: space
workspace: space
matrix:
params:
- name: db
value: ["abc","bcd","as","df","ds","ds","uy","re","ew","we","te","od","wer"]
Additional Info
-
Kubernetes version:
Output of
kubectl version:
(paste your output here)
-
Tekton Pipeline version:
Output of
tkn versionorkubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'
(paste your output here)
This is expected and is the default behaviour of the affinity assistant. It provides node affinity for TaskRun pods that share a workspace volume.
This behaviour can be modified / disabled, see the docs on the affinity assistant