[COMMON] Adding Common Template for cassa-operator
- K8ssandraCluster resources template file added
- Modification of the cassandra chart to add the option to install
cassandra using the k8ssandra-operator
- AAI and SDC values changed to support the new cassandra settings
- Fix for SDC cql version in jobs
- for London make k8ssandra-operator optional (default: false)
Issue-ID: OOM-3168
Signed-off-by: Dasarathi, Swain (ds00528024) <ds00528024@techmahindra.com>
Change-Id: Idfe232460c9c1f584536e60ea042345d7dca3164
diff --git a/kubernetes/common/cassandra/templates/backup/configmap.yaml b/kubernetes/common/cassandra/templates/backup/configmap.yaml
index 9bbc69b..b566b61 100644
--- a/kubernetes/common/cassandra/templates/backup/configmap.yaml
+++ b/kubernetes/common/cassandra/templates/backup/configmap.yaml
@@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
*/}}
+{{- if not .Values.k8ssandraOperator.enabled }}
{{- if .Values.backup.enabled }}
apiVersion: v1
kind: ConfigMap
@@ -28,3 +29,4 @@
{{ tpl (.Files.Glob "resources/restore.sh").AsConfig . | indent 2 }}
{{ tpl (.Files.Glob "resources/exec.py").AsConfig . | indent 2 }}
{{- end -}}
+{{- end -}}
diff --git a/kubernetes/common/cassandra/templates/backup/cronjob.yaml b/kubernetes/common/cassandra/templates/backup/cronjob.yaml
index 27f3cc6..e2f675a 100644
--- a/kubernetes/common/cassandra/templates/backup/cronjob.yaml
+++ b/kubernetes/common/cassandra/templates/backup/cronjob.yaml
@@ -14,6 +14,8 @@
# limitations under the License.
*/}}
{{- if .Values.backup.enabled }}
+{{- if .Values.k8ssandraOperator.enabled }}
+{{ else }}
apiVersion: batch/v1beta1
kind: CronJob
metadata:
@@ -243,3 +245,4 @@
persistentVolumeClaim:
claimName: {{ include "common.fullname" . }}-backup-data
{{- end -}}
+{{- end -}}
\ No newline at end of file
diff --git a/kubernetes/common/cassandra/templates/backup/pv.yaml b/kubernetes/common/cassandra/templates/backup/pv.yaml
index 10c3100..23e4551 100644
--- a/kubernetes/common/cassandra/templates/backup/pv.yaml
+++ b/kubernetes/common/cassandra/templates/backup/pv.yaml
@@ -14,6 +14,8 @@
# limitations under the License.
*/}}
{{- if .Values.backup.enabled }}
+{{- if .Values.k8ssandraOperator.enabled }}
+{{ else }}
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
{{- if eq "True" (include "common.needPV" .) -}}
---
@@ -39,3 +41,4 @@
{{- end -}}
{{- end -}}
{{- end -}}
+{{- end -}}
diff --git a/kubernetes/common/cassandra/templates/backup/pvc.yaml b/kubernetes/common/cassandra/templates/backup/pvc.yaml
index 6fd5361..e60a1db 100644
--- a/kubernetes/common/cassandra/templates/backup/pvc.yaml
+++ b/kubernetes/common/cassandra/templates/backup/pvc.yaml
@@ -14,6 +14,8 @@
# limitations under the License.
*/}}
{{- if .Values.backup.enabled }}
+{{- if .Values.k8ssandraOperator.enabled }}
+{{ else }}
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
---
kind: PersistentVolumeClaim
@@ -39,3 +41,4 @@
storageClassName: {{ include "common.storageClass" . }}
{{- end -}}
{{- end -}}
+{{- end -}}