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 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
66 successThreshold: {{ .Values.liveness.successThreshold }}
67 failureThreshold: {{ .Values.liveness.failureThreshold }}
75 nodetool status | grep -E "^UN\\s+${POD_IP}"
76 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
77 periodSeconds: {{ .Values.readiness.periodSeconds }}
78 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
79 successThreshold: {{ .Values.readiness.successThreshold }}
80 failureThreshold: {{ .Values.readiness.failureThreshold }}
87 - nodetool decommission
89 - name: CASSANDRA_USER
90 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-creds" "key" "login") | indent 12}}
91 - name: CASSANDRA_PASSWORD
92 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-creds" "key" "password") | indent 12}}
96 fieldPath: status.podIP
97 - name: CASSANDRA_PASSWORD_SEEDER
101 - name: CASSANDRA_CLUSTER_NAME
103 - name: CASSANDRA_NUM_TOKENS
105 - name: CASSANDRA_DATACENTER
107 - name: CASSANDRA_ENDPOINT_SNITCH
109 - name: CASSANDRA_RACK
111 - name: CASSANDRA_ENABLE_RPC
113 {{- $flavor := include "common.flavor" . }}
114 {{- $heap := pluck $flavor .Values.heap | first }}
115 {{- if (hasKey $heap "max") }}
116 - name: MAX_HEAP_SIZE
117 value: {{ $heap.max }}
119 {{- if (hasKey $heap "new") }}
121 value: {{ $heap.new }}
124 - mountPath: /etc/localtime
127 - name: cassandra-docker-entrypoint-initdb
128 mountPath: /docker-entrypoint-initdb.d/aaa_portal.cql
130 - name: {{ include "common.fullname" . }}-data
131 mountPath: /var/lib/cassandra/data
133 {{ include "common.resources" . | indent 12 }}
134 {{- if .Values.nodeSelector }}
136 {{ toYaml .Values.nodeSelector | indent 10 }}
138 {{- if .Values.affinity }}
140 {{ toYaml .Values.affinity | indent 10 }}
143 - name: cassandra-docker-entrypoint-initdb
145 name: {{ include "common.fullname" . }}-docker-entry-initd
149 {{- if .Values.persistence.enabled }}
150 - name: {{ include "common.fullname" . }}-data
151 persistentVolumeClaim:
152 claimName: {{ include "common.fullname" . }}
157 - name: "{{ include "common.namespace" . }}-docker-registry-key"