Closed armingerten closed 3 years ago
@armingerten thanks for the report. Would you mind creating a PR ? I can guide you if needed.
Sure - I'll create a PR, soon. 👍
I was wondering:
1
? What do you think about using a default value > 1000 (e.g. 2000
) to avoid conflicts with system groups?
Bug Report
What did you do? I deployed an instance of
cassandraclusters.db.orange.com
while having aPodSecurityPolicy
that preventsfsGroup
s < 1000.Relevant section of the
PodSecurityPolicy
:What did you expect to see? The
StatefulSet
created by the operator should start-up.What did you see instead? Under which circumstances? Pod's within the
StatefulSet
were unschedulable.Output of
kubectl describe sts cassandra-dev-dc-rack1
:Warning FailedCreate 16m (x22 over 60m) statefulset-controller create Pod cassandra-dev-dc-rack1-0 in StatefulSet cassandra-dev-dc-rack1 failed error: pods "cassandra-dev-dc-rack1-0" is forbidden: unable to validate against any pod security policy: [spec.securityContext.fsGroup: Invalid value: []int64{1}: group 1 must be in the ranges: [{1000 65536}] spec.containers[0].securityContext.capabilities.add: Invalid value: "IPC_LOCK": capability may not be added]
Environment
v1.1.2-release
v1.18.16
3
Possible Solution The CRD & controller could be enhanced to allow the configuration of arbitrary FSGroups (analogous to the runAsUser option):
Controller:
CRD in Helm Chart