2 # Copyright (c) 2017 Amdocs, Bell Canada
3 # Modifications Copyright (c) 2018 AT&T
4 # Modifications Copyright (c) 2020 Nokia, Orange
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
22 name: {{ include "common.fullname" . }}
23 namespace: {{ include "common.namespace" . }}
25 app: {{ include "common.name" . }}
26 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
27 release: {{ include "common.release" . }}
28 heritage: {{ .Release.Service }}
32 app: {{ include "common.name" . }}
33 replicas: {{ .Values.replicaCount }}
37 app: {{ include "common.name" . }}
38 release: {{ include "common.release" . }}
41 - name: {{ include "common.name" . }}
42 image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
43 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
48 /opt/bitnami/scripts/cassandra/entrypoint.sh /opt/bitnami/scripts/cassandra/run.sh
50 - containerPort: {{ .Values.service.internalPort }}
51 - containerPort: {{ .Values.service.internalPort2 }}
52 - containerPort: {{ .Values.service.internalPort3 }}
53 - containerPort: {{ .Values.service.internalPort4 }}
54 - containerPort: {{ .Values.service.internalPort5 }}
55 {{ if eq .Values.liveness.enabled true }}
63 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
64 periodSeconds: {{ .Values.liveness.periodSeconds }}
65 successThreshold: {{ .Values.liveness.successThreshold }}
66 failureThreshold: {{ .Values.liveness.failureThreshold }}
74 nodetool status | grep -E "^UN\\s+${POD_IP}"
75 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
76 periodSeconds: {{ .Values.readiness.periodSeconds }}
77 successThreshold: {{ .Values.readiness.successThreshold }}
78 failureThreshold: {{ .Values.readiness.failureThreshold }}
85 - nodetool decommission
87 - name: CASSANDRA_USER
88 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-creds" "key" "login") | indent 12}}
89 - name: CASSANDRA_PASSWORD
90 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-creds" "key" "password") | indent 12}}
94 fieldPath: status.podIP
95 - name: CASSANDRA_PASSWORD_SEEDER
99 - name: CASSANDRA_CLUSTER_NAME
101 - name: CASSANDRA_NUM_TOKENS
103 - name: CASSANDRA_DATACENTER
105 - name: CASSANDRA_ENDPOINT_SNITCH
107 - name: CASSANDRA_RACK
109 - name: CASSANDRA_ENABLE_RPC
111 {{- if eq "small" .Values.flavor }}
112 - name: MAX_HEAP_SIZE
113 value: {{ .Values.resources.small.heap.max }}
115 value: {{ .Values.resources.small.heap.new }}
118 - mountPath: /etc/localtime
121 - name: cassandra-docker-entrypoint-initdb
122 mountPath: /docker-entrypoint-initdb.d/aaa_portal.cql
124 - name: {{ include "common.fullname" . }}-data
125 mountPath: /var/lib/cassandra/data
127 {{ include "common.resources" . | indent 12 }}
128 {{- if .Values.nodeSelector }}
130 {{ toYaml .Values.nodeSelector | indent 10 }}
132 {{- if .Values.affinity }}
134 {{ toYaml .Values.affinity | indent 10 }}
137 - name: cassandra-docker-entrypoint-initdb
139 name: {{ include "common.fullname" . }}-docker-entry-initd
143 {{- if .Values.persistence.enabled }}
144 - name: {{ include "common.fullname" . }}-data
145 persistentVolumeClaim:
146 claimName: {{ include "common.fullname" . }}
151 - name: "{{ include "common.namespace" . }}-docker-registry-key"