Skip to content

Commit

Permalink
fix: specify nonroot uid for manager
Browse files Browse the repository at this point in the history
See kubernetes-sigs/kubebuilder#1635 for more
info

Signed-off-by: He Weiwei <[email protected]>
  • Loading branch information
heww committed Jan 27, 2021
1 parent 2be3d76 commit f3ffc12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY manager .
USER nonroot:nonroot
USER 65532:65532

ENTRYPOINT ["/manager"]
4 changes: 4 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ spec:
labels:
control-plane: harbor-operator
spec:
securityContext:
runAsUser: 65532
containers:
- command:
- /manager
args:
- --enable-leader-election
image: goharbor/harbor-operator:dev
name: manager
securityContext:
allowPrivilegeEscalation: false
resources:
limits:
cpu: 500m
Expand Down

0 comments on commit f3ffc12

Please sign in to comment.