1 # Copyright © 2018 Amdocs, AT&T, Bell Canada
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 apiVersion: apps/v1beta1
18 name: {{ include "common.fullname" . }}
19 namespace: {{ include "common.namespace" . }}
21 app: {{ include "common.name" . }}
22 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
23 release: {{ .Release.Name }}
24 heritage: {{ .Release.Service }}
26 serviceName: {{ include "common.servicename" . }}
27 replicas: {{ .Values.replicaCount }}
28 podManagementPolicy: {{ .Values.podManagementPolicy }}
30 type: {{ .Values.updateStrategy.type }}
34 app: {{ include "common.name" . }}
35 release: {{ .Release.Name }}
36 name: {{ include "common.name" . }}
39 - name: {{ include "common.name" . }}
40 image: {{ .Values.image }}
41 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
43 - containerPort: {{ .Values.service.internalPort }}
44 - containerPort: {{ .Values.service.internalPort2 }}
45 - containerPort: {{ .Values.service.internalPort3 }}
46 - containerPort: {{ .Values.service.internalPort4 }}
47 - containerPort: {{ .Values.service.internalPort5 }}
49 - name: {{ .Values.service.name }}
50 mountPath: /var/lib/cassandra
51 {{ if eq .Values.configmapping true }}
52 - name: {{ .Values.service.name }}-docker-entry-initd
53 mountPath: /{{ .Values.service.name }}-docker-entrypoint-initdb.d/cassandra.cql
54 subPath: cassandra.cql
56 {{- if eq .Values.liveness.enabled true }}
62 - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }'
63 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
64 periodSeconds: {{ .Values.liveness.periodSeconds }}
71 - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }'
72 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
73 timeoutSeconds: {{ .Values.liveness.periodSeconds }}
75 {{- $seed_size := default 1 .Values.replicaCount | int -}}
78 value: {{ .Values.config.heap.max }}
80 value: {{ .Values.config.heap.min }}
82 value: {{ .Values.config.jvmOpts | quote }}
83 - name: CASSANDRA_CLUSTER_NAME
84 value: {{ .Values.config.clusterName | quote }}
86 value: {{ .Values.config.dataCenter | quote }}
87 - name: CASSANDRA_RACK
88 value: {{ .Values.config.rackName | quote }}
89 - name: CASSANDRA_AUTO_BOOTSTRAP
90 value: {{ .Values.config.autoBootstrap | quote }}
94 fieldPath: status.podIP
95 {{ if eq .Values.configmapping true }}
103 /bin/sleep {{ .Values.readiness.initialDelaySeconds }};
104 cd /{{ .Values.service.name }}-docker-entrypoint-initdb.d;
105 cqlsh -u root -p root -f cassandra.cql
108 {{ toYaml .Values.resources | indent 10 }}
109 {{- if .Values.nodeSelector }}
111 {{ toYaml .Values.nodeSelector | indent 8 }}
113 {{- if .Values.affinity }}
115 {{ toYaml .Values.affinity | indent 8 }}
121 {{ if eq .Values.configmapping true }}
122 - name: {{ .Values.service.name }}-docker-entry-initd
124 name: {{ .Values.service.name }}-docker-entry-initd
126 {{- if not .Values.persistence.enabled }}
127 - name: {{ .Values.service.name }}
130 volumeClaimTemplates:
132 name: {{ .Values.service.name }}
134 app: {{ template "common.fullname" . }}
135 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
136 release: "{{ .Release.Name }}"
137 heritage: "{{ .Release.Service }}"
139 volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass }}
142 - {{ .Values.persistence.accessMode | quote }}
145 storage: {{ .Values.persistence.size | quote }}
148 release: "{{ .Release.Name }}"