diff --git a/.changes/unreleased/charts-redpanda-Fixed-20251103-205145.yaml b/.changes/unreleased/charts-redpanda-Fixed-20251103-205145.yaml new file mode 100644 index 000000000..0d5e1b654 --- /dev/null +++ b/.changes/unreleased/charts-redpanda-Fixed-20251103-205145.yaml @@ -0,0 +1,5 @@ +project: charts/redpanda +kind: Fixed +body: | + Fix `CreateContainerConfigError: Error: container's runAsUser breaks non-root policy...` error with `statefulset.podTemplate.spec.securityContext.runAsNonRoot: true` +time: 2025-11-03T20:51:45.198677+02:00 diff --git a/charts/redpanda/statefulset.go b/charts/redpanda/statefulset.go index a2151b41e..26dbf420a 100644 --- a/charts/redpanda/statefulset.go +++ b/charts/redpanda/statefulset.go @@ -371,9 +371,10 @@ func statefulSetInitContainerTuning(state *RenderState) *corev1.Container { Capabilities: &corev1.Capabilities{ Add: []corev1.Capability{`SYS_RESOURCE`}, }, - Privileged: ptr.To(true), - RunAsUser: ptr.To(int64(0)), - RunAsGroup: ptr.To(int64(0)), + Privileged: ptr.To(true), + RunAsNonRoot: ptr.To(false), + RunAsUser: ptr.To(int64(0)), + RunAsGroup: ptr.To(int64(0)), }, VolumeMounts: append( CommonMounts(state),