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 }}
26 {{ if .Values.k8ssandraOperator.reaper.enabled -}}
29 registry: {{ include "repositoryGenerator.dockerHubRepository" . }}
31 registry: {{ include "repositoryGenerator.dockerHubRepository" . }}
36 app: {{ .Values.k8ssandraOperator.config.clusterName }}-reaper
37 version: {{ .Values.k8ssandraOperator.cassandraVersion }}
38 {{- if .Values.metrics.enabled }}
49 {{ if .Values.k8ssandraOperator.stargate.enabled -}}
52 registry: {{ include "repositoryGenerator.dockerHubRepository" . }}
53 tag: {{ .Values.k8ssandraOperator.stargate.tag }}
54 size: {{ .Values.k8ssandraOperator.stargate.size }}
55 heapSize: {{ .Values.k8ssandraOperator.stargate.jvmOptions.heapSize }}
58 app: {{ .Values.k8ssandraOperator.config.clusterName }}-stargate
59 version: {{ .Values.k8ssandraOperator.cassandraVersion }}
61 initialDelaySeconds: 200
67 initialDelaySeconds: 200
74 serverVersion: {{ .Values.k8ssandraOperator.cassandraVersion }}
76 cassandraDataVolumeClaimSpec:
77 {{ if .Values.k8ssandraOperator.persistence.storageClassName -}}
78 storageClassName: {{ .Values.k8ssandraOperator.persistence.storageClassName }}
84 storage: {{ .Values.k8ssandraOperator.persistence.size }}
86 name: {{ include "common.fullname" . }}-{{ .Values.k8ssandraOperator.config.secretName }}
87 {{- if .Values.metrics.enabled }}
98 {{ if .Values.k8ssandraOperator.config.casOptions -}}
100 {{ toYaml .Values.k8ssandraOperator.config.casOptions | nindent 8 }}
102 {{ if .Values.k8ssandraOperator.config.jvmOptions -}}
104 {{ toYaml .Values.k8ssandraOperator.config.jvmOptions | nindent 8 }}
107 hostNetwork: {{ .Values.k8ssandraOperator.config.hostNetwork }}
109 {{- range $datacenter := .Values.k8ssandraOperator.datacenters }}
111 name: {{ $datacenter.name }}
112 size: {{ $datacenter.size }}
114 {{ if .Values.podAnnotations -}}
118 {{ toYaml .Values.podAnnotations | nindent 10 }}
120 app: {{ .Values.k8ssandraOperator.config.clusterName }}
121 version: {{ .Values.k8ssandraOperator.cassandraVersion }}