Skip to content

Commit 7ffb40c

Browse files
author
eliranb
committed
Add read-only root filesystem support to init containers in deployment and stateful set configurations
1 parent 2be38da commit 7ffb40c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

internal/controller/patch_funcs.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ func (r *LightrunJavaAgentReconciler) addInitContainer(deploymentApplyConfig *ap
141141
).
142142
WithAllowPrivilegeEscalation(false).
143143
WithRunAsNonRoot(true).
144+
WithReadOnlyRootFilesystem(true).
144145
WithSeccompProfile(
145146
corev1ac.SeccompProfile().
146147
WithType(corev1.SeccompProfileTypeRuntimeDefault),
@@ -316,6 +317,7 @@ func (r *LightrunJavaAgentReconciler) addInitContainerToStatefulSet(statefulSetA
316317
).
317318
WithAllowPrivilegeEscalation(false).
318319
WithRunAsNonRoot(true).
320+
WithReadOnlyRootFilesystem(true).
319321
WithSeccompProfile(
320322
corev1ac.SeccompProfile().
321323
WithType(corev1.SeccompProfileTypeRuntimeDefault),

0 commit comments

Comments
 (0)