mirror of
https://github.com/bitnami/charts.git
synced 2026-03-15 06:47:24 +08:00
[bitnami/cassandra] Lint chart
Signed-off-by: juan131 <juan@bitnami.com>
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
apiVersion: v1
|
||||
name: cassandra
|
||||
version: 4.1.6
|
||||
version: 4.1.7
|
||||
appVersion: 3.11.5
|
||||
description: 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.
|
||||
keywords:
|
||||
- cassandra
|
||||
- database
|
||||
- nosql
|
||||
icon: https://bitnami.com/assets/stacks/cassandra/img/cassandra-stack-220x234.png
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-cassandra
|
||||
- https://github.com/bitnami/bitnami-docker-cassandra
|
||||
home: http://cassandra.apache.org
|
||||
maintainers:
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
engine: gotpl
|
||||
|
||||
@@ -42,6 +42,25 @@ Create chart name and version as used by the chart label.
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "cassandra.labels" -}}
|
||||
app: {{ include "cassandra.name" . }}
|
||||
chart: {{ include "cassandra.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector
|
||||
*/}}
|
||||
{{- define "cassandra.matchLabels" -}}
|
||||
app: {{ include "cassandra.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{/*
|
||||
Return the proper Cassandra image name
|
||||
*/}}
|
||||
@@ -208,3 +227,16 @@ but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Renders a value that contains template.
|
||||
Usage:
|
||||
{{ include "cassandra.tplValue" ( dict "value" .Values.path.to.the.Value "context" $) }}
|
||||
*/}}
|
||||
{{- define "cassandra.tplValue" -}}
|
||||
{{- if typeIs "string" .value }}
|
||||
{{- tpl .value .context }}
|
||||
{{- else }}
|
||||
{{- tpl (.value | toYaml) .context }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -2,12 +2,8 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ template "cassandra.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
chart: {{ template "cassandra.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
name: {{ include "cassandra.fullname" . }}
|
||||
labels: {{- include "cassandra.labels" . | nindent 4 }}
|
||||
type: Opaque
|
||||
data:
|
||||
{{- if .Values.dbUser.password }}
|
||||
|
||||
@@ -2,12 +2,8 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "cassandra.fullname" . }}-configuration
|
||||
labels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
chart: {{ template "cassandra.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
name: {{ include "cassandra.fullname" . }}-configuration
|
||||
labels: {{- include "cassandra.labels" . | nindent 4 }}
|
||||
data:
|
||||
{{ (.Files.Glob "files/conf/*").AsConfig | indent 2 }}
|
||||
{{ end }}
|
||||
|
||||
@@ -1,33 +1,27 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "cassandra.fullname" . }}-headless
|
||||
labels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
chart: {{ template "cassandra.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
name: {{ include "cassandra.fullname" . }}-headless
|
||||
labels: {{- include "cassandra.labels" . | nindent 4 }}
|
||||
spec:
|
||||
clusterIP: None
|
||||
publishNotReadyAddresses: true
|
||||
ports:
|
||||
- name: intra
|
||||
port: 7000
|
||||
targetPort: intra
|
||||
- name: tls
|
||||
port: 7001
|
||||
targetPort: tls
|
||||
- name: jmx
|
||||
port: 7199
|
||||
targetPort: jmx
|
||||
- name: cql
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: cql
|
||||
{{- if .Values.cluster.enableRPC }}
|
||||
- name: thrift
|
||||
port: {{ .Values.service.thriftPort }}
|
||||
targetPort: thrift
|
||||
{{- end }}
|
||||
selector:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
- name: intra
|
||||
port: 7000
|
||||
targetPort: intra
|
||||
- name: tls
|
||||
port: 7001
|
||||
targetPort: tls
|
||||
- name: jmx
|
||||
port: 7199
|
||||
targetPort: jmx
|
||||
- name: cql
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: cql
|
||||
{{- if .Values.cluster.enableRPC }}
|
||||
- name: thrift
|
||||
port: {{ .Values.service.thriftPort }}
|
||||
targetPort: thrift
|
||||
{{- end }}
|
||||
selector: {{- include "cassandra.matchLabels" . | nindent 4 }}
|
||||
|
||||
@@ -2,12 +2,8 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "cassandra.fullname" . }}-init-scripts
|
||||
labels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
chart: {{ template "cassandra.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
name: {{ include "cassandra.fullname" . }}-init-scripts
|
||||
labels: {{- include "cassandra.labels" . | nindent 4 }}
|
||||
data:
|
||||
{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*").AsConfig | indent 2 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,47 +1,37 @@
|
||||
{{- if .Values.networkPolicy.enabled }}
|
||||
kind: NetworkPolicy
|
||||
apiVersion: {{ template "networkPolicy.apiVersion" . }}
|
||||
apiVersion: {{ include "networkPolicy.apiVersion" . }}
|
||||
metadata:
|
||||
name: {{ template "cassandra.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
chart: {{ template "cassandra.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
name: {{ include "cassandra.fullname" . }}
|
||||
labels: {{- include "cassandra.labels" . | nindent 4 }}
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
matchLabels: {{- include "cassandra.matchLabels" . | nindent 6 }}
|
||||
ingress:
|
||||
# Allow inbound connections
|
||||
# CQL and Thrift ports
|
||||
- ports:
|
||||
- port: {{ .Values.service.port }}
|
||||
- port: {{ .Values.service.thriftPort }}
|
||||
- port: {{ .Values.service.port }}
|
||||
- port: {{ .Values.service.thriftPort }}
|
||||
{{- if not .Values.networkPolicy.allowExternal }}
|
||||
from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
{{ template "cassandra.fullname" . }}-client: "true"
|
||||
{{ include "cassandra.fullname" . }}-client: "true"
|
||||
{{- end }}
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
matchLabels: {{- include "cassandra.matchLabels" . | nindent 14 }}
|
||||
# Internal ports
|
||||
- ports:
|
||||
- port: intra
|
||||
- port: tls
|
||||
- port: jmx
|
||||
- port: intra
|
||||
- port: tls
|
||||
- port: jmx
|
||||
from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
matchLabels: {{- include "cassandra.matchLabels" . | nindent 14 }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
# Allow prometheus scrapes for metrics
|
||||
- ports:
|
||||
- port: 8080
|
||||
- port: 8080
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ template "cassandra.fullname" . }}-headless
|
||||
labels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
chart: {{ template "cassandra.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
name: {{ include "cassandra.fullname" . }}-headless
|
||||
labels: {{- include "cassandra.labels" . | nindent 4 }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
matchLabels: {{- include "cassandra.matchLabels" . | nindent 6 }}
|
||||
{{- if .Values.minAvailable }}
|
||||
minAvailable: {{ .Values.cluster.minimumAvailable }}
|
||||
{{- else }}
|
||||
|
||||
@@ -1,40 +1,31 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "cassandra.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
chart: {{ template "cassandra.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.service.annotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
name: {{ include "cassandra.fullname" . }}
|
||||
labels: {{- include "cassandra.labels" . | nindent 4 }}
|
||||
annotations: {{ include "cassandra.tplValue" ( dict "value" .Values.service.annotations "context" $) | nindent 4 }}
|
||||
spec:
|
||||
{{- if eq .Values.service.type "LoadBalancer" }} {{- if .Values.service.loadBalancerIP }}
|
||||
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
||||
{{- end }} {{- end }}
|
||||
type: {{ .Values.service.type }}
|
||||
{{- if and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP)) }}
|
||||
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: cql
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: cql
|
||||
{{- if (and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.cql)))}}
|
||||
nodePort: {{ .Values.service.nodePorts.cql }}
|
||||
{{- else if eq .Values.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
- name: cql
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: cql
|
||||
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.cql)) }}
|
||||
nodePort: {{ .Values.service.nodePorts.cql }}
|
||||
{{- else if eq .Values.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- if .Values.cluster.enableRPC }}
|
||||
- name: thrift
|
||||
port: {{ .Values.service.thriftPort }}
|
||||
targetPort: thrift
|
||||
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.thrift)) }}
|
||||
nodePort: {{ .Values.service.nodePorts.thrift }}
|
||||
{{- else if eq .Values.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.cluster.enableRPC }}
|
||||
- name: thrift
|
||||
port: {{ .Values.service.thriftPort }}
|
||||
targetPort: thrift
|
||||
{{- if (and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.thrift)))}}
|
||||
nodePort: {{ .Values.service.nodePorts.thrift }}
|
||||
{{- else if eq .Values.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
selector:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
selector: {{- include "cassandra.matchLabels" . | nindent 4 }}
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ template "cassandra.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
chart: {{ template "cassandra.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
name: {{ include "cassandra.fullname" . }}
|
||||
labels: {{- include "cassandra.labels" . | nindent 4 }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
serviceName: {{ template "cassandra.fullname" . }}-headless
|
||||
matchLabels: {{- include "cassandra.matchLabels" . | nindent 6 }}
|
||||
serviceName: {{ include "cassandra.fullname" . }}-headless
|
||||
replicas: {{ .Values.cluster.replicaCount }}
|
||||
updateStrategy:
|
||||
type: {{ .Values.statefulset.updateStrategy }}
|
||||
@@ -24,60 +18,61 @@ spec:
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
chart: {{ template "cassandra.chart" . }}
|
||||
{{- if .Values.podLabels }}
|
||||
{{ toYaml .Values.podLabels | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.podAnnotations .Values.metrics.enabled }}
|
||||
labels: {{- include "cassandra.labels" . | nindent 8 }}
|
||||
{{- if .Values.podLabels }}
|
||||
{{- toYaml .Values.podLabels | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.podAnnotations (and .Values.metrics.enabled .Values.metrics.podAnnotations) }}
|
||||
annotations:
|
||||
{{- if .Values.podAnnotations }}
|
||||
{{ toYaml .Values.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
{{ toYaml .Values.metrics.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.podAnnotations }}
|
||||
{{- toYaml .Values.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.podAnnotations }}
|
||||
{{- toYaml .Values.metrics.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.selector }}
|
||||
{{ toYaml .Values.selector | indent 6 }}
|
||||
{{- end }}
|
||||
{{- include "cassandra.imagePullSecrets" . | nindent 6 }}
|
||||
{{- if .Values.affinity }}
|
||||
affinity: {{- include "cassandra.tplValue" (dict "value" .Values.affinity "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.nodeSelector }}
|
||||
nodeSelector: {{- include "cassandra.tplValue" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.tolerations }}
|
||||
tolerations: {{- include "cassandra.tplValue" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
{{- if .Values.affinity }}
|
||||
affinity:
|
||||
{{ toYaml .Values.affinity | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- include "cassandra.imagePullSecrets" . | indent 6 }}
|
||||
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }}
|
||||
initContainers:
|
||||
- name: volume-permissions
|
||||
image: "{{ template "cassandra.volumePermissions.image" . }}"
|
||||
imagePullPolicy: {{ default "" .Values.volumePermissions.image.pullPolicy | quote }}
|
||||
command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/bitnami/cassandra"]
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
resources: {{ toYaml .Values.volumePermissions.resources | nindent 10 }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /bitnami/cassandra
|
||||
- name: volume-permissions
|
||||
image: {{ include "cassandra.volumePermissions.image" . }}
|
||||
imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
chown -R {{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }} /bitnami/cassandra
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
{{- if .Values.volumePermissions.resources }}
|
||||
resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /bitnami/cassandra
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: cassandra
|
||||
command:
|
||||
- bash
|
||||
- -ec
|
||||
# Node 0 is the password seeder
|
||||
- |
|
||||
- name: cassandra
|
||||
command:
|
||||
- bash
|
||||
- -ec
|
||||
# Node 0 is the password seeder
|
||||
- |
|
||||
if [[ $HOSTNAME =~ (.*)-0$ ]]; then
|
||||
echo "Setting node as password seeder"
|
||||
export CASSANDRA_PASSWORD_SEEDER=yes
|
||||
@@ -86,188 +81,188 @@ spec:
|
||||
export CASSANDRA_IGNORE_INITDB_SCRIPTS=1
|
||||
fi
|
||||
{{ .Values.entrypoint }} {{ .Values.cmd }}
|
||||
image: {{ template "cassandra.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
resources: {{ toYaml .Values.resources | nindent 10 }}
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: {{ ternary "true" "false" .Values.image.debug | quote }}
|
||||
- name: CASSANDRA_CLUSTER_NAME
|
||||
value: {{ .Values.cluster.name }}
|
||||
- name: CASSANDRA_SEEDS
|
||||
{{- $global := . }}
|
||||
{{- $replicas := .Values.cluster.seedCount | int }}
|
||||
{{- $domain := .Values.cluster.domain }}
|
||||
value: "{{- range $i, $e := until $replicas }}{{ template "cassandra.fullname" $global }}-{{ $i }}.{{ template "cassandra.fullname" $global }}-headless.{{ $global.Release.Namespace }}.svc.{{ $domain }}{{- if (lt ( add1 $i ) $replicas ) }},{{- end }}{{- end }}"
|
||||
- name: CASSANDRA_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ if .Values.dbUser.existingSecret }}{{ .Values.dbUser.existingSecret }}{{- else }}{{ template "cassandra.fullname" . }}{{- end }}
|
||||
key: cassandra-password
|
||||
- name: POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.podIP
|
||||
- name: CASSANDRA_USER
|
||||
value: {{ .Values.dbUser.user | quote }}
|
||||
- name: CASSANDRA_NUM_TOKENS
|
||||
value: {{ .Values.cluster.numTokens | quote }}
|
||||
- name: CASSANDRA_DATACENTER
|
||||
value: {{ .Values.cluster.datacenter }}
|
||||
- name: CASSANDRA_ENDPOINT_SNITCH
|
||||
value: {{ .Values.cluster.endpointSnitch }}
|
||||
{{- if .Values.tlsEncryptionSecretName }}
|
||||
- name: CASSANDRA_INTERNODE_ENCRYPTION
|
||||
value: {{ .Values.cluster.internodeEncryption | quote }}
|
||||
- name: CASSANDRA_CLIENT_ENCRYPTION
|
||||
value: {{ .Values.cluster.clientEncryption | quote }}
|
||||
- name: CASSANDRA_TRUSTSTORE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.tlsEncryptionSecretName }}
|
||||
key: truststore-password
|
||||
- name: CASSANDRA_KEYSTORE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.tlsEncryptionSecretName }}
|
||||
key: keystore-password
|
||||
{{- end }}
|
||||
- name: CASSANDRA_ENDPOINT_SNITCH
|
||||
value: {{ .Values.cluster.endpointSnitch }}
|
||||
- name: CASSANDRA_RACK
|
||||
value: {{ .Values.cluster.rack }}
|
||||
{{- if .Values.jvm.maxHeapSize }}
|
||||
- name: MAX_HEAP_SIZE
|
||||
value: {{ .Values.jvm.maxHeapSize | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.jvm.newHeapSize }}
|
||||
- name: HEAP_NEWSIZE
|
||||
value: {{ .Values.jvm.newHeapSize | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.jvm.extraOpts }}
|
||||
- name: JVM_EXTRA_OPTS
|
||||
value: {{ .Values.jvm.extraOpts | quote }}
|
||||
{{- end }}
|
||||
- name: CASSANDRA_ENABLE_RPC
|
||||
value: {{ .Values.cluster.enableRPC | quote }}
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: [ "/bin/sh", "-c", "nodetool status" ]
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: [ "/bin/sh", "-c", "nodetool status | grep -E \"^UN\\s+${POD_IP}\"" ]
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if not .Values.persistence.enabled }}
|
||||
lifecycle:
|
||||
preStop:
|
||||
image: {{ include "cassandra.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: {{ ternary "true" "false" .Values.image.debug | quote }}
|
||||
- name: CASSANDRA_CLUSTER_NAME
|
||||
value: {{ .Values.cluster.name }}
|
||||
- name: CASSANDRA_SEEDS
|
||||
{{- $global := . }}
|
||||
{{- $replicas := .Values.cluster.seedCount | int }}
|
||||
{{- $domain := .Values.cluster.domain }}
|
||||
value: "{{- range $i, $e := until $replicas }}{{ include "cassandra.fullname" $global }}-{{ $i }}.{{ include "cassandra.fullname" $global }}-headless.{{ $global.Release.Namespace }}.svc.{{ $domain }}{{- if (lt ( add1 $i ) $replicas ) }},{{- end }}{{- end }}"
|
||||
- name: CASSANDRA_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ if .Values.dbUser.existingSecret }}{{ .Values.dbUser.existingSecret }}{{- else }}{{ include "cassandra.fullname" . }}{{- end }}
|
||||
key: cassandra-password
|
||||
- name: POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.podIP
|
||||
- name: CASSANDRA_USER
|
||||
value: {{ .Values.dbUser.user | quote }}
|
||||
- name: CASSANDRA_NUM_TOKENS
|
||||
value: {{ .Values.cluster.numTokens | quote }}
|
||||
- name: CASSANDRA_DATACENTER
|
||||
value: {{ .Values.cluster.datacenter }}
|
||||
- name: CASSANDRA_ENDPOINT_SNITCH
|
||||
value: {{ .Values.cluster.endpointSnitch }}
|
||||
{{- if .Values.tlsEncryptionSecretName }}
|
||||
- name: CASSANDRA_INTERNODE_ENCRYPTION
|
||||
value: {{ .Values.cluster.internodeEncryption | quote }}
|
||||
- name: CASSANDRA_CLIENT_ENCRYPTION
|
||||
value: {{ .Values.cluster.clientEncryption | quote }}
|
||||
- name: CASSANDRA_TRUSTSTORE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.tlsEncryptionSecretName }}
|
||||
key: truststore-password
|
||||
- name: CASSANDRA_KEYSTORE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.tlsEncryptionSecretName }}
|
||||
key: keystore-password
|
||||
{{- end }}
|
||||
- name: CASSANDRA_ENDPOINT_SNITCH
|
||||
value: {{ .Values.cluster.endpointSnitch }}
|
||||
- name: CASSANDRA_RACK
|
||||
value: {{ .Values.cluster.rack }}
|
||||
{{- if .Values.jvm.maxHeapSize }}
|
||||
- name: MAX_HEAP_SIZE
|
||||
value: {{ .Values.jvm.maxHeapSize | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.jvm.newHeapSize }}
|
||||
- name: HEAP_NEWSIZE
|
||||
value: {{ .Values.jvm.newHeapSize | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.jvm.extraOpts }}
|
||||
- name: JVM_EXTRA_OPTS
|
||||
value: {{ .Values.jvm.extraOpts | quote }}
|
||||
{{- end }}
|
||||
- name: CASSANDRA_ENABLE_RPC
|
||||
value: {{ .Values.cluster.enableRPC | quote }}
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["/bin/sh", "-c", "nodetool decommission"]
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: intra
|
||||
containerPort: 7000
|
||||
- name: tls
|
||||
containerPort: 7001
|
||||
- name: jmx
|
||||
containerPort: 7199
|
||||
- name: cql
|
||||
containerPort: 9042
|
||||
{{- if .Values.cluster.enableRPC }}
|
||||
- name: thrift
|
||||
containerPort: 9160
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /bitnami/cassandra
|
||||
{{- if .Values.tlsEncryptionSecretName }}
|
||||
- name: encryption-secrets
|
||||
mountPath: /bitnami/cassandra/secrets
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*") (.Values.initDBConfigMap) }}
|
||||
- name: init-db
|
||||
mountPath: /docker-entrypoint-initdb.d
|
||||
{{- end }}
|
||||
{{ if or (.Files.Glob "files/conf/*") .Values.existingConfiguration }}
|
||||
- name: configurations
|
||||
mountPath: /bitnami/cassandra/conf
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
- name: metrics
|
||||
image: {{ template "cassandra.metrics.image" . }}
|
||||
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: 8080
|
||||
protocol: TCP
|
||||
- name: jmx
|
||||
containerPort: 5555
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: metrics
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 20
|
||||
timeoutSeconds: 45
|
||||
{{- end }}
|
||||
command: [ "/bin/sh", "-c", "nodetool status" ]
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: [ "/bin/sh", "-c", "nodetool status | grep -E \"^UN\\s+${POD_IP}\"" ]
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if not .Values.persistence.enabled }}
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command:
|
||||
- bash
|
||||
- -ec
|
||||
- nodetool decommission
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: intra
|
||||
containerPort: 7000
|
||||
- name: tls
|
||||
containerPort: 7001
|
||||
- name: jmx
|
||||
containerPort: 7199
|
||||
- name: cql
|
||||
containerPort: 9042
|
||||
{{- if .Values.cluster.enableRPC }}
|
||||
- name: thrift
|
||||
containerPort: 9160
|
||||
{{- end }}
|
||||
{{- if .Values.resources }}
|
||||
resources: {{ toYaml .Values.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /bitnami/cassandra
|
||||
{{- if .Values.tlsEncryptionSecretName }}
|
||||
- name: encryption-secrets
|
||||
mountPath: /bitnami/cassandra/secrets
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*") (.Values.initDBConfigMap) }}
|
||||
- name: init-db
|
||||
mountPath: /docker-entrypoint-initdb.d
|
||||
{{- end }}
|
||||
{{ if or (.Files.Glob "files/conf/*") .Values.existingConfiguration }}
|
||||
- name: configurations
|
||||
mountPath: /bitnami/cassandra/conf
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
- name: metrics
|
||||
image: {{ include "cassandra.metrics.image" . }}
|
||||
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: 8080
|
||||
protocol: TCP
|
||||
- name: jmx
|
||||
containerPort: 5555
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: metrics
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 20
|
||||
timeoutSeconds: 45
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if .Values.tlsEncryptionSecretName }}
|
||||
- name: encryption-secrets
|
||||
secret:
|
||||
secretName: {{ .Values.tlsEncryptionSecretName }}
|
||||
items:
|
||||
- key: keystore
|
||||
path: keystore
|
||||
- key: truststore
|
||||
path: truststore
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/conf/*") .Values.existingConfiguration }}
|
||||
- name: configurations
|
||||
configMap:
|
||||
name: {{ template "cassandra.configurationCM" . }}
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*") (.Values.initDBConfigMap) }}
|
||||
- name: init-db
|
||||
configMap:
|
||||
name: {{ template "cassandra.initDbCM" . }}
|
||||
{{- end }}
|
||||
{{- if .Values.tlsEncryptionSecretName }}
|
||||
- name: encryption-secrets
|
||||
secret:
|
||||
secretName: {{ .Values.tlsEncryptionSecretName }}
|
||||
items:
|
||||
- key: keystore
|
||||
path: keystore
|
||||
- key: truststore
|
||||
path: truststore
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/conf/*") .Values.existingConfiguration }}
|
||||
- name: configurations
|
||||
configMap:
|
||||
name: {{ include "cassandra.configurationCM" . }}
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*") (.Values.initDBConfigMap) }}
|
||||
- name: init-db
|
||||
configMap:
|
||||
name: {{ include "cassandra.initDbCM" . }}
|
||||
{{- end }}
|
||||
{{- if not .Values.persistence.enabled }}
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
{{- else }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
labels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
chart: {{ template "cassandra.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
{{- if .Values.persistence.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.persistence.annotations | indent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes:
|
||||
{{- range .Values.persistence.accessModes }}
|
||||
- {{ . | quote }}
|
||||
- metadata:
|
||||
name: data
|
||||
labels: {{- include "cassandra.labels" . | nindent 10 }}
|
||||
{{- if .Values.persistence.annotations }}
|
||||
annotations: {{- toYaml .Values.persistence.annotations | nindent 10 }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size | quote }}
|
||||
{{ include "cassandra.storageClass" . }}
|
||||
spec:
|
||||
accessModes:
|
||||
{{- range .Values.persistence.accessModes }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size | quote }}
|
||||
{{ include "cassandra.storageClass" . }}
|
||||
{{- end }}
|
||||
|
||||
@@ -58,17 +58,34 @@ volumePermissions:
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
resources: {}
|
||||
## Init container' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## Specify a service type
|
||||
## ref: http://kubernetes.io/docs/user-guide/services/
|
||||
## Service parameters
|
||||
##
|
||||
service:
|
||||
## Service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## CQL Port
|
||||
## CQL port
|
||||
##
|
||||
port: 9042
|
||||
## Thrift Client API port
|
||||
##
|
||||
thriftPort: 9160
|
||||
## Specify the nodePort(s) value for the LoadBalancer and NodePort service types.
|
||||
## Specify the nodePort(s) value(s) for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
nodePorts:
|
||||
@@ -78,7 +95,6 @@ service:
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# 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
|
||||
@@ -106,28 +122,34 @@ persistence:
|
||||
## Persistent Volume Access Mode
|
||||
##
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
- ReadWriteOnce
|
||||
## Persistent Volume size
|
||||
##
|
||||
size: 8Gi
|
||||
|
||||
## Configure resource requests and limits
|
||||
## Cassandra pods' 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
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 2
|
||||
# limits:
|
||||
# memory: 4Gi
|
||||
requests: {}
|
||||
# cpu: 2
|
||||
# memory: 4Gi
|
||||
|
||||
## 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
|
||||
@@ -143,12 +165,15 @@ cluster:
|
||||
endpointSnitch: SimpleSnitch
|
||||
minimumAvailable: 2
|
||||
## Encryption values. NOTE: They require tlsEncryptionSecretName
|
||||
##
|
||||
internodeEncryption: none
|
||||
clientEncryption: false
|
||||
domain: cluster.local
|
||||
|
||||
## JVM Settings
|
||||
##
|
||||
jvm:
|
||||
## Extra JVM Settings
|
||||
## Extra JVM options
|
||||
##
|
||||
extraOpts:
|
||||
|
||||
@@ -171,7 +196,7 @@ dbUser:
|
||||
##
|
||||
# initDBConfigMap:
|
||||
|
||||
## Liveness and Readiness probe values.
|
||||
## Cassandra container's liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/
|
||||
##
|
||||
livenessProbe:
|
||||
@@ -199,6 +224,21 @@ podAnnotations: {}
|
||||
##
|
||||
podLabels: {}
|
||||
|
||||
## Affinity for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
|
||||
## Tolerations for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: []
|
||||
|
||||
## StatefulSet settings
|
||||
##
|
||||
statefulset:
|
||||
@@ -213,17 +253,6 @@ securityContext:
|
||||
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: []
|
||||
|
||||
##
|
||||
## Container entrypoint and cmd (useful for using different images)
|
||||
##
|
||||
entrypoint: "/entrypoint.sh"
|
||||
@@ -244,11 +273,11 @@ networkPolicy:
|
||||
##
|
||||
# allowExternal: true
|
||||
|
||||
## Cassandra exporter configuration
|
||||
## Ref: https://github.com/criteo/cassandra_exporter
|
||||
## Cassandra Prometheus exporter configuration
|
||||
## ref: https://hub.docker.com/r/bitnami/cassandra-exporter/tags/
|
||||
##
|
||||
metrics:
|
||||
enabled: true
|
||||
enabled: false
|
||||
image:
|
||||
registry: docker.io
|
||||
pullPolicy: IfNotPresent
|
||||
@@ -260,7 +289,23 @@ metrics:
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
resources: {}
|
||||
## Cassandra Prometheus exporter resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
## Metrics exporter pod Annotation and Labels
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
##
|
||||
podAnnotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "8080"
|
||||
|
||||
@@ -58,17 +58,34 @@ volumePermissions:
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
resources: {}
|
||||
## Init container' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## Specify a service type
|
||||
## ref: http://kubernetes.io/docs/user-guide/services/
|
||||
## Service parameters
|
||||
##
|
||||
service:
|
||||
## Service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## CQL Port
|
||||
## CQL port
|
||||
##
|
||||
port: 9042
|
||||
## Thrift Client API port
|
||||
##
|
||||
thriftPort: 9160
|
||||
## Specify the nodePort(s) value for the LoadBalancer and NodePort service types.
|
||||
## Specify the nodePort(s) value(s) for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
nodePorts:
|
||||
@@ -78,7 +95,6 @@ service:
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# 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
|
||||
@@ -106,28 +122,34 @@ persistence:
|
||||
## Persistent Volume Access Mode
|
||||
##
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
- ReadWriteOnce
|
||||
## Persistent Volume size
|
||||
##
|
||||
size: 8Gi
|
||||
|
||||
## Configure resource requests and limits
|
||||
## Cassandra pods' 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
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 2
|
||||
# limits:
|
||||
# memory: 4Gi
|
||||
requests: {}
|
||||
# cpu: 2
|
||||
# memory: 4Gi
|
||||
|
||||
## 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
|
||||
@@ -143,12 +165,15 @@ cluster:
|
||||
endpointSnitch: SimpleSnitch
|
||||
minimumAvailable: 1
|
||||
## Encryption values. NOTE: They require tlsEncryptionSecretName
|
||||
##
|
||||
internodeEncryption: none
|
||||
clientEncryption: false
|
||||
domain: cluster.local
|
||||
|
||||
## JVM Settings
|
||||
##
|
||||
jvm:
|
||||
## Extra JVM Settings
|
||||
## Extra JVM options
|
||||
##
|
||||
extraOpts:
|
||||
|
||||
@@ -171,8 +196,8 @@ dbUser:
|
||||
##
|
||||
# initDBConfigMap:
|
||||
|
||||
## Liveness and Readiness probe values.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/
|
||||
## Cassandra container's liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
@@ -199,6 +224,21 @@ podAnnotations: {}
|
||||
##
|
||||
podLabels: {}
|
||||
|
||||
## Affinity for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
|
||||
## Tolerations for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: []
|
||||
|
||||
## StatefulSet settings
|
||||
##
|
||||
statefulset:
|
||||
@@ -213,17 +253,6 @@ securityContext:
|
||||
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: []
|
||||
|
||||
##
|
||||
## Container entrypoint and cmd (useful for using different images)
|
||||
##
|
||||
entrypoint: "/entrypoint.sh"
|
||||
@@ -244,8 +273,8 @@ networkPolicy:
|
||||
##
|
||||
# allowExternal: true
|
||||
|
||||
## Cassandra exporter configuration
|
||||
## Ref: https://github.com/criteo/cassandra_exporter
|
||||
## Cassandra Prometheus exporter configuration
|
||||
## ref: https://hub.docker.com/r/bitnami/cassandra-exporter/tags/
|
||||
##
|
||||
metrics:
|
||||
enabled: false
|
||||
@@ -260,7 +289,23 @@ metrics:
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
resources: {}
|
||||
## Cassandra Prometheus exporter resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
## Metrics exporter pod Annotation and Labels
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
##
|
||||
podAnnotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "8080"
|
||||
|
||||
Reference in New Issue
Block a user