percona-server-mongodb-operator
percona-server-mongodb-operator copied to clipboard
replsets.podSecurityContext doesn't work
Report
Sysctls values in the option replsets.podSecurityContext
causes the pod to get stuck in CrashLoopBackOff state.
More about the problem
I need to change sysctls
params, so I added podSecurityContext
to the replsets
section:
replsets:
...
podSecurityContext:
sysctls:
- name: net.ipv4.tcp_fin_timeout
value: "30"
After these changes pod got stuck in the CrashLoopBackOff state.
I also tried adding some other options to podSecurityContext
with the same result (in pod I can see this user root:x:0:0:root:/root:/bin/bash
):
runAsUser: 0
runAsGroup: 0
I use perconalab/percona-server-mongodb-operator:1.16.0
and crVersion is 1.16.0
Steps to reproduce
- Add sysctls parameter in
replsets.podSecurityContext
section - Watch pod with mongodb restart in a loop with CrashLoopBackOff status
Versions
Operator (perconalab/percona-server-mongodb-operator:1.16.0
and crVersion is 1.16.0)
Anything else?
Kubernetes version v1.29.7