Skip to content

Commit c65a9ba

Browse files
knan-nrkFxKu
authored andcommitted
specify ReadOnlyRootFilesystem: false for pod security policies (zalando#560)
Explicitly specify ReadOnlyRootFilesystem: false so kubernetes can pick a less restrictive policy the operator has access to.
1 parent 44acd7e commit c65a9ba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/cluster/k8sres.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,8 @@ func generateContainer(
359359
volumeMounts []v1.VolumeMount,
360360
privilegedMode bool,
361361
) *v1.Container {
362+
falseBool := false
363+
362364
return &v1.Container{
363365
Name: name,
364366
Image: *dockerImage,
@@ -382,6 +384,7 @@ func generateContainer(
382384
Env: envVars,
383385
SecurityContext: &v1.SecurityContext{
384386
Privileged: &privilegedMode,
387+
ReadOnlyRootFilesystem: &falseBool,
385388
},
386389
}
387390
}

0 commit comments

Comments
 (0)