diff --git a/hack/allocate.sh b/hack/allocate.sh index c2dcae3ac1..54d13f0f7d 100755 --- a/hack/allocate.sh +++ b/hack/allocate.sh @@ -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}" } diff --git a/pkg/pipelines/tekton/tasks.go b/pkg/pipelines/tekton/tasks.go index 4a9c584904..b21fe1cc4f 100644 --- a/pkg/pipelines/tekton/tasks.go +++ b/pkg/pipelines/tekton/tasks.go @@ -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 diff --git a/pkg/pipelines/tekton/templates.go b/pkg/pipelines/tekton/templates.go index 3d22cdeb4b..4352623cb5 100644 --- a/pkg/pipelines/tekton/templates.go +++ b/pkg/pipelines/tekton/templates.go @@ -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: @@ -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` diff --git a/pkg/pipelines/tekton/templates_pack.go b/pkg/pipelines/tekton/templates_pack.go index e9ab0e3953..f38c39d36f 100644 --- a/pkg/pipelines/tekton/templates_pack.go +++ b/pkg/pipelines/tekton/templates_pack.go @@ -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 diff --git a/pkg/pipelines/tekton/templates_s2i.go b/pkg/pipelines/tekton/templates_s2i.go index 7315a382bb..2c4c53a6f0 100644 --- a/pkg/pipelines/tekton/templates_s2i.go +++ b/pkg/pipelines/tekton/templates_s2i.go @@ -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