cassandra

by QuenchWorks

Helm chartv0.0.33App 5.0.9MITVerified publisher

Distributed wide-column NoSQL store built for linear horizontal scale and high availability with no single point of failure, tuned for heavy writes. Hardened by QuenchWorks as a minimal, nonroot, CVE-gated image, cosign-signed and pinned by digest.

About this chart

Quenchworks Cassandra

Hardened Apache Cassandra on a minimal, nonroot, CVE-gated image pinned by digest. Runs on the hardened openjdk-17-jre base. The image's entrypoint generates cassandra.yaml from CASSANDRA_* env on boot; the chart pins the image by its signed digest and runs a clustered StatefulSet (single node by default).

Install

helm install cs oci://ghcr.io/quenchworks/charts/cassandra

Tune it:

helm install cs oci://ghcr.io/quenchworks/charts/cassandra \
  --set replicaCount=3 --set config.seedCount=3 --set persistence.size=50Gi \
  --set config.maxHeapSize=4G --set config.heapNewSize=800M

Connect

The runtime image has no usable cqlsh (no Python), so connect with a throwaway upstream client pod:

kubectl run cqlclient --rm -it --restart=Never --image=cassandra:5.0 -- \
  cqlsh cs-cassandra 9042

Verify the image

cosign verify ghcr.io/quenchworks/images/cassandra \
  --certificate-identity-regexp 'https://github.com/quenchworks/.+' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com

Each build also ships an SPDX SBOM and SLSA provenance attestation. Verify them with gh attestation verify oci://ghcr.io/quenchworks/images/cassandra --owner quenchworks.

Authentication

Auth is off by default (AllowAllAuthenticator), this is an internal deployment and the NetworkPolicy is the trust boundary. Enable login auth with:

helm install cs oci://ghcr.io/quenchworks/charts/cassandra --set auth.enabled=true

This sets PasswordAuthenticator + CassandraRoleManager, and Cassandra bootstraps the default cassandra / cassandra superuser. Rotate it immediately:

ALTER ROLE cassandra WITH PASSWORD = '<new-strong-password>';

For clusters, also raise the system_auth keyspace replication factor (default RF of 1 means auth breaks if the node holding it goes down):

ALTER KEYSPACE system_auth WITH replication =
  {'class':'NetworkTopologyStrategy','<dc>': 3};

Clustering

A multi-node ring forms automatically when replicaCount > 1. The first config.seedCount pods (pod-0 .. pod-(seedCount-1)) are advertised as CASSANDRA_SEEDS over the stable headless service. Cassandra recommends ~3 seeds per DC. For multi-DC topologies set config.endpointSnitch=GossipingPropertyFileSnitch and config.dc / config.rack (written to cassandra-rackdc.properties).

Values

KeyDefaultNotes
image.repositoryghcr.io/quenchworks/images/cassandra
image.digest(CI-written)Required. Charts pin by digest, never a tag.
replicaCount1Ring size; pods join sequentially (OrderedReady).
config.clusterNameQuench ClusterMust match across all nodes in a ring.
config.seedCount1Stable seed pods, clamped to replicaCount.
config.numTokens16vnodes per node.
config.endpointSnitchSimpleSnitchGossipingPropertyFileSnitch for multi-DC.
config.dc / config.rack""Written to rackdc.properties only when set.
config.maxHeapSize512MJVM max heap (MAX_HEAP_SIZE).
config.heapNewSize128MJVM young gen (HEAP_NEWSIZE).
config.yamlExtra""Raw cassandra.yaml appended verbatim.
auth.enabledfalseToggle PasswordAuthenticator + CassandraRoleManager.
persistence.enabledtrue16Gi PVC per pod at /var/lib/cassandra.
service.cqlPort9042CQL client port (ClusterIP + headless).
service.internodePort7000Gossip/storage (headless only).
networkPolicy.enabledtrueIngress to internode (own pods) + CQL (clients).
podDisruptionBudget.enabledtrueminAvailable: 1.
tls.enabledfalseCQL on 9042 requires TLS (client_encryption_options, optional: false; PKCS12 from an openssl init container); internode unchanged
tls.existingSecret""a kubernetes.io/tls Secret to use (1st choice)
tls.certManager.enabledfalserequest a cert-manager Certificate from tls.certManager.issuerRef (2nd choice)
tls.selfSigned.validityDays365otherwise Helm generates a CA + certificate, kept across upgrades
openssl.digest(pinned)init container that builds the PKCS12 keystore

Plus the shared quench-common knobs (scheduling, probes, sidecars, extra env/volumes, security contexts).

Security

Runs nonroot (uid 1001) on a read-only root filesystem with all capabilities dropped. Only /var/lib/cassandra (PVC), /conf, and /var/log/cassandra (emptyDir) are writable. JMX (7199) is bound to localhost in the image and is never exposed. Readiness gates on nodetool status reporting Up/Normal, so a pod only takes traffic once it has actually joined the ring.

Notes

Single standalone node by default; multi-node rings work via replicaCount + config.seedCount. A Prometheus JMX exporter sidecar is a tracked follow-up. Depends on the quench-common library chart, pulled from oci://ghcr.io/quenchworks/charts/quench-common.

Deploy cassandra with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has cassandra on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartcassandra is pinned at v0.0.33 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply