[CASSANDRA] Make stargate and reaper deployment optional 30/136430/3
authorAndreas Geissler <andreas-geissler@telekom.de>
Fri, 10 Nov 2023 10:28:49 +0000 (11:28 +0100)
committerAndreas Geissler <andreas-geissler@telekom.de>
Fri, 10 Nov 2023 16:43:47 +0000 (17:43 +0100)
As Reaper startup is failing in many cases the deployment
it should be possible to disable it to stabilize the gating
Change the delay handling in the deploy plugin.

Issue-ID: OOM-3246

Change-Id: Ibf435d30551aacc213d7c9d38bce72198f4f4b3d
Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de>
kubernetes/aai/components/aai-graphadmin/templates/job-copy-db-backup.yaml
kubernetes/aai/components/aai-graphadmin/templates/job-create-db.yaml
kubernetes/aai/components/aai-graphadmin/templates/job-migration.yaml
kubernetes/common/cassandra/values.yaml
kubernetes/common/common/templates/_cassOp.tpl
kubernetes/helm/plugins/deploy/deploy.sh
kubernetes/sdc/components/sdc-cs/templates/job.yaml

index 2bee19f..865dfe3 100644 (file)
@@ -64,11 +64,7 @@ spec:
       - command:
         - /bin/bash
         - -c
-        {{- if .Values.global.cassandra.useOperator }}
-        - /app/ready.py --app-name aai-cassandra-reaper --timeout 1 || /app/ready.py --app-name cassandra-reaper
-        {{- else }}
         - /app/ready.py --app-name aai-cassandra --timeout 1 || /app/ready.py --app-name cassandra
-        {{- end }}
         env:
         - name: NAMESPACE
           valueFrom:
index c80d348..1a81249 100644 (file)
@@ -60,9 +60,9 @@ spec:
         args:
         - --app-name
         {{- if .Values.global.cassandra.localCluster }}
-        - {{ ternary "aai-cassandra-reaper" "aai-cassandra" .Values.global.cassandra.useOperator }}
+        - aai-cassandra
         {{- else }}
-        - {{ ternary "cassandra-reaper" "cassandra" .Values.global.cassandra.useOperator }}
+        - cassandra
         {{- end }}
         - --container-name
         - aai-schema-service
index b2bc0e7..bf3279f 100644 (file)
@@ -65,9 +65,9 @@ spec:
         args:
         - --app-name
         {{- if .Values.global.cassandra.localCluster }}
-        - {{ ternary "aai-cassandra-reaper" "aai-cassandra" .Values.global.cassandra.useOperator }}
+        - aai-cassandra
         {{- else }}
-        - {{ ternary "cassandra-reaper" "cassandra" .Values.global.cassandra.useOperator }}
+        - cassandra
         {{- end }}
         - --container-name
         - aai-schema-service
index eef716e..205c711 100644 (file)
@@ -29,7 +29,7 @@ global: # global defaults
     enableServiceAccount: false
 
 k8ssandraOperator:
-  cassandraVersion: 4.0.1
+  cassandraVersion: 4.0.10
   persistence:
     #storageClassName: default
     size: 10Gi
@@ -47,7 +47,10 @@ k8ssandraOperator:
   datacenters:
     - name: dc1
       size: 3
+  reaper:
+    enabled: true
   stargate:
+    enabled: true
     tag: v1.0.76
     size: 1
     jvmOptions:
index 3ea3ff1..b9f6766 100644 (file)
@@ -23,6 +23,7 @@ kind: K8ssandraCluster
 metadata:
   name: {{ .Values.k8ssandraOperator.config.clusterName }}
 spec:
+  {{ if .Values.k8ssandraOperator.reaper.enabled -}}
   reaper:
     initContainerImage:
       registry: {{ include "repositoryGenerator.dockerHubRepository" . }}
@@ -34,6 +35,8 @@ spec:
       commonLabels:
         app: {{ .Values.k8ssandraOperator.config.clusterName }}-reaper
         version: {{ .Values.k8ssandraOperator.cassandraVersion }}
+  {{- end }}
+  {{ if .Values.k8ssandraOperator.stargate.enabled -}}
   stargate:
     containerImage:
       registry: {{ include "repositoryGenerator.dockerHubRepository" . }}
@@ -56,6 +59,7 @@ spec:
       failureThreshold: 20
       successThreshold: 1
       timeoutSeconds: 20
+  {{- end }}
   cassandra:
     serverVersion: {{ .Values.k8ssandraOperator.cassandraVersion }}
     storageConfig:
index 3b16bf3..f60a2d3 100755 (executable)
@@ -296,8 +296,8 @@ deploy() {
         done
       fi
     done
-
-
+    # Disable delay
+    DELAY="false"
     for subchart in * ; do
       SUBCHART_OVERRIDES=$CACHE_SUBCHART_DIR/$subchart/subchart-overrides.yaml
 
index 8082054..3738ff4 100644 (file)
@@ -36,9 +36,9 @@ spec:
         args:
         - --app-name
         {{- if .Values.global.sdc_cassandra.localCluster }}
-        - {{ ternary "sdc-cs-reaper" "sdc-cs" .Values.global.sdc_cassandra.useOperator }}
+        - sdc-cs
         {{- else }}
-        - {{ ternary "cassandra-reaper" "cassandra" .Values.global.sdc_cassandra.useOperator }}
+        - cassandra
         {{- end }}
         - "-t"
         - "15"