Skip to main content

MultiCasskop

MultiCasskop describes the desired state of the Cassandra cluster in a multi-site mode we want to setup through the operator.

apiVersion: db.orange.com/v2
kind: MultiCasskop
metadata:
name: multi-casskop-demo
spec:
deleteCassandraCluster: true
base: #<-- Specify the base of our CassandraCluster
apiVersion: "db.orange.com/v2"
kind: "CassandraCluster"
metadata:
name: cassandra-demo
namespace: cassandra-demo
labels:
cluster: casskop
spec:
cassandraImage: cassandra:3.11
bootstrapImage: ghcr.io/cscetbon/casskop-bootstrap:0.1.4
configMapName: cassandra-configmap-v1
service:
annotations:
external-dns.alpha.kubernetes.io/hostname: casskop.external-dns-test.gcp.trycatchlearn.fr.
rollingPartition: 0
dataCapacity: "20Gi"
dataStorageClass: "standard-wait"
imagepullpolicy: IfNotPresent
# imagepullpolicy: Always
hardAntiAffinity: false
deletePVC: true
autoPilot: false
autoUpdateSeedList: false
debug: false
maxPodUnavailable: 1
nodesPerRacks: 1
runAsUser: 999
resources:
limits:
cpu: '1'
memory: 2Gi
status:
seedlist: #<-- at this time the seedlist must be fullfilled manually with known predictive name of pods
- cassandra-demo-dc1-rack1-0.casskop.external-dns-test.gcp.trycatchlearn.fr
- cassandra-demo-dc3-rack3-0.casskop.external-dns-test.gcp.trycatchlearn.fr
- cassandra-demo-dc4-rack4-0.casskop.external-dns-test.gcp.trycatchlearn.fr
- cassandra-demo-dc4-rack4-1.casskop.external-dns-test.gcp.trycatchlearn.fr
override: #<-- Specify overrides of the CassandraCluster depending on the target kubernetes cluster
gke-master-west1-b:
spec:
topology:
dc:
- name: dc1
nodesPerRacks: 1
config:
cassandra-yaml:
num_tokens: 256
labels:
failure-domain.beta.kubernetes.io/region: europe-west1
rack:
- name: rack1
rollingPartition: 0
labels:
failure-domain.beta.kubernetes.io/zone: europe-west1-b
gke-slave-west1-d:
spec:
imagepullpolicy: IfNotPresent
topology:
dc:
- name: dc3
nodesPerRacks: 1
config:
cassandra-yaml:
num_tokens: 256
labels:
failure-domain.beta.kubernetes.io/region: europe-west1
rack:
- name: rack3
labels:
failure-domain.beta.kubernetes.io/zone: europe-west1-d
- name: dc4
nodesPerRacks: 2
config:
cassandra-yaml:
num_tokens: 256
labels:
failure-domain.beta.kubernetes.io/region: europe-west1
rack:
- name: rack4
labels:
failure-domain.beta.kubernetes.io/zone: europe-west1-d

MultiCasskop

FieldTypeDescriptionRequiredDefault
metadataObjectMetadatais metadata that all persisted resources must have, which includes all objects users must create.Nonil
specMultiCasskopSpecdefines the desired state of MultiCasskop.Nonil
statusMultiCasskopStatusdefines the observed state of MultiCasskop.Nonil

MultiCasskopSpec

FieldTypeDescriptionRequiredDefault
deleteCassandraClusterboolIf you have set to true, then when deleting the MultiCassKop object, it will cascade the deletion of the CassandraCluster object in the targeted k8s clusters. Then each local CassKop will delete their Cassandra clusters.Yestrue
baseCassandraClusterDefine for all CassandraCluster the default configurationYes-
overridemap[string]CassandraClusterDefine for each CassandraCluster a specific configuration not shared across all of themYes-

MultiCasskopStatus

FieldTypeDescriptionRequiredDefault