2 # Copyright © 2019 AT&T, Amdocs, Bell Canada, Orange
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
21 name: {{ include "common.fullname" . }}
22 namespace: {{ include "common.namespace" . }}
24 app: {{ include "common.name" . }}
25 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
26 release: {{ include "common.release" . }}
27 heritage: {{ .Release.Service }}
30 preferredDuringSchedulingIgnoredDuringExecution:
39 topologyKey: kubernetes.io/hostname
40 serviceName: {{ include "common.servicename" . }}
41 replicas: {{ .Values.replicaCount }}
44 app: {{ include "common.name" . }}
45 podManagementPolicy: {{ .Values.podManagementPolicy }}
47 type: {{ .Values.updateStrategy.type }}
51 app: {{ include "common.name" . }}
52 release: {{ include "common.release" . }}
53 name: {{ include "common.name" . }}
56 - name: {{ include "common.name" . }}
57 image: "{{ .Values.global.repository }}/{{ .Values.image.image }}"
58 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
60 - containerPort: {{ .Values.service.internalPort }}
61 - containerPort: {{ .Values.service.internalPort2 }}
62 - containerPort: {{ .Values.service.internalPort3 }}
63 {{- if eq .Values.liveness.enabled true }}
69 - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }'
70 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
71 periodSeconds: {{ .Values.liveness.periodSeconds }}
78 - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }'
79 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
80 periodSeconds: {{ .Values.readiness.periodSeconds }}
84 command: ["/bin/sh", "-c", "PID=$(pidof java) && kill $PID && while ps -p $PID > /dev/null; do sleep 1; done"]
86 {{- $seed_size := default 1 .Values.replicaCount | int -}}
89 value: {{ .Values.config.heap.max }}
91 value: {{ .Values.config.heap.min }}
92 - name: CASSANDRA_SEEDS
93 value: "{{- range $i, $e := until $seed_size }}{{ template "common.fullname" $global }}-{{ $i }}.{{ include "common.servicename" $global }}{{- if (lt ( add 1 $i ) $seed_size ) }},{{- end }}{{- end }}"
95 value: {{ .Values.config.jvmOpts | quote }}
96 - name: CASSANDRA_CLUSTER_NAME
97 value: {{ .Values.config.clusterName | quote }}
99 value: {{ .Values.config.dataCenter | quote }}
100 - name: CASSANDRA_RACK
101 value: {{ .Values.config.rackName | quote }}
102 - name: CASSANDRA_AUTO_BOOTSTRAP
103 value: {{ .Values.config.autoBootstrap | quote }}
107 fieldPath: status.podIP
108 {{- if .Values.persistence.enabled }}
110 - name: {{ include "common.fullname" . }}-data
111 mountPath: /var/lib/cassandra
114 {{ include "common.resources" . | indent 12 }}
119 {{- if .Values.persistence.enabled }}
120 volumeClaimTemplates:
122 name: {{ include "common.fullname" . }}-data
124 name: {{ include "common.fullname" . }}
125 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
126 release: "{{ include "common.release" . }}"
127 heritage: "{{ .Release.Service }}"
130 - {{ .Values.persistence.accessMode | quote }}
131 storageClassName: {{ include "common.storageClass" . }}
134 storage: {{ .Values.persistence.size | quote }}
137 - name: "{{ include "common.namespace" . }}-docker-registry-key"