2 # Copyright © 2022 Deutsche Telekom AG
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.
17 {{/* Cassandra Data Center. */}}
18 {{- define "common.k8ssandraCluster" -}}
19 {{- $global := .Values.global }}
21 apiVersion: k8ssandra.io/v1alpha1
22 kind: K8ssandraCluster
24 name: {{ .Values.k8ssandraOperator.config.clusterName }}
28 registry: {{ include "repositoryGenerator.dockerHubRepository" . }}
33 registry: {{ include "repositoryGenerator.dockerHubRepository" . }}
34 tag: {{ .Values.k8ssandraOperator.stargate.tag }}
35 size: {{ .Values.k8ssandraOperator.stargate.size }}
36 heapSize: {{ .Values.k8ssandraOperator.stargate.jvmOptions.heapSize }}
38 initialDelaySeconds: 200
44 initialDelaySeconds: 200
50 serverVersion: {{ .Values.k8ssandraOperator.cassandraVersion }}
52 cassandraDataVolumeClaimSpec:
53 {{ if .Values.k8ssandraOperator.persistence.storageClassName -}}
54 storageClassName: {{ .Values.k8ssandraOperator.persistence.storageClassName }}
60 storage: {{ .Values.k8ssandraOperator.persistence.size }}
62 name: {{ include "common.fullname" . }}-{{ .Values.k8ssandraOperator.config.secretName }}
64 {{ if .Values.k8ssandraOperator.config.casOptions -}}
66 {{ toYaml .Values.k8ssandraOperator.config.casOptions | nindent 8 }}
68 {{ if .Values.k8ssandraOperator.config.jvmOptions -}}
70 {{ toYaml .Values.k8ssandraOperator.config.jvmOptions | nindent 8 }}
73 hostNetwork: {{ .Values.k8ssandraOperator.config.hostNetwork }}
75 {{- range $datacenter := .Values.k8ssandraOperator.datacenters }}
77 name: {{ $datacenter.name }}
78 size: {{ $datacenter.size }}
80 {{ if .Values.podAnnotations -}}
84 {{ toYaml .Values.podAnnotations | nindent 10 }}
86 app: {{ .Values.k8ssandraOperator.config.clusterName }}
87 version: {{ .Values.k8ssandraOperator.cassandraVersion }}