diff --git a/Dockerfile b/Dockerfile index 6ef34d251..46ada8702 100644 --- a/Dockerfile +++ b/Dockerfile @@ -91,8 +91,8 @@ FROM debian:bookworm-slim as controller LABEL org.opencontainers.image.source="https://github.com/fluxcd/source-controller" # Configure user -RUN groupadd controller && \ - useradd --gid controller --shell /bin/sh --create-home controller +RUN addgroup --gid 65532 controller && \ + useradd -u 65532 -s /sbin/nologin -g controller controller ARG TARGETPLATFORM RUN apt update && apt install -y ca-certificates diff --git a/config/manager/deployment.yaml b/config/manager/deployment.yaml index c3c59047d..debaf6de9 100644 --- a/config/manager/deployment.yaml +++ b/config/manager/deployment.yaml @@ -20,9 +20,9 @@ spec: prometheus.io/port: "8080" spec: terminationGracePeriodSeconds: 10 - # Required for AWS IAM Role bindings - # https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts-technical-overview.html securityContext: + # Required for AWS IAM Role bindings + # https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts-technical-overview.html fsGroup: 1337 containers: - name: manager @@ -31,6 +31,10 @@ spec: securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true + capabilities: + drop: [ "ALL" ] + seccompProfile: + type: RuntimeDefault ports: - containerPort: 9090 name: http