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 }}
29 serviceName: {{ include "common.servicename" . }}
30 replicas: {{ .Values.replicaCount }}
33 app: {{ include "common.name" . }}
34 podManagementPolicy: {{ .Values.podManagementPolicy }}
36 type: {{ .Values.updateStrategy.type }}
40 app: {{ include "common.name" . }}
41 release: {{ include "common.release" . }}
42 name: {{ include "common.name" . }}
45 - name: "{{ include "common.namespace" . }}-docker-registry-key"
47 - name: {{ include "common.name" . }}
48 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
49 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
51 - containerPort: {{ .Values.service.internalPort }}
52 - containerPort: {{ .Values.service.internalPort2 }}
53 - containerPort: {{ .Values.service.internalPort3 }}
54 {{- if eq .Values.liveness.enabled true }}
60 - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }'
61 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
62 periodSeconds: {{ .Values.liveness.periodSeconds }}
63 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
64 successThreshold: {{ .Values.liveness.successThreshold }}
65 failureThreshold: {{ .Values.liveness.failureThreshold }}
72 - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }'
73 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
74 periodSeconds: {{ .Values.readiness.periodSeconds }}
75 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
76 successThreshold: {{ .Values.readiness.successThreshold }}
77 failureThreshold: {{ .Values.readiness.failureThreshold }}
83 - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }'
84 initialDelaySeconds: {{ .Values.startup.initialDelaySeconds }}
85 periodSeconds: {{ .Values.startup.periodSeconds }}
86 timeoutSeconds: {{ .Values.startup.timeoutSeconds }}
87 successThreshold: {{ .Values.startup.successThreshold }}
88 failureThreshold: {{ .Values.startup.failureThreshold }}
92 command: ["/bin/sh", "-c", "PID=$(pidof java) && kill $PID && while ps -p $PID > /dev/null; do sleep 1; done"]
94 {{- $seed_size := default 1 .Values.replicaCount | int -}}
97 value: {{ .Values.config.heap.max }}
99 value: {{ .Values.config.heap.min }}
100 - name: CASSANDRA_SEEDS
101 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 }}"
103 value: {{ .Values.config.jvmOpts | quote }}
104 - name: CASSANDRA_CLUSTER_NAME
105 value: {{ .Values.config.clusterName | quote }}
107 value: {{ .Values.config.dataCenter | quote }}
108 - name: CASSANDRA_RACK
109 value: {{ .Values.config.rackName | quote }}
110 - name: CASSANDRA_AUTO_BOOTSTRAP
111 value: {{ .Values.config.autoBootstrap | quote }}
115 fieldPath: status.podIP
116 {{- if .Values.persistence.enabled }}
118 - name: {{ include "common.fullname" . }}-data
119 mountPath: /var/lib/cassandra
122 {{ include "common.resources" . | indent 12 }}
127 {{- if .Values.persistence.enabled }}
128 volumeClaimTemplates:
130 name: {{ include "common.fullname" . }}-data
132 name: {{ include "common.fullname" . }}
133 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
134 release: "{{ include "common.release" . }}"
135 heritage: "{{ .Release.Service }}"
138 - {{ .Values.persistence.accessMode | quote }}
139 storageClassName: {{ include "common.storageClass" . }}
142 storage: {{ .Values.persistence.size | quote }}