components/*: Forbid write access to root filesystem

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
Arthur Silva Sens
2022-01-27 09:13:18 +00:00
committed by ArthurSens
parent 48b2bb6a72
commit 57c46a2861
13 changed files with 33 additions and 5 deletions

View File

@@ -125,11 +125,17 @@ function(params)
image: po._config.kubeRbacProxyImage,
}),
// FIXME(ArthurSens): The securityContext overrides can be removed after some PRs get merged
// 'readOnlyRootFilesystem: true' can be deleted when https://github.com/prometheus-operator/prometheus-operator/pull/4531 gets merged.
deployment+: {
spec+: {
template+: {
spec+: {
containers+: [kubeRbacProxy],
containers: std.map(function(c) c {
securityContext+: {
readOnlyRootFilesystem: true,
},
}, super.containers) + [kubeRbacProxy],
},
},
},