Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions hack/allocate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
}

Expand Down
12 changes: 12 additions & 0 deletions pkg/pipelines/tekton/tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
26 changes: 16 additions & 10 deletions pkg/pipelines/tekton/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ const (
name: git-clone
workspaces:
- name: output
workspace: source-workspace`
workspace: source-workspace
- name: cache
workspace: cache-workspace
optional: true
- name: dockerconfig
workspace: dockerconfig-workspace
optional: true`
// TODO fix Tekton Hub reference
taskGitCloneTaskRef = `- name: fetch-sources
params:
Expand All @@ -54,17 +60,17 @@ const (
- name: gitInitImage
value: ghcr.io/tektoncd/github.com/tektoncd/pipeline/cmd/git-init:v0.21.0
taskRef:
resolver: hub
params:
- name: kind
value: task
- name: name
value: git-clone
- name: version
value: "0.4"
kind: Task
name: git-clone
workspaces:
- name: output
workspace: source-workspace`
workspace: source-workspace
- name: cache
workspace: cache-workspace
optional: true
- name: dockerconfig
workspace: dockerconfig-workspace
optional: true`
runAfterFetchSourcesRef = `runAfter:
- fetch-sources`

Expand Down
8 changes: 8 additions & 0 deletions pkg/pipelines/tekton/templates_pack.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions pkg/pipelines/tekton/templates_s2i.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading