## Cassandra image version
## ref: https://hub.docker.com/r/library/cassandra/
image:
  repo: "cassandra"
  tag: "3.11.2"
  pullPolicy: IfNotPresent
  ## Specify ImagePullSecrets for Pods
  ## ref: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
  # pullSecrets: myregistrykey

## Specify a service type
## ref: http://kubernetes.io/docs/user-guide/services/
service:
  type: ClusterIP

## Persist data to a persistent volume
persistence:
  enabled: true
  ## cassandra data Persistent Volume Storage Class
  ## If defined, storageClassName: <storageClass>
  ## If set to "-", storageClassName: "", which disables dynamic provisioning
  ## If undefined (the default) or set to null, no storageClassName spec is
  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
  ##   GKE, AWS & OpenStack)
  ##
  # storageClass: "-"
  accessMode: ReadWriteOnce
  size: 10Gi

## Configure resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
## Minimum memory for development is 4GB and 2 CPU cores
## Minimum memory for production is 8GB and 4 CPU cores
## ref: http://docs.datastax.com/en/archived/cassandra/2.0/cassandra/architecture/architecturePlanningHardware_c.html
resources: {}
  # requests:
  #   memory: 4Gi
  #   cpu: 2
  # limits:
  #   memory: 4Gi
  #   cpu: 2

## Change cassandra configuration parameters below:
## ref: http://docs.datastax.com/en/cassandra/3.0/cassandra/configuration/configCassandra_yaml.html
## Recommended max heap size is 1/2 of system memory
## Recommeneed heap new size is 1/4 of max heap size
## ref: http://docs.datastax.com/en/cassandra/3.0/cassandra/operations/opsTuneJVM.html
config:
  cluster_name: cassandra
  cluster_size: 3
  seed_size: 2
  num_tokens: 256
  # If you want Cassandra to use this datacenter and rack name,
  # you need to set endpoint_snitch to GossipingPropertyFileSnitch.
  # Otherwise, these values are ignored and datacenter1 and rack1
  # are used.
  dc_name: DC1
  rack_name: RAC1
  endpoint_snitch: SimpleSnitch
  max_heap_size: 2048M
  heap_new_size: 512M
  start_rpc: false
  ports:
    cql: 9042
    thrift: 9160
    # If a JVM Agent is in place
    # agent: 61621

## Liveness and Readiness probe values.
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/
livenessProbe:
  initialDelaySeconds: 90
  periodSeconds: 30
  timeoutSeconds: 5
  successThreshold: 1
  failureThreshold: 3
readinessProbe:
  initialDelaySeconds: 90
  periodSeconds: 30
  timeoutSeconds: 5
  successThreshold: 1
  failureThreshold: 3

## Configure node selector. Edit code below for adding selector to pods
## ref: https://kubernetes.io/docs/user-guide/node-selection/
# selector:
  # nodeSelector:
    # cloud.google.com/gke-nodepool: pool-db

## Additional pod labels
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
podLabels: {}

## Additional pod-level settings
podSettings:
  # Change this to give pods more time to properly leave the cluster when not using persistent storage.
  terminationGracePeriodSeconds: 30

podManagementPolicy: OrderedReady
updateStrategy:
  type: OnDelete

## Pod Security Context
securityContext:
  enabled: false
  fsGroup: 999
  runAsUser: 999

## Affinity for pod assignment
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
affinity: {}
