-
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
ReadOnlyRootFilesystem support #661
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR requires modified management-api to start. Here's a YAML to test.. apiVersion: cassandra.datastax.com/v1beta1
kind: CassandraDatacenter
metadata:
name: dc1
annotations:
cassandra.datastax.com/readonly-fs: "true"
spec:
clusterName: cluster1
serverType: cassandra
serverVersion: "4.1.4"
serverImage: michaelburman290/cass-management-api:4.1.4
managementApiAuth:
insecure: {}
size: 2
storageConfig:
cassandraDataVolumeClaimSpec:
storageClassName: standard
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
racks:
- name: r1
- name: r2
podTemplateSpec:
spec:
containers:
- name: "cassandra"
securityContext:
readOnlyRootFilesystem: true
securityContext:
runAsUser: 12345
runAsGroup: 0
runAsNonRoot: true
config:
jvm-server-options:
initial_heap_size: "512m"
max_heap_size: "512m"
additional-jvm-opts:
- "-Dcassandra.system_distributed_replication_per_dc=1" |
burmanm
changed the title
Experimental ReadOnlyRootFilesystem support
ReadOnlyRootFilesystem support
Jul 16, 2024
adejanovski
approved these changes
Jul 18, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as expected 👍
bradfordcp
reviewed
Jul 18, 2024
… cassandra container to run in ReadOnlyRootFilesystem securityContext
…nAsNonRoot to default securityContext
…so we can set it to true by default later), add verification that MCAC is disabled when used with readOnlyRootFilesystem
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does:
Adds new Spec field: ReadOnlyRootFilesystem that adds necessary new volumes and disables MCAC (since it can't work in this system).
See required PR to get it working (smoke_test_read_only_fs uses image based on this PR): k8ssandra/management-api-for-apache-cassandra#491
Which issue(s) this PR fixes:
Fixes #196
Fixes #199
Fixes #210
Checklist