From 7393c83716dbb2b39146d9e1c312ccde8fa1b0e9 Mon Sep 17 00:00:00 2001 From: Craig Peterson <192540+captncraig@users.noreply.github.com> Date: Wed, 3 Apr 2024 14:04:56 -0400 Subject: [PATCH] set bind permissions on the executable in dockerfile (#6817) * set bind capacity in docker file * add test for nonroot * newline --- cmd/grafana-agent/Dockerfile | 3 +- .../grafana-agent/ci/nonroot-values.yaml | 7 ++ .../grafana-agent/templates/configmap.yaml | 42 +++++++ .../templates/controllers/daemonset.yaml | 81 ++++++++++++ .../nonroot/grafana-agent/templates/rbac.yaml | 117 ++++++++++++++++++ .../grafana-agent/templates/service.yaml | 23 ++++ .../templates/serviceaccount.yaml | 13 ++ 7 files changed, 285 insertions(+), 1 deletion(-) create mode 100644 operations/helm/charts/grafana-agent/ci/nonroot-values.yaml create mode 100644 operations/helm/tests/nonroot/grafana-agent/templates/configmap.yaml create mode 100644 operations/helm/tests/nonroot/grafana-agent/templates/controllers/daemonset.yaml create mode 100644 operations/helm/tests/nonroot/grafana-agent/templates/rbac.yaml create mode 100644 operations/helm/tests/nonroot/grafana-agent/templates/service.yaml create mode 100644 operations/helm/tests/nonroot/grafana-agent/templates/serviceaccount.yaml diff --git a/cmd/grafana-agent/Dockerfile b/cmd/grafana-agent/Dockerfile index 09b38ea7d6e9..d855e2f54d8e 100644 --- a/cmd/grafana-agent/Dockerfile +++ b/cmd/grafana-agent/Dockerfile @@ -41,7 +41,7 @@ LABEL org.opencontainers.image.source="https://github.com/grafana/agent" # Install dependencies needed at runtime. RUN <