-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
K8SSAND-954 ⁃ Unable to create CassandraDatacenter if Setup containers.securityContext.readOnlyRootFilesystem: true #196
Comments
Hi @zhimsun What version of cass-operator are you using?
Did you make this change for all containers? If not, which one(s)? I am trying to test and produce with CodeReady Containers, but cass-operator is crashing. Looks like it is happening during initialization. I'll try some more. |
I tested against my local kind cluster with a slightly modified manifest. Here is mine: # Sized to work on 3 k8s workers nodes with 1 core / 4 GB RAM
# See neighboring example-cassdc-full.yaml for docs for each parameter
apiVersion: cassandra.datastax.com/v1beta1
kind: CassandraDatacenter
metadata:
name: dc21
spec:
# nodeAffinityLabels:
# beta.kubernetes.io/arch: amd64
clusterName: cluster2
serverType: dse
serverVersion: "6.8.14"
systemLoggerImage:
serverImage:
configBuilderImage:
managementApiAuth:
insecure: {}
size: 1
# resources:
# requests:
# cpu: 1
# memory: 4Gi
# limits:
# cpu: 1
# memory: 4Gi
storageConfig:
cassandraDataVolumeClaimSpec:
storageClassName: standard
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
dockerImageRunsAsCassandra: false
podTemplateSpec:
spec:
initContainers:
- name: server-config-init
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
readOnlyRootFilesystem: true
runAsNonRoot: true
containers:
- name: "cassandra"
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
readOnlyRootFilesystem: true
runAsNonRoot: true
hostIPC: false
hostNetwork: false
hostPID: false
securityContext:
runAsNonRoot: true
runAsUser: 65533
runAsGroup: 65533
fsGroup: 65533
config:
jvm-server-options:
initial_heap_size: "800M"
max_heap_size: "800M"
additional-jvm-opts:
# As the database comes up for the first time, set system keyspaces to RF=3
- "-Ddse.system_distributed_replication_dc_names=dc21"
- "-Ddse.system_distributed_replication_per_dc=3" I had to update
I deleted my CassandraDatacenter and changed the
I need to pull someone in whose is more familiar with DSE for some help. cc @bradfordcp |
@jsanda my cass-operator version is v1.7.1, I only have one container, For the
but for the
|
@zhimsun can you share the logs from the |
@jsanda The
You can reproduce on your cluster input the
|
What happened?
I tried to create a CassandraDatacenter with the containers.securityContext.readOnlyRootFilesystem: true, but the pod is always in the CrashLoopBackOff status.
The pods are running normally if I change the containers.securityContext.readOnlyRootFilesystem: false
The yaml
The pod status
The pod Events error
Did you expect to see something different?
I expect that containers.securityContext.readOnlyRootFilesystem: true
┆Issue is synchronized with this Jira Task by Unito
┆Reviewer: Michael Burman
┆friendlyId: K8SSAND-954
┆priority: Medium
The text was updated successfully, but these errors were encountered: