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

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


The following commit(s) were added to refs/heads/helm-ingester by this push:
     new 34fb81a  charts
34fb81a is described below

commit 34fb81ae38d5ef585bf32835bdc91d8c41008756
Author: Eamon Ford <[email protected]>
AuthorDate: Tue Jul 7 11:03:57 2020 -0500

    charts
---
 helm/templates/collection-manager.yml | 7 +++++++
 helm/templates/granule-ingester.yml   | 9 ++++++++-
 helm/values.yaml                      | 9 ++++++++-
 tools/deletebyquery/deletebyquery.py  | 7 +++++--
 4 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/helm/templates/collection-manager.yml 
b/helm/templates/collection-manager.yml
index 01f3c63..6708b13 100644
--- a/helm/templates/collection-manager.yml
+++ b/helm/templates/collection-manager.yml
@@ -37,6 +37,13 @@ spec:
             - name: HISTORY_PATH
               value: {{ include "nexus.history.mountPath" . }}
             {{- end }}
+          resources:
+            requests:
+              cpu: {{ .Values.ingestion.collectionManager.cpu }}
+              memory: {{ .Values.ingestion.collectionManager.memory }}
+            limits:
+              cpu: {{ .Values.ingestion.collectionManager.cpu }}
+              memory: {{ .Values.ingestion.collectionManager.memory }}
           volumeMounts:
 {{ include "nexus.ingestion.dataVolumeMount" . | indent 12 }}
             {{- if not $history.url }}
diff --git a/helm/templates/granule-ingester.yml 
b/helm/templates/granule-ingester.yml
index 4756f22..2ce03b6 100644
--- a/helm/templates/granule-ingester.yml
+++ b/helm/templates/granule-ingester.yml
@@ -6,7 +6,7 @@ metadata:
     app: granule-ingester
   name: granule-ingester
 spec:
-  replicas: 5
+  replicas: {{ .Values.ingestion.granuleIngester.replicas }}
   selector:
     matchLabels:
       app: granule-ingester
@@ -29,6 +29,13 @@ spec:
               value: sdap-cassandra
             - name: SOLR_HOST_AND_PORT
               value: http://sdap-solr:8983
+          resources:
+            requests:
+              cpu: {{ .Values.ingestion.granuleIngester.cpu }}
+              memory: {{ .Values.ingestion.granuleIngester.memory }}
+            limits:
+              cpu: {{ .Values.ingestion.granuleIngester.cpu }}
+              memory: {{ .Values.ingestion.granuleIngester.memory }}
           volumeMounts:
 {{ include "nexus.ingestion.dataVolumeMount" . | indent 12 }}
       volumes:
diff --git a/helm/values.yaml b/helm/values.yaml
index 4562cc3..51a1dd1 100644
--- a/helm/values.yaml
+++ b/helm/values.yaml
@@ -26,9 +26,13 @@ ingestion:
   granuleIngester:
     replicas: 2
     image: nexusjpl/granule-ingester:latest
+    cpu: 1
+    memory: 1Gi
 
   collectionManager:
     image: nexusjpl/collection-manager:0.0.2
+    cpu: 0.5
+    memory: 0.5Gi
 
   configOperator:
     image: nexusjpl/config-operator:latest
@@ -91,9 +95,12 @@ nginx-ingress:
   defaultBackend:
     enabled: false
 
+##
+## Configuration values for the rabbitmq dependency.
+## ref: https://github.com/bitnami/charts/tree/master/bitnami/rabbitmq
 rabbitmq:
   fullnameOverride: rabbitmq
-  replicaCount: 2
+  replicaCount: 1
   auth:
     username: guest
     password: guest
diff --git a/tools/deletebyquery/deletebyquery.py 
b/tools/deletebyquery/deletebyquery.py
index f703448..d5319eb 100644
--- a/tools/deletebyquery/deletebyquery.py
+++ b/tools/deletebyquery/deletebyquery.py
@@ -22,7 +22,7 @@ from random import sample
 
 import cassandra.concurrent
 from cassandra.cluster import Cluster
-from cassandra.policies import RoundRobinPolicy, TokenAwarePolicy
+from cassandra.policies import RoundRobinPolicy, TokenAwarePolicy, 
WhiteListRoundRobinPolicy
 from solrcloudpy import SolrConnection, SearchOptions
 
 from six.moves import input
@@ -52,10 +52,13 @@ def init(args):
     dc_policy = RoundRobinPolicy()
     token_policy = TokenAwarePolicy(dc_policy)
 
+    whitelist_policy = WhiteListRoundRobinPolicy(['127.0.0.1'])
+
+
     global cassandra_cluster
     cassandra_cluster = Cluster(contact_points=args.cassandra, 
port=args.cassandraPort,
                                 
protocol_version=int(args.cassandraProtocolVersion),
-                                load_balancing_policy=token_policy)
+                                load_balancing_policy=whitelist_policy)
     global cassandra_session
     cassandra_session = 
cassandra_cluster.connect(keyspace=args.cassandraKeyspace)
 

Reply via email to