File tree Expand file tree Collapse file tree
internal/controller/helm_pipeline/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 develop --command run build binary_out=/tmp/plugin-helm-controller
2525EOF
2626
27- FROM gcr.io/distroless/static
27+ FROM gcr.io/distroless/static:nonroot
2828WORKDIR /home/nonroot
29- USER nonroot:nonroot
3029COPY --from=builder --chown=nonroot:nonroot /tmp/plugin-helm-controller ./plugin-helm-controller
3130ENTRYPOINT ["./plugin-helm-controller"]
Original file line number Diff line number Diff line change @@ -15,9 +15,8 @@ mkdir -p /tmp/nix-store-closure
1515cp -R $(nix-store -qR /tmp/output/result) /tmp/nix-store-closure
1616EOF
1717
18- FROM gcr.io/distroless/static
18+ FROM gcr.io/distroless/static:nonroot
1919WORKDIR /home/nonroot
20- USER nonroot:nonroot
2120COPY --from=builder /tmp/nix-store-closure /nix/store
2221COPY --from=builder --chown=nonroot:nonroot /tmp/output/ /app/
2322ENV PATH=/app/result/bin
Original file line number Diff line number Diff line change 8585 - ALL
8686 securityContext :
8787 runAsNonRoot : true
88+ runAsUser : 65532 # nonroot user from gcr.io/distroless/static:nonroot image
89+ runAsGroup : 65532 # nonroot group from gcr.io/distroless/static:nonroot image
90+ allowPrivilegeEscalation : false
8891 serviceAccountName : " plugin-helm-chart"
8992 terminationGracePeriodSeconds : 10
9093
Original file line number Diff line number Diff line change @@ -6,6 +6,13 @@ template:
66 serviceAccountName: {{.ServiceAccountName | toJson }}
77 tolerations: {{ .PodTolerations | default list | toJson }}
88 nodeSelector: {{ .NodeSelector | default dict | toJson }}
9+
10+ securityContext:
11+ runAsNonRoot: true
12+ runAsUser: 65532 # nonroot user from gcr.io /distroless/static:nonroot image
13+ runAsGroup: 65532 # nonroot group from gcr.io /distroless/static:nonroot image
14+ allowPrivilegeEscalation: false
15+
916 containers:
1017 - name: helm
1118 image: {{.Image }}
Original file line number Diff line number Diff line change @@ -6,6 +6,11 @@ template:
66 serviceAccountName: {{.ServiceAccountName | toJson }}
77 tolerations: {{ .PodTolerations | default list | toJson }}
88 nodeSelector: {{ .NodeSelector | default dict | toJson }}
9+ securityContext:
10+ runAsNonRoot: true
11+ runAsUser: 65532 # nonroot user from gcr.io /distroless/static:nonroot image
12+ runAsGroup: 65532 # nonroot group from gcr.io /distroless/static:nonroot image
13+ allowPrivilegeEscalation: false
914 containers:
1015 - name: helm
1116 image: {{.Image }}
You can’t perform that action at this time.
0 commit comments