Skip to content

Commit 96344d1

Browse files
committed
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 <[email protected]>
1 parent aeb51b3 commit 96344d1

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

hack/allocate.sh

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -412,18 +412,6 @@ tekton() {
412412

413413
$KUBECTL create clusterrolebinding "${namespace}:knative-serving-namespaced-admin" --clusterrole=knative-serving-namespaced-admin --serviceaccount="${namespace}:default"
414414

415-
# TEMPORARY WORKAROUND: Disable affinity assistant to prevent pod scheduling issues
416-
# This is a workaround for issues where affinity assistant pod names don't match
417-
# what's expected by task pods, causing them to fail scheduling.
418-
# Related issues:
419-
# - https://github.com/tektoncd/pipeline/issues/6740
420-
# - https://github.com/tektoncd/pipeline/issues/7503
421-
# TODO: Remove this workaround once the underlying Tekton issue is resolved
422-
echo "${blue}- Disabling affinity assistant (temporary workaround)${reset}"
423-
$KUBECTL patch configmap feature-flags -n tekton-pipelines \
424-
-p '{"data":{"disable-affinity-assistant":"true", "coschedule":"disabled"}}' \
425-
--type=merge
426-
427415
echo "${green}✅ Tekton${reset}"
428416
}
429417

pkg/pipelines/tekton/tasks.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,12 @@ spec:
416416
workspaces:
417417
- name: source
418418
description: The workspace containing the function project
419+
- name: cache
420+
optional: true
421+
- name: sslcertdir
422+
optional: true
423+
- name: dockerconfig
424+
optional: true
419425
steps:
420426
- name: func-deploy
421427
image: "%s"
@@ -443,6 +449,12 @@ spec:
443449
workspaces:
444450
- name: source
445451
description: The workspace containing the function project
452+
- name: cache
453+
optional: true
454+
- name: sslcertdir
455+
optional: true
456+
- name: dockerconfig
457+
optional: true
446458
steps:
447459
- name: func-scaffold
448460
image: %s

pkg/pipelines/tekton/templates_s2i.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ spec:
5353
workspaces:
5454
- name: source
5555
workspace: source-workspace
56+
- name: cache
57+
workspace: cache-workspace
58+
- name: dockerconfig
59+
workspace: dockerconfig-workspace
5660
{{.RunAfterFetchSources}}
5761
{{.FuncScaffoldTaskRef}}
5862
- name: build
@@ -92,6 +96,10 @@ spec:
9296
workspaces:
9397
- name: source
9498
workspace: source-workspace
99+
- name: cache
100+
workspace: cache-workspace
101+
- name: dockerconfig
102+
workspace: dockerconfig-workspace
95103
workspaces:
96104
- description: Directory where function source is located.
97105
name: source-workspace

0 commit comments

Comments
 (0)