Skip to content

Commit bf0c4b9

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]> Signed-off-by: Matej Vašek <[email protected]>
1 parent 915a1a9 commit bf0c4b9

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

pkg/pipelines/tekton/tasks.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,12 @@ spec:
406406
workspaces:
407407
- name: source
408408
description: The workspace containing the function project
409+
- name: cache
410+
optional: true
411+
- name: sslcertdir
412+
optional: true
413+
- name: dockerconfig
414+
optional: true
409415
steps:
410416
- name: func-deploy
411417
image: "%s"
@@ -431,6 +437,15 @@ spec:
431437
- name: path
432438
description: Path to the function project
433439
default: ""
440+
workspaces:
441+
- name: source
442+
description: The workspace containing the function project
443+
- name: cache
444+
optional: true
445+
- name: sslcertdir
446+
optional: true
447+
- name: dockerconfig
448+
optional: true
434449
steps:
435450
- name: func-scaffold
436451
image: %s

pkg/pipelines/tekton/templates_pack.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ spec:
4949
workspaces:
5050
- name: source
5151
workspace: source-workspace
52+
- name: cache
53+
workspace: cache-workspace
54+
- name: dockerconfig
55+
workspace: dockerconfig-workspace
5256
{{.RunAfterFetchSources}}
5357
{{.FuncScaffoldTaskRef}}
5458
- name: build
@@ -86,6 +90,10 @@ spec:
8690
workspaces:
8791
- name: source
8892
workspace: source-workspace
93+
- name: cache
94+
workspace: cache-workspace
95+
- name: dockerconfig
96+
workspace: dockerconfig-workspace
8997
workspaces:
9098
- description: Directory where function source is located.
9199
name: source-workspace

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)