2.3.3-0.1.0 • Published 5 years ago

@helm-charts/bitnami-cassandra v2.3.3-0.1.0

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

@helm-charts/bitnami-cassandra

Apache Cassandra is a free and open-source distributed database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure. Cassandra offers robust support for clusters spanning multiple datacenters, with asynchronous masterless replication allowing low latency operations for all clients.

FieldValue
Repository Namebitnami
Chart Namecassandra
Chart Version2.3.3
NPM Package Version0.1.0
## Global Docker image parameters
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
## Current available global Docker image parameters: imageRegistry and imagePullSecrets
##
# global:
#   imageRegistry: myRegistryName
#   imagePullSecrets:
#     - myRegistryKeySecretName

## Bitnami Cassandra image version
## ref: https://hub.docker.com/r/bitnami/cassandra/tags/
##
image:
  registry: docker.io
  repository: bitnami/cassandra
  ## Bitnami Cassandra image tag
  ## ref: https://github.com/bitnami/bitnami-docker-cassandra#supported-tags-and-respective-dockerfile-links
  ##
  tag: 3.11.4
  ## Specify a imagePullPolicy
  ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
  ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
  ##
  pullPolicy: Always
  ## Optionally specify an array of imagePullSecrets.
  ## Secrets must be manually created in the namespace.
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
  ##
  # pullSecrets:
  #   - myRegistryKeySecretName

## Specify a service type
## ref: http://kubernetes.io/docs/user-guide/services/
##
service:
  type: ClusterIP
  ## CQL Port
  port: 9042
  thriftPort: 9160
  ## Specify the nodePort value for the LoadBalancer and NodePort service types.
  ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
  ##
  # nodePort: 30001
  # loadBalancerIP:

  ## Provide any additional annotations which may be required. This can be used to
  ## set the LoadBalancer service type to internal only.
  ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
  ##
  annotations: {}

## Enable persistence using Persistent Volume Claims
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
##
persistence:
  ## If true, use a Persistent Volume Claim, If false, use emptyDir
  ##
  enabled: true
  ## 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: "-"
  ## Persistent Volume Claim annotations
  ##
  annotations:
  ## Persistent Volume Access Mode
  ##
  accessModes:
    - ReadWriteOnce
  ## Persistent Volume size
  ##
  size: 8Gi

## 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

## Secret with keystore, keystore password, truststore, truststore password
# tlsEncryptionSecretName:
## ConfigMap with custom cassandra configuration files. This overrides any other Cassandra configuration set in the chart
# existingConfiguration:

## Cluster parameters
##
cluster:
  name: cassandra
  replicaCount: 1
  seedCount: 1
  numTokens: 256
  datacenter: dc1
  rack: rack1
  enableRPC: true
  endpointSnitch: SimpleSnitch
  minimumAvailable: 1
  ## Encryption values. NOTE: They require tlsEncryptionSecretName
  internodeEncryption: none
  clientEncryption: false

jvm:
  ## Extra JVM Settings
  ##
  extraOpts:

  ## Memory settings: These are calculated automatically
  ## unless specified otherwise
  ##
  # maxHeapSize: 4G
  # newHeapSize: 800M

## Database credentials
##
dbUser:
  user: cassandra
  forcePassword: false
  # password:
  # existingSecret:

## ConfigMap with cql scripts. Useful for creating a keyspace
## and pre-populating data
##
# initDBConfigMap:

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

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

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

## StatefulSet settings
##
statefulset:
  updateStrategy: OnDelete
  # rollingUpdatePartition:

## Pod Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
##
securityContext:
  enabled: true
  fsGroup: 1001
  runAsUser: 1001

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

## Tolerations for pod assignment
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
##
tolerations: []

## Network policies
## Ref: https://kubernetes.io/docs/concepts/services-networking/network-policies/
##
networkPolicy:
  ## Specifies whether a NetworkPolicy should be created
  ##
  enabled: false

  ## The Policy model to apply. When set to false, only pods with the correct
  ## client label will have network access to the port Redis is listening
  ## on. When true, Redis will accept connections from any source
  ## (with the correct destination port).
  ##
  # allowExternal: true

## Cassandra exporter configuration
## Ref: https://github.com/criteo/cassandra_exporter
##
metrics:
  enabled: false
  image:
    registry: docker.io
    pullPolicy: IfNotPresent
    repository: criteord/cassandra_exporter
    tag: 2.0.4
    ## Optionally specify an array of imagePullSecrets.
    ## Secrets must be manually created in the namespace.
    ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
    ##
    # pullSecrets:
    #   - myRegistryKeySecretName
  resources: {}
  podAnnotations:
    prometheus.io/scrape: 'true'
    prometheus.io/port: '8080'

cassandra

Apache Cassandra is a free and open-source distributed database management system designed to handle large amounts of data across many commodity servers or datacenters.

TL;DR;

$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install bitnami/cassandra

Introduction

This chart bootstraps a Cassandra deployment on a Kubernetes cluster using the Helm package manager.

Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters. This Helm chart has been tested on top of Bitnami Kubernetes Production Runtime (BKPR). Deploy BKPR to get automated TLS certificates, logging and monitoring for your applications.

Prerequisites

  • Kubernetes 1.8+
  • PV provisioner support in the underlying infrastructure

Installing the Chart

To install the chart with the release name my-release:

$ helm install --name my-release bitnami/cassandra

The command deploys one node with Cassandra on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release release:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following tables lists the configurable parameters of the cassandra chart and their default values.

ParameterDescriptionDefault
global.imageRegistryGlobal Docker Image registrynil
global.imagePullSecretsGlobal Docker registry secret names as an array[] (does not add image pull secrets to deployed pods)
image.registryCassandra Image registrydocker.io
image.repositoryCassandra Image namebitnami/cassandra
image.tagCassandra Image tag{VERSION}
image.pullPolicyImage pull policyAlways
image.pullSecretsSpecify docker-registry secret names as an array[] (does not add image pull secrets to deployed pods)
service.typeKubernetes Service typeClusterIP
service.nodePortKubernetes Service nodePortnil
service.loadBalancerIPLoadBalancerIP if service type is LoadBalancernil
service.annotationsAnnotations for the service{}
persistence.enabledUse PVCs to persist datatrue
persistence.storageClassPersistent Volume Storage Classgeneric
persistence.annotationsPersistent Volume Claim annotations Annotations{}
persistence.accessModesPersistent Volume Access Modes[ReadWriteOnce]
persistence.sizePersistent Volume Size8Gi
tlsEncryptionSecretNameSecret with keystore, keystore password, truststore and truststore password{}
resourcesCPU/Memory resource requests/limits{}
existingConfigurationPointer to a configMap that contains custom Cassandra configuration files. This will override any Cassandra configuration variable set in the chart{}
cluster.nameCassandra cluster namecassandra
cluster.replicaCountNumber of Cassandra nodes1
cluster.seedCountNumber of seed nodes (note: must be greater or equal than 1 and less or equal to cluster.replicaCount)1
cluster.numTokensNumber of tokens for each node256
cluster.datacenterDatacenter namedc1
cluster.rackRack namerack1
cluster.enableRPCEnable Thrift RPC endpointtrue
cluster.minimumAvailableMinimum nuber of instances that must be available in the cluster (used of PodDisruptionBudget)1
cluster.internodeEncryptionSet internode encryption. NOTE: A value different from 'none' requires setting tlsEncryptionSecretNamenone
cluster.clientEncryptionSet client-server encryption. NOTE: A value different from 'false' requires setting tlsEncryptionSecretNamefalse
cluster.jvm.extraOptsSet the value for Java Virtual Machine extra optinos (JVM_EXTRA_OPTS)nil
cluster.jvm.maxHeapSizeSet Java Virtual Machine maximum heap size (MAX_HEAP_SIZE). Calculated automatically if nilnil
cluster.jvm.newHeapSizeSet Java Virtual Machine new heap size (HEAP_NEWSIZE). Calculated automatically if nilnil
service.portCQL Port for the Kubernetes service9042
service.thriftPortThrift Port for the Kubernetes service9160
dbUser.userCassandra admin usercassandra
dbUser.forcePasswordForce the user to provide a non-empty password for dbUser.userfalse
dbUser.passwordPassword for dbUser.user. Randomly generated if empty(Random generated)
dbUser.existingSecretUse an existing secret object for dbUser.user password (will ignore dbUser.password)nil
initDBConfigMapConfigmap for initialization CQL commands (done in the first node). Useful for creating keyspaces at startup, for instancenil
livenessProbe.enabledTurn on and off liveness probetrue
livenessProbe.initialDelaySecondsDelay before liveness probe is initiated30
livenessProbe.periodSecondsHow often to perform the probe30
livenessProbe.timeoutSecondsWhen the probe times out5
livenessProbe.successThresholdMinimum consecutive successes for the probe to be considered successful after having failed1
livenessProbe.failureThresholdMinimum consecutive failures for the probe to be considered failed after having succeeded.5
readinessProbe.enabledTurn on and off readiness probetrue
readinessProbe.initialDelaySecondsDelay before readiness probe is initiated5
readinessProbe.periodSecondsHow often to perform the probe10
readinessProbe.timeoutSecondsWhen the probe times out5
readinessProbe.successThresholdMinimum consecutive successes for the probe to be considered successful after having failed1
readinessProbe.failureThresholdMinimum consecutive failures for the probe to be considered failed after having succeeded.5
podAnnotationsAdditional pod annotations{}
podLabelsAdditional pod labels{}
statefulset.updateStrategyUpdate strategy for StatefulSetonDelete
statefulset.rollingUpdatePartitionPartition update strategynil
securityContext.enabledEnable security contexttrue
securityContext.fsGroupGroup ID for the container1001
securityContext.runAsUserUser ID for the container1001
affinityEnable node/pod affinity{}
tolerationsToleration labels for pod assignment[]
networkPolicy.enabledEnable NetworkPolicyfalse
networkPolicy.allowExternalDon't require client label for connectionstrue
metrics.enabledStart a side-car prometheus exporterfalse
metrics.image.registryCassandra exporter Image registrydocker.io
metrics.image.repositoryCassandra exporter Image namecriteo/cassandra_exporter
metrics.image.tagCassandra exporter Image tag2.0.4
metrics.image.pullPolicyImage pull policyIfNotPresent
metrics.image.pullSecretsSpecify docker-registry secret names as an array[] (does not add image pull secrets to deployed pods)
metrics.podAnnotationsAdditional annotations for Metrics exporter{prometheus.io/scrape: "true", prometheus.io/port: "8080"}
metrics.resourcesExporter resource requests/limit{}

The above parameters map to the env variables defined in bitnami/cassandra. For more information please refer to the bitnami/cassandra image documentation.

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

$ helm install --name my-release \
  --set dbUser.user=admin,dbUser.password=password\
    bitnami/cassandra

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,

$ helm install --name my-release -f values.yaml bitnami/cassandra

Tip: You can use the default values.yaml

Persistence

The Bitnami cassandra image stores the cassandra data at the /bitnami/cassandra path of the container.

Persistent Volume Claims are used to keep the data across deployments. This is known to work in GCE, AWS, and minikube. See the Configuration section to configure the PVC or to disable persistence.

Enable TLS for Cassandra

You can enable TLS between client and server and between nodes. In order to do so, you need to set the following values:

  • For internode cluster encryption, set cluster.internodeEncryption to a value different from none. Available values are all, dc or rack.
  • For client-server encryption, set cluster.clientEncryption to true.

In addition to this, you must create a secret containing the keystore and truststore certificates and their corresponding protection passwords. Then, set the tlsEncryptionSecretName when deploying the chart.

You can create the secret with this command assuming you have your certificates in your working directory (replace the PUT_YOUR_KEYSTORE_PASSWORD and PUT_YOUR_TRUSTSTORE_PASSWORD placeholders):

kubectl create secret generic casssandra-tls --from-file=./keystore --from-file=./truststore --from-literal=keystore-password=PUT_YOUR_KEYSTORE_PASSWORD --from-literal=truststore-password=PUT_YOUR_TRUSTSTORE_PASSWORD

As an example of Cassandra installed with TLS you can use this command:

helm install --name my-release bitnami/cassandra --set cluster.internodeEncryption=all \
             --set cluster.clientEncryption=true --set tlsEncryptionSecretName=cassandra-tls \

Initializing the database

The Bitnami cassandra image allows having initialization scripts mounted in /docker-entrypoint.initdb. This is done in the chart by adding files in the files/docker-entrypoint-initdb.d folder (in order to do so, clone this chart) or by setting the initDBConfigMap value with a ConfigMap that includes the necessary sh or cql scripts:

kubectl create configmap init-db --from-file=path/to/scripts
helm install bitnami/cassandra --set initDBConfigMap=init-db

Upgrade

2.0.0

This releases make it possible to specify custom initialization scripts in both cql and sh files.

Breaking changes

  • startupCQL has been removed. Instead, for initializing the database, see this section.
2.3.3-0.1.0

5 years ago

2.3.2-0.1.0

5 years ago

2.3.1-0.1.0

5 years ago

2.3.0-0.1.0

5 years ago

2.2.0-0.1.0

5 years ago

2.1.5-0.1.0

5 years ago

2.1.4-0.1.0

5 years ago

2.1.3-0.1.0

5 years ago

2.1.2-0.1.0

5 years ago

2.1.1-0.1.0

5 years ago

2.1.0-0.1.0

5 years ago

2.0.1-0.1.0

5 years ago

2.0.0-0.1.0

5 years ago

1.2.0-0.1.0

5 years ago

1.1.0-0.1.0

5 years ago

1.0.3-0.1.0

5 years ago

1.0.2-0.1.0

5 years ago

1.0.1-0.1.0

5 years ago

1.0.0-0.1.0

5 years ago

0.1.0-0.1.0

5 years ago

0.0.1-0.1.0

5 years ago