From 8dd3dcdbc0ef0b0737c783c7aafd0c3560e8850d Mon Sep 17 00:00:00 2001 From: David van der Spek Date: Wed, 11 Dec 2024 13:36:28 +0100 Subject: [PATCH] fix(vpa): run containers as nonroot user by default Signed-off-by: David van der Spek --- vertical-pod-autoscaler/pkg/admission-controller/Dockerfile | 2 +- vertical-pod-autoscaler/pkg/recommender/Dockerfile | 2 +- vertical-pod-autoscaler/pkg/updater/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vertical-pod-autoscaler/pkg/admission-controller/Dockerfile b/vertical-pod-autoscaler/pkg/admission-controller/Dockerfile index c5ef15d76268..57a1f9a2dda7 100644 --- a/vertical-pod-autoscaler/pkg/admission-controller/Dockerfile +++ b/vertical-pod-autoscaler/pkg/admission-controller/Dockerfile @@ -29,7 +29,7 @@ ARG TARGETOS TARGETARCH RUN CGO_ENABLED=0 LD_FLAGS=-s GOARCH=$TARGETARCH GOOS=$TARGETOS go build -C pkg/admission-controller -o admission-controller-$TARGETARCH -FROM gcr.io/distroless/static:latest +FROM gcr.io/distroless/static:nonroot ARG TARGETARCH diff --git a/vertical-pod-autoscaler/pkg/recommender/Dockerfile b/vertical-pod-autoscaler/pkg/recommender/Dockerfile index 26f7b20f0a1d..cdf7921d5589 100644 --- a/vertical-pod-autoscaler/pkg/recommender/Dockerfile +++ b/vertical-pod-autoscaler/pkg/recommender/Dockerfile @@ -29,7 +29,7 @@ ARG TARGETOS TARGETARCH RUN CGO_ENABLED=0 LD_FLAGS=-s GOARCH=$TARGETARCH GOOS=$TARGETOS go build -C pkg/recommender -o recommender-$TARGETARCH -FROM gcr.io/distroless/static:latest +FROM gcr.io/distroless/static:nonroot ARG TARGETARCH diff --git a/vertical-pod-autoscaler/pkg/updater/Dockerfile b/vertical-pod-autoscaler/pkg/updater/Dockerfile index 63de33b1fa32..cf03102f95d2 100644 --- a/vertical-pod-autoscaler/pkg/updater/Dockerfile +++ b/vertical-pod-autoscaler/pkg/updater/Dockerfile @@ -29,7 +29,7 @@ ARG TARGETOS TARGETARCH RUN CGO_ENABLED=0 LD_FLAGS=-s GOARCH=$TARGETARCH GOOS=$TARGETOS go build -C pkg/updater -o updater-$TARGETARCH -FROM gcr.io/distroless/static:latest +FROM gcr.io/distroless/static:nonroot ARG TARGETARCH