1 apiVersion: apps/v1beta1
4 name: {{ include "common.fullname" . }}
5 namespace: {{ include "common.namespace" . }}
7 app: {{ include "common.name" . }}
8 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
9 release: {{ .Release.Name }}
10 heritage: {{ .Release.Service }}
12 serviceName: {{ include "common.servicename" . }}
13 replicas: {{ .Values.replicaCount }}
14 podManagementPolicy: {{ .Values.podManagementPolicy }}
16 type: {{ .Values.updateStrategy.type }}
20 app: {{ include "common.name" . }}
21 release: {{ .Release.Name }}
22 name: {{ include "common.name" . }}
25 - name: {{ include "common.name" . }}
26 image: {{ .Values.image }}
27 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
29 - containerPort: {{ .Values.service.internalPort }}
30 - containerPort: {{ .Values.service.internalPort2 }}
31 - containerPort: {{ .Values.service.internalPort3 }}
32 {{- if eq .Values.liveness.enabled true }}
38 - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }'
39 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
40 periodSeconds: {{ .Values.liveness.periodSeconds }}
47 - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }'
48 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
49 timeoutSeconds: {{ .Values.liveness.periodSeconds }}
53 command: ["/bin/sh", "-c", "PID=$(pidof java) && kill $PID && while ps -p $PID > /dev/null; do sleep 1; done"]
55 {{- $seed_size := default 1 .Values.replicaCount | int -}}
58 value: {{ .Values.config.heap.max }}
60 value: {{ .Values.config.heap.min }}
61 - name: CASSANDRA_SEEDS
62 value: "{{- range $i, $e := until $seed_size }}{{ template "common.fullname" $global }}-{{ $i }}.{{ include "common.servicename" $global }},{{- end }}"
64 value: {{ .Values.config.jvmOpts | quote }}
65 - name: CASSANDRA_CLUSTER_NAME
66 value: {{ .Values.config.clusterName | quote }}
68 value: {{ .Values.config.dataCenter | quote }}
69 - name: CASSANDRA_RACK
70 value: {{ .Values.config.rackName | quote }}
71 - name: CASSANDRA_AUTO_BOOTSTRAP
72 value: {{ .Values.config.autoBootstrap | quote }}
76 fieldPath: status.podIP
78 - name: cassandra-data
79 mountPath: /var/lib/cassandra
81 {{ toYaml .Values.resources | indent 10 }}
82 {{- if .Values.nodeSelector }}
84 {{ toYaml .Values.nodeSelector | indent 8 }}
86 {{- if .Values.affinity }}
88 {{ toYaml .Values.affinity | indent 8 }}
94 {{- if not .Values.persistence.enabled }}
95 - name: cassandra-data
102 app: {{ template "common.fullname" . }}
103 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
104 release: "{{ .Release.Name }}"
105 heritage: "{{ .Release.Service }}"
107 volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass }}
110 - {{ .Values.persistence.accessMode | quote }}
113 storage: {{ .Values.persistence.size | quote }}