This is an automated email from the ASF dual-hosted git repository.

eamonford pushed a commit to branch bug_fixes
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git


The following commit(s) were added to refs/heads/bug_fixes by this push:
     new 5103311  Configurable cassandra parameters
5103311 is described below

commit 5103311f936e50914f998e53372e17834a51f77b
Author: Eamon Ford <[email protected]>
AuthorDate: Wed Nov 25 12:48:20 2020 -0800

    Configurable cassandra parameters
---
 helm/templates/_helpers.tpl               | 14 +++++++++++++-
 helm/templates/granule-ingester.yml       |  6 +++---
 helm/templates/solr-create-collection.yml |  2 +-
 helm/templates/webapp.yml                 |  6 +++---
 helm/values.yaml                          |  6 ++++--
 5 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/helm/templates/_helpers.tpl b/helm/templates/_helpers.tpl
index 5944f33..56dcb4a 100644
--- a/helm/templates/_helpers.tpl
+++ b/helm/templates/_helpers.tpl
@@ -51,4 +51,16 @@ The data volume mount which is used in both the Collection 
Manager and the Granu
 
 {{- define "nexus.urls.zookeeper" -}}
 {{ .Values.external.zookeeperHostAndPort | default (print .Release.Name 
"-zookeeper:2181") }}
-{{- end -}}
\ No newline at end of file
+{{- end -}}
+
+{{- define "nexus.urls.cassandra" -}}
+{{ .Values.external.cassandraHost | default (print .Release.Name "-cassandra") 
}}
+{{- end -}}
+
+{{- define "nexus.credentials.cassandra.username" -}}
+{{ .Values.external.cassandraUsername | default "cassandra" }}
+{{- end -}}
+
+{{- define "nexus.credentials.cassandra.password" -}}
+{{ .Values.external.cassandraPassword | default "cassandra" }}
+{{- end -}}
diff --git a/helm/templates/granule-ingester.yml 
b/helm/templates/granule-ingester.yml
index 7981343..3a2aeeb 100644
--- a/helm/templates/granule-ingester.yml
+++ b/helm/templates/granule-ingester.yml
@@ -31,11 +31,11 @@ spec:
             - name: RABBITMQ_HOST
               value: {{ .Values.rabbitmq.fullnameOverride }}
             - name: CASSANDRA_CONTACT_POINTS
-              value: {{ .Release.Name }}-cassandra
+              value: {{ include "nexus.urls.cassandra" . }}
             - name: CASSANDRA_USERNAME
-              value: cassandra
+              value: {{ include "nexus.credentials.cassandra.username" . }}
             - name: CASSANDRA_PASSWORD
-              value: cassandra
+              value: {{ include "nexus.credentials.cassandra.password" . }}
             - name: ZK_HOST_AND_PORT
               value: {{ include "nexus.urls.zookeeper" . }}
             {{ if .Values.ingestion.granuleIngester.maxConcurrency }}
diff --git a/helm/templates/solr-create-collection.yml 
b/helm/templates/solr-create-collection.yml
index d95ef82..717cb42 100644
--- a/helm/templates/solr-create-collection.yml
+++ b/helm/templates/solr-create-collection.yml
@@ -1,4 +1,4 @@
-{{ if .Values.solrInitEnabled }}
+{{ if .Values.solr.initPodEnabled }}
 apiVersion: apps/v1
 kind: Deployment
 metadata:
diff --git a/helm/templates/webapp.yml b/helm/templates/webapp.yml
index 6f71bb5..d14f877 100644
--- a/helm/templates/webapp.yml
+++ b/helm/templates/webapp.yml
@@ -12,9 +12,9 @@ spec:
   imagePullPolicy: Always
   mainApplicationFile: 
local:///incubator-sdap-nexus/analysis/webservice/webapp.py
   arguments:
-    - --cassandra-host={{ .Release.Name }}-cassandra
-    - --cassandra-username=cassandra
-    - --cassandra-password=cassandra
+    - --cassandra-host={{ include "nexus.urls.cassandra" . }}
+    - --cassandra-username={{ include "nexus.credentials.cassandra.username" . 
}}
+    - --cassandra-password={{ include "nexus.credentials.cassandra.password" . 
}}
     - --solr-host={{ include "nexus.urls.solr" . }}
   sparkVersion: "2.4.4"
   restartPolicy:
diff --git a/helm/values.yaml b/helm/values.yaml
index 4f221a2..78acf8e 100644
--- a/helm/values.yaml
+++ b/helm/values.yaml
@@ -108,11 +108,13 @@ ingestion:
 external:
   solrHostAndPort:   
   zookeeperHostAndPort:
-
-solrInitEnabled: true
+  cassandraHost:
+  cassandraUsername:
+  cassandraPassword:
 
 solr:
   enabled: true
+  initPodEnabled: true
   image:
     repository: nexusjpl/solr
     tag: 8.4.0

Reply via email to