From d1ec0ab362d5c39c30a2699669db045e02b9f2c7 Mon Sep 17 00:00:00 2001 From: Philip Gough Date: Mon, 13 May 2024 09:20:00 +0100 Subject: [PATCH] ci: Add runAsGroup for blackbox exporter containers --- jsonnet/kube-prometheus/components/blackbox-exporter.libsonnet | 2 ++ manifests/blackboxExporter-deployment.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/jsonnet/kube-prometheus/components/blackbox-exporter.libsonnet b/jsonnet/kube-prometheus/components/blackbox-exporter.libsonnet index 3129a4dc..2db244c4 100644 --- a/jsonnet/kube-prometheus/components/blackbox-exporter.libsonnet +++ b/jsonnet/kube-prometheus/components/blackbox-exporter.libsonnet @@ -183,6 +183,7 @@ function(params) { } else { runAsNonRoot: true, runAsUser: 65534, + runAsGroup: 65534, allowPrivilegeEscalation: false, readOnlyRootFilesystem: true, capabilities: { drop: ['ALL'] }, @@ -205,6 +206,7 @@ function(params) { securityContext: { runAsNonRoot: true, runAsUser: 65534, + runAsGroup: 65534, allowPrivilegeEscalation: false, readOnlyRootFilesystem: true, capabilities: { drop: ['ALL'] }, diff --git a/manifests/blackboxExporter-deployment.yaml b/manifests/blackboxExporter-deployment.yaml index a5137130..10fbcce1 100644 --- a/manifests/blackboxExporter-deployment.yaml +++ b/manifests/blackboxExporter-deployment.yaml @@ -48,6 +48,7 @@ spec: drop: - ALL readOnlyRootFilesystem: true + runAsGroup: 65534 runAsNonRoot: true runAsUser: 65534 volumeMounts: @@ -72,6 +73,7 @@ spec: drop: - ALL readOnlyRootFilesystem: true + runAsGroup: 65534 runAsNonRoot: true runAsUser: 65534 terminationMessagePath: /dev/termination-log