fix: affinity/coschedule tekton issues

Workspace set must be identical for all the tasks.
Having strict subset of workspaces clearly does not work.

Signed-off-by: Matej Vašek <mvasek@redhat.com>
This commit is contained in:
Matej Vašek 2025-08-07 14:15:26 +02:00
parent aeb51b3f61
commit 92dc5fd553
No known key found for this signature in database
GPG Key ID: 72036E3FC07BF8F1
4 changed files with 28 additions and 12 deletions

View File

@ -412,18 +412,6 @@ tekton() {
$KUBECTL create clusterrolebinding "${namespace}:knative-serving-namespaced-admin" --clusterrole=knative-serving-namespaced-admin --serviceaccount="${namespace}:default"
# TEMPORARY WORKAROUND: Disable affinity assistant to prevent pod scheduling issues
# This is a workaround for issues where affinity assistant pod names don't match
# what's expected by task pods, causing them to fail scheduling.
# Related issues:
# - https://github.com/tektoncd/pipeline/issues/6740
# - https://github.com/tektoncd/pipeline/issues/7503
# TODO: Remove this workaround once the underlying Tekton issue is resolved
echo "${blue}- Disabling affinity assistant (temporary workaround)${reset}"
$KUBECTL patch configmap feature-flags -n tekton-pipelines \
-p '{"data":{"disable-affinity-assistant":"true", "coschedule":"disabled"}}' \
--type=merge
echo "${green}✅ Tekton${reset}"
}

View File

@ -416,6 +416,12 @@ spec:
workspaces:
- name: source
description: The workspace containing the function project
- name: cache
optional: true
- name: sslcertdir
optional: true
- name: dockerconfig
optional: true
steps:
- name: func-deploy
image: "%s"
@ -443,6 +449,12 @@ spec:
workspaces:
- name: source
description: The workspace containing the function project
- name: cache
optional: true
- name: sslcertdir
optional: true
- name: dockerconfig
optional: true
steps:
- name: func-scaffold
image: %s

View File

@ -49,6 +49,10 @@ spec:
workspaces:
- name: source
workspace: source-workspace
- name: cache
workspace: cache-workspace
- name: dockerconfig
workspace: dockerconfig-workspace
{{.RunAfterFetchSources}}
{{.FuncScaffoldTaskRef}}
- name: build
@ -86,6 +90,10 @@ spec:
workspaces:
- name: source
workspace: source-workspace
- name: cache
workspace: cache-workspace
- name: dockerconfig
workspace: dockerconfig-workspace
workspaces:
- description: Directory where function source is located.
name: source-workspace

View File

@ -53,6 +53,10 @@ spec:
workspaces:
- name: source
workspace: source-workspace
- name: cache
workspace: cache-workspace
- name: dockerconfig
workspace: dockerconfig-workspace
{{.RunAfterFetchSources}}
{{.FuncScaffoldTaskRef}}
- name: build
@ -92,6 +96,10 @@ spec:
workspaces:
- name: source
workspace: source-workspace
- name: cache
workspace: cache-workspace
- name: dockerconfig
workspace: dockerconfig-workspace
workspaces:
- description: Directory where function source is located.
name: source-workspace