Skip to content

Instantly share code, notes, and snippets.

@jsanda
Created September 27, 2021 16:34
Show Gist options
  • Save jsanda/4782f1ce10e1d04eda64539526dc74f1 to your computer and use it in GitHub Desktop.
Save jsanda/4782f1ce10e1d04eda64539526dc74f1 to your computer and use it in GitHub Desktop.
apiVersion: k8ssandra.io/v1alpha1
kind: K8ssandraCluster
metadata:
name: test
spec:
cassandra:
cluster: test
serverVersion: "4.0.0"
storageConfig:
cassandraDataVolumeClaimSpec:
storageClassName: standard
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
racks:
- name: rack1
nodeAffinityLabels:
rack: rack1
- name: rack2
nodeAffinityLabels:
rack: rack2
- name: rack3
nodeAffinityLabels:
rack: rack3
config:
cassandraYaml:
jvmOptions:
heapSize: "1024M"
resources:
limits:
memory: 2048Mi
datacenters:
- metadata:
name: dc1
k8sContext: gke-east
size: 3
stargate:
size: 3
heapSize: 1024Mi
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: rack
operator: In
values:
- rack1
- rack2
- rack3
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: k8ssandra.io/stargate
operator: In
values:
- test-dc1-stargate
- key: cassandra.datastax.com/datacenter
operator: In
values:
- dc1
topologyKey: kubernetes.io/hostname
- metadata:
name: dc2
k8sContext: gke-central
size: 3
stargate:
size: 3
heapSize: 1024Mi
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: rack
operator: In
values:
- rack1
- rack2
- rack3
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: k8ssandra.io/stargate
operator: In
values:
- test-dc2-stargate
- key: cassandra.datastax.com/datacenter
operator: In
values:
- dc2
topologyKey: kubernetes.io/hostname
- metadata:
name: dc3
k8sContext: gke-west
size: 3
stargate:
size: 3
heapSize: 1024Mi
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: rack
operator: In
values:
- rack1
- rack2
- rack3
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: k8ssandra.io/stargate
operator: In
values:
- test-dc1-stargate
- key: cassandra.datastax.com/datacenter
operator: In
values:
- dc3
topologyKey: kubernetes.io/hostname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment