-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
documentation and example on running step containers as non root
- Loading branch information
1 parent
32cf66e
commit 2cb262a
Showing
4 changed files
with
136 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Task | ||
metadata: | ||
name: show-non-root-steps | ||
spec: | ||
steps: | ||
# no securityContext specified so will use | ||
# securityContext from TaskRun podTemplate | ||
- name: show-user-1001 | ||
image: ubuntu | ||
command: | ||
- ps | ||
args: | ||
- "aux" | ||
# securityContext specified so will run as | ||
# user 2000 instead of 1001 | ||
- name: show-user-2000 | ||
image: ubuntu | ||
command: | ||
- ps | ||
args: | ||
- "aux" | ||
securityContext: | ||
runAsUser: 2000 | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: TaskRun | ||
metadata: | ||
generateName: show-non-root-steps-run- | ||
spec: | ||
taskRef: | ||
name: show-non-root-steps | ||
podTemplate: | ||
securityContext: | ||
runAsNonRoot: true | ||
runAsUser: 1001 |