Skip to content

Commit f4537dd

Browse files
authored
fix: use 0 group id for func-buildpacks Task (#1105)
Signed-off-by: Zbynek Roubalik <[email protected]>
1 parent c57af36 commit f4537dd

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

Diff for: pipelines/resources/tekton/task/func-buildpacks/0.1/func-buildpacks.yaml

+12-8
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ spec:
5858
default: "1000"
5959
- name: GROUP_ID
6060
description: The group ID of the builder image user.
61-
default: "1000"
61+
default: "0"
62+
##############################################################
63+
##### "default" has been changed to "0" for Knative Functions
6264
- name: PLATFORM_DIR
6365
description: The name of the platform directory.
6466
default: empty-dir
@@ -87,8 +89,8 @@ spec:
8789
chown -R "$(params.USER_ID):$(params.GROUP_ID)" "$(workspaces.cache.path)"
8890
fi
8991
90-
############################################
91-
# "/emptyDir" has been added for Knative Functions
92+
#######################################################
93+
##### "/emptyDir" has been added for Knative Functions
9294
for path in "/tekton/home" "/layers" "/emptyDir" "$(workspaces.source.path)"; do
9395
echo "> Setting permissions on '$path'..."
9496
chown -R "$(params.USER_ID):$(params.GROUP_ID)" "$path"
@@ -143,8 +145,8 @@ spec:
143145
mountPath: /layers
144146
- name: $(params.PLATFORM_DIR)
145147
mountPath: /platform
146-
############################################
147-
# "/emptyDir" has been added for Knative Functions
148+
########################################################
149+
##### "/emptyDir" has been added for Knative Functions
148150
- name: empty-dir
149151
mountPath: /emptyDir
150152

@@ -176,7 +178,9 @@ spec:
176178
mountPath: /platform
177179
securityContext:
178180
runAsUser: 1000
179-
runAsGroup: 1000
181+
#################################################################
182+
##### "runAsGroup" has been changed to "0" for Knative Functions
183+
runAsGroup: 0
180184

181185
- name: results
182186
image: docker.io/library/bash:5.1.4@sha256:b208215a4655538be652b2769d82e576bc4d0a2bb132144c060efc5be8c3f5d6
@@ -213,8 +217,8 @@ spec:
213217
volumeMounts:
214218
- name: layers-dir
215219
mountPath: /layers
216-
############################################
217-
# "/emptyDir" has been added for Knative Functions
220+
########################################################
221+
##### "/emptyDir" has been added for Knative Functions
218222
- name: empty-dir
219223
mountPath: /emptyDir
220224

0 commit comments

Comments
 (0)