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.fullname" . }}
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 - containerPort: {{ .Values.service.internalPort4 }}
33 {{- if eq .Values.liveness.enabled true }}
39 - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }'
40 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
41 periodSeconds: {{ .Values.liveness.periodSeconds }}
48 - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }'
49 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
50 timeoutSeconds: {{ .Values.liveness.periodSeconds }}
54 command: ["/bin/sh", "-c", "PID=$(pidof java) && kill $PID && while ps -p $PID > /dev/null; do sleep 1; done"]
56 {{- $seed_size := default 1 .Values.replicaCount | int -}}
59 value: {{ .Values.config.heap.max }}
61 value: {{ .Values.config.heap.min }}
62 - name: CASSANDRA_SEEDS
63 value: "{{- range $i, $e := until $seed_size }}{{ template "common.fullname" $global }}-{{ $i }},{{- end }}"
65 value: {{ .Values.config.jvmOpts | quote }}
66 - name: CASSANDRA_CLUSTER_NAME
67 value: {{ .Values.config.clusterName | quote }}
69 value: {{ .Values.config.dataCenter | quote }}
70 - name: CASSANDRA_RACK
71 value: {{ .Values.config.rackName | quote }}
72 - name: CASSANDRA_AUTO_BOOTSTRAP
73 value: {{ .Values.config.autoBootstrap | quote }}
77 fieldPath: status.podIP
79 - name: cassandra-data
80 mountPath: /var/lib/cassandra
82 {{ toYaml .Values.resources | indent 10 }}
83 {{- if .Values.nodeSelector }}
85 {{ toYaml .Values.nodeSelector | indent 8 }}
87 {{- if .Values.affinity }}
89 {{ toYaml .Values.affinity | indent 8 }}
95 {{- if not .Values.persistence.enabled }}
96 - name: cassandra-data
103 app: {{ template "common.fullname" . }}
104 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
105 release: "{{ .Release.Name }}"
106 heritage: "{{ .Release.Service }}"
108 volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass }}
111 - {{ .Values.persistence.accessMode | quote }}
114 storage: {{ .Values.persistence.size | quote }}