Skip to content

Commit

Permalink
Set runAsUser uid for nonroot distroless image
Browse files Browse the repository at this point in the history
Port of tektoncd/pipeline#3342:

The distroless nonroot image define a user with the uid 65532 and not 1001. The
deployment should use that uid to make sure it works anywhere.

Fixes #781

Signed-off-by: Dibyo Mukherjee <dibyo@google.com>
  • Loading branch information
dibyom authored and tekton-robot committed Oct 8, 2020
1 parent 11b372c commit 09539a8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,7 @@ spec:
value: config-observability-triggers
- name: METRICS_DOMAIN
value: tekton.dev/triggers
securityContext:
allowPrivilegeEscalation: false
# User 65532 is the distroless nonroot user ID
runAsUser: 65532
4 changes: 4 additions & 0 deletions config/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,7 @@ spec:
containerPort: 8008
- name: https-webhook
containerPort: 8443
securityContext:
allowPrivilegeEscalation: false
# User 65532 is the distroless nonroot user ID
runAsUser: 65532

0 comments on commit 09539a8

Please sign in to comment.