Orange-OpenSource / casskop

This Kubernetes operator automates the Cassandra operations such as deploying a new rack aware cluster, adding/removing nodes, configuring the C* and JVM parameters, upgrading JVM and C* versions, and many more...
https://orange-opensource.github.io/casskop/
Apache License 2.0
183 stars 54 forks source link

CassKop handling of additional local storage #373

Open collinbowers opened 3 years ago

collinbowers commented 3 years ago

Type of question

Are you asking about community best practices, how to implement a specific feature, or about general context and help around casskop ?

Specific question.

Question

What did you do?

I have a large production Cassandra cluster. The boxes that these nodes run on, have multiple disks. I have reserved 1 disk solely for Cassandra local-storage. Another disk is free and ready to be used when needed. Is there a way in Casskop to add that extra disk to the cassandra-cluster config, if needed?

I know the docs say Resizing persistent storage for existing CassandraCluster is not currently supported. You must decide the necessary storage size before deploying the cluster ... but I am wondering if that applies to adding an entire disk to the configuration, rather than 'resizing'?

Environment

Additional context Add any other context about the question here.

cscetbon commented 3 years ago

Hey @collinbowers, I don't think it's supported atm but what you could try (not tested) is use the v2 version (latest) and override data_file_directories with a list of folders, add a storageConfig, and use a PodPreset to inject to mount it in the Cassandra container. I don't think you can mount a storage volume in the main container atm but only in sidecars. We could also accept a PR for that. Try to set up a test like https://github.com/Orange-OpenSource/casskop/tree/master/test/kuttl/sidecars in order to validate if it works or not, and that can be a good start for a PR if it's needed.

I hope it helps.