/
example-cassdc-full.yaml
161 lines (133 loc) · 5.82 KB
/
example-cassdc-full.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# This example shows off most customization options Cass Operator offers. It's
# built to run on a 6 node regional GKE 1.15.x cluster in the us-central1 region
# with a node pool covering the a, b, and c zones. Data will be stored in a
# rack-safe way across the zones, and it's expected the user will be using RF=3
# keyspaces. The request/limts/configuration is based on k8s worker nodes with
# at least 8 CPUs and 30 GB RAM, but these numbers can be adjusted.
apiVersion: cassandra.datastax.com/v1beta1
kind: CassandraDatacenter
metadata:
# The datacenter name.
name: dc1
spec:
# The cluster name.
clusterName: cluster2
# The number of server nodes.
size: 6
# The rack definitions.
# Each rack is pinned to a Google Cloud zone.
racks:
- name: rack1
zone: us-central1-a
- name: rack2
zone: us-central1-b
- name: rack3
zone: us-central1-c
# Limit each pod to a fixed 6 CPU cores and 24 GB of RAM.
resources:
requests:
memory: 24Gi
cpu: 6000m
limits:
memory: 24Gi
cpu: 6000m
# The storage configuration. This sets up a 100GB volume at /var/lib/cassandra
# on each server pod. The user is left to create the server-storage storage
# class by following these directions...
# https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/ssd-pd
# Make sure to use 'volumeBindingMode: WaitForFirstConsumer' in the resource.
# If you run out of SSD quota in GKE, the PVCs will be left in Pending state
# until you increase quota or consume less.
storageConfig:
cassandraDataVolumeClaimSpec:
storageClassName: server-storage
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Gi
# Multiple server pods running on one k8s worker is disabled by default.
# Enabling this is an advanced use case.
allowMultipleNodesPerWorker: false
# Setting stopped to true scales the StatefulSets that Cass Operator creates
# to zero replicas, in a graceful way. The PersistentVolumeClaims and
# PersistentVolumes remain intact.
stopped: false
# Setting rollingRestartRequested to true will have Cass Operator do a rolling
# restart on this CassDC at the next opportunity. The operator will set this
# back to false once the restart is in progress.
rollingRestartRequested: false
# Using canaryUpgrade will limit config changes that directly impact the
# underlying StatefulSets resources (which is most of them) to only updating
# the first StatefulSet / rack. Users can use this to test configuration
# changes before rolling them out to the whole cluster.
canaryUpgrade: false
# Which server distribution to use. Required.
serverType: "dse"
# Which server version to use. Required.
serverVersion: "6.8.1"
# Use the serverImage configuration to override Cass Operator's logic to map
# the serverType plus serverVersion into a public container image on Docker
# Hub.
serverImage: ""
# This allows the user to override the default location of the
# cass-config-builder image. It is the init container that turns the config
# information below into config files on the filesystem in each server pod.
configBuilderImage: ""
# Use superuserSecretName to setup superuser pre-defined credentials for the
# database in a Kubernetes secret. Cass Operator will read the secret and pass
# the values to the Management API when managing the cluster. If this is
# empty, Cass Operator will generate a secret instead.
superuserSecretName: ""
# Users must provide managementApiAuth.
# If insecure is used, the operator will not secure the Management API on each
# pod with mutual TLS.
# If manual is used, Cass Operator will load the clientSecretName and
# serverSecretName as secrets and and secure the Management API on each pod
# with mutual TLS encryption.
# More options will be available here in the future.
managementApiAuth:
insecure: {}
# manual:
# clientSecretName: mgmt-api-client-credentials
# serverSecretName: mgmt-api-server-credentials
# skipSecretValidation: false
# The Kubernetes service account to use for the server pods. Useful for
# working with a private image registry and its image pull secret.
serviceAccount: "default"
# A list of pod names that need to be replaced. See the following:
# http://cassandra.apache.org/doc/latest/operating/topo_changes.html#replacing-a-dead-node
replaceNodes: []
# Everything under the config key is passed to the cass-config-builder init
# container that runs on pod creation, and then marshalled into config files.
config:
# See https://docs.datastax.com/en/dse/6.7/dse-dev/datastax_enterprise/config/configDseYaml.html
dse-yaml:
authorization_options:
enabled: true
authentication_options:
enabled: true
default_scheme: internal
# Enable the DSE metrics collector, and stand up collectd for prometheus to scrape
10-write-prom-conf:
enabled: true
port: 9103
staleness-delta: 300
# See https://docs.datastax.com/en/dse/6.7/dse-dev/datastax_enterprise/config/configCassandra_yaml.html
cassandra-yaml:
num_tokens: 8
allocate_tokens_for_local_replication_factor: 3
backup_service:
enabled: true
file_cache_size_in_mb: 1000
authenticator: com.datastax.bdp.cassandra.auth.DseAuthenticator
authorizer: com.datastax.bdp.cassandra.auth.DseAuthorizer
role_manager: com.datastax.bdp.cassandra.auth.DseRoleManager
jvm-server-options:
# Set the database to use 14 GB of Java heap
initial_heap_size: "14G"
max_heap_size: "14G"
additional-jvm-opts:
# As the database comes up for the first time, set system keyspaces to RF=3
- "-Ddse.system_distributed_replication_dc_names=dc1"
- "-Ddse.system_distributed_replication_per_dc=3"