summaryrefslogtreecommitdiffstats
path: root/kubernetes/common/cassandra
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/common/cassandra')
-rw-r--r--kubernetes/common/cassandra/Chart.yaml1
-rw-r--r--kubernetes/common/cassandra/templates/backup/configmap.yaml2
-rw-r--r--kubernetes/common/cassandra/templates/backup/cronjob.yaml4
-rw-r--r--kubernetes/common/cassandra/templates/backup/pv.yaml2
-rw-r--r--kubernetes/common/cassandra/templates/backup/pvc.yaml2
-rw-r--r--kubernetes/common/cassandra/templates/cassOp.yaml4
-rw-r--r--kubernetes/common/cassandra/templates/configmap.yaml2
-rw-r--r--kubernetes/common/cassandra/templates/pv.yaml2
-rw-r--r--kubernetes/common/cassandra/templates/secrets.yaml2
-rw-r--r--kubernetes/common/cassandra/templates/service.yaml2
-rw-r--r--kubernetes/common/cassandra/templates/servicemonitor.yaml2
-rw-r--r--kubernetes/common/cassandra/templates/statefulset.yaml2
-rw-r--r--kubernetes/common/cassandra/values.yaml7
13 files changed, 20 insertions, 14 deletions
diff --git a/kubernetes/common/cassandra/Chart.yaml b/kubernetes/common/cassandra/Chart.yaml
index c861b1a8c8..75e07a1373 100644
--- a/kubernetes/common/cassandra/Chart.yaml
+++ b/kubernetes/common/cassandra/Chart.yaml
@@ -30,3 +30,4 @@ dependencies:
- name: serviceAccount
version: ~13.x-0
repository: 'file://../serviceAccount'
+ condition: global.cassandra.enableServiceAccount \ No newline at end of file
diff --git a/kubernetes/common/cassandra/templates/backup/configmap.yaml b/kubernetes/common/cassandra/templates/backup/configmap.yaml
index b566b6107e..2c85a1a01f 100644
--- a/kubernetes/common/cassandra/templates/backup/configmap.yaml
+++ b/kubernetes/common/cassandra/templates/backup/configmap.yaml
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
*/}}
-{{- if not .Values.k8ssandraOperator.enabled }}
+{{- if not .Values.global.cassandra.useOperator }}
{{- if .Values.backup.enabled }}
apiVersion: v1
kind: ConfigMap
diff --git a/kubernetes/common/cassandra/templates/backup/cronjob.yaml b/kubernetes/common/cassandra/templates/backup/cronjob.yaml
index e2f675a384..06bb7434c5 100644
--- a/kubernetes/common/cassandra/templates/backup/cronjob.yaml
+++ b/kubernetes/common/cassandra/templates/backup/cronjob.yaml
@@ -14,7 +14,7 @@
# limitations under the License.
*/}}
{{- if .Values.backup.enabled }}
-{{- if .Values.k8ssandraOperator.enabled }}
+{{- if .Values.global.cassandra.useOperator }}
{{ else }}
apiVersion: batch/v1beta1
kind: CronJob
@@ -39,7 +39,7 @@ spec:
- command:
- /app/ready.py
args:
- - --container-name
+ - --app-name
- {{ include "common.name" . }}
env:
- name: NAMESPACE
diff --git a/kubernetes/common/cassandra/templates/backup/pv.yaml b/kubernetes/common/cassandra/templates/backup/pv.yaml
index 23e4551c10..e7218fae7d 100644
--- a/kubernetes/common/cassandra/templates/backup/pv.yaml
+++ b/kubernetes/common/cassandra/templates/backup/pv.yaml
@@ -14,7 +14,7 @@
# limitations under the License.
*/}}
{{- if .Values.backup.enabled }}
-{{- if .Values.k8ssandraOperator.enabled }}
+{{- if .Values.global.cassandra.useOperator }}
{{ else }}
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
{{- if eq "True" (include "common.needPV" .) -}}
diff --git a/kubernetes/common/cassandra/templates/backup/pvc.yaml b/kubernetes/common/cassandra/templates/backup/pvc.yaml
index e60a1db510..56b3ba8b02 100644
--- a/kubernetes/common/cassandra/templates/backup/pvc.yaml
+++ b/kubernetes/common/cassandra/templates/backup/pvc.yaml
@@ -14,7 +14,7 @@
# limitations under the License.
*/}}
{{- if .Values.backup.enabled }}
-{{- if .Values.k8ssandraOperator.enabled }}
+{{- if .Values.global.cassandra.useOperator }}
{{ else }}
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
---
diff --git a/kubernetes/common/cassandra/templates/cassOp.yaml b/kubernetes/common/cassandra/templates/cassOp.yaml
index cb6ce4adc5..9f463adf08 100644
--- a/kubernetes/common/cassandra/templates/cassOp.yaml
+++ b/kubernetes/common/cassandra/templates/cassOp.yaml
@@ -1,5 +1,5 @@
{{/*
-# Copyright © 2018 Amdocs, AT&T, Bell Canada
+# Copyright © 2023 Deutsche Telekom AG
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -14,6 +14,6 @@
# limitations under the License.
*/}}
-{{- if .Values.k8ssandraOperator.enabled }}
+{{- if .Values.global.cassandra.useOperator }}
{{ include "common.k8ssandraCluster" . }}
{{- end }} \ No newline at end of file
diff --git a/kubernetes/common/cassandra/templates/configmap.yaml b/kubernetes/common/cassandra/templates/configmap.yaml
index 8f2b39e1a1..5510986e54 100644
--- a/kubernetes/common/cassandra/templates/configmap.yaml
+++ b/kubernetes/common/cassandra/templates/configmap.yaml
@@ -1,4 +1,4 @@
-{{- if not .Values.k8ssandraOperator.enabled }}
+{{- if not .Values.global.cassandra.useOperator }}
{{- if .Values.configOverrides }}
apiVersion: v1
kind: ConfigMap
diff --git a/kubernetes/common/cassandra/templates/pv.yaml b/kubernetes/common/cassandra/templates/pv.yaml
index 8e2ad663c3..d18e51d2f4 100644
--- a/kubernetes/common/cassandra/templates/pv.yaml
+++ b/kubernetes/common/cassandra/templates/pv.yaml
@@ -13,6 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
*/}}
-{{- if not .Values.k8ssandraOperator.enabled }}
+{{- if not .Values.global.cassandra.useOperator }}
{{ include "common.replicaPV" . }}
{{- end }} \ No newline at end of file
diff --git a/kubernetes/common/cassandra/templates/secrets.yaml b/kubernetes/common/cassandra/templates/secrets.yaml
index b776caf6b6..5a611a9bef 100644
--- a/kubernetes/common/cassandra/templates/secrets.yaml
+++ b/kubernetes/common/cassandra/templates/secrets.yaml
@@ -16,6 +16,6 @@
# limitations under the License.
*/}}
-{{- if .Values.k8ssandraOperator.enabled }}
+{{- if .Values.global.cassandra.useOperator }}
{{ include "common.secretFast" . }}
{{- end }} \ No newline at end of file
diff --git a/kubernetes/common/cassandra/templates/service.yaml b/kubernetes/common/cassandra/templates/service.yaml
index 092c677812..8b2e534a5f 100644
--- a/kubernetes/common/cassandra/templates/service.yaml
+++ b/kubernetes/common/cassandra/templates/service.yaml
@@ -14,6 +14,6 @@
# limitations under the License.
*/}}
-{{- if not .Values.k8ssandraOperator.enabled }}
+{{- if not .Values.global.cassandra.useOperator }}
{{ include "common.headlessService" . }}
{{- end }} \ No newline at end of file
diff --git a/kubernetes/common/cassandra/templates/servicemonitor.yaml b/kubernetes/common/cassandra/templates/servicemonitor.yaml
index 759586fcdb..078107393a 100644
--- a/kubernetes/common/cassandra/templates/servicemonitor.yaml
+++ b/kubernetes/common/cassandra/templates/servicemonitor.yaml
@@ -14,7 +14,7 @@
# limitations under the License.
*/}}
-{{- if not .Values.k8ssandraOperator.enabled }}
+{{- if not .Values.global.cassandra.useOperator }}
{{- if .Values.metrics.serviceMonitor.enabled }}
{{ include "common.serviceMonitor" . }}
{{- end }}
diff --git a/kubernetes/common/cassandra/templates/statefulset.yaml b/kubernetes/common/cassandra/templates/statefulset.yaml
index dff70820e9..4815d14594 100644
--- a/kubernetes/common/cassandra/templates/statefulset.yaml
+++ b/kubernetes/common/cassandra/templates/statefulset.yaml
@@ -14,7 +14,7 @@
# limitations under the License.
*/}}
-{{- if not .Values.k8ssandraOperator.enabled }}
+{{- if not .Values.global.cassandra.useOperator }}
apiVersion: apps/v1
kind: StatefulSet
metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
diff --git a/kubernetes/common/cassandra/values.yaml b/kubernetes/common/cassandra/values.yaml
index 2f24750072..930fe9b2d3 100644
--- a/kubernetes/common/cassandra/values.yaml
+++ b/kubernetes/common/cassandra/values.yaml
@@ -21,9 +21,14 @@ global: # global defaults
mountPath: /dockerdata-nfs
backup:
mountPath: /dockerdata-nfs/backup
+ cassandra:
+ # flag to enable the DB creation via k8ssandra-operator
+ useOperator: true
+ # if useOperator set to "true", set "enableServiceAccount to "false"
+ # as the SA is created by the Operator
+ enableServiceAccount: false
k8ssandraOperator:
- enabled: true
cassandraVersion: 4.0.1
persistence:
#storageClassName: default