You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sdap.apache.org by tl...@apache.org on 2020/08/11 01:59:43 UTC

[incubator-sdap-nexus] 20/28: change solr-create-collection to a deployment

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

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

commit e4e552c2ea9370ee4d6df40040e781718b9cf3d6
Author: Eamon Ford <ea...@jpl.nasa.gov>
AuthorDate: Wed Jul 29 10:45:53 2020 -0700

    change solr-create-collection to a deployment
---
 docker/solr/cloud-init/create-collection.py |  4 ++--
 helm/templates/solr-create-collection.yml   | 16 ++++++++--------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/docker/solr/cloud-init/create-collection.py b/docker/solr/cloud-init/create-collection.py
index 9e46260..f8f98bc 100755
--- a/docker/solr/cloud-init/create-collection.py
+++ b/docker/solr/cloud-init/create-collection.py
@@ -107,5 +107,5 @@ finally:
 
 # We're done, do nothing forever.
 logging.info("Done.")
-# while True:
-#     time.sleep(987654321)
+while True:
+    time.sleep(987654321)
diff --git a/helm/templates/solr-create-collection.yml b/helm/templates/solr-create-collection.yml
index 7db5b97..756c8ed 100644
--- a/helm/templates/solr-create-collection.yml
+++ b/helm/templates/solr-create-collection.yml
@@ -1,12 +1,12 @@
-apiVersion: batch/v1
-kind: Job
+apiVersion: apps/v1
+kind: Deployment
 metadata:
   name: solr-create-collection
 spec:
-#  selector:
-#    matchLabels:
-#      app: solr-create-collection # has to match .spec.template.metadata.labels
-#  replicas: 1
+  selector:
+    matchLabels:
+      app: solr-create-collection # has to match .spec.template.metadata.labels
+  replicas: 1
   template:
     metadata:
       labels:
@@ -18,7 +18,7 @@ spec:
         image: nexusjpl/solr-cloud-init:1.0.1
         resources:
           requests:
-            memory: "1Gi"
+            memory: "0.5Gi"
             cpu: "0.25"
         env:
         - name: MINIMUM_NODES
@@ -31,4 +31,4 @@ spec:
           value: "{{ .Release.Name }}-zookeeper:2181/solr"
         - name: CREATE_COLLECTION_PARAMS
           value: "name=nexustiles&numShards=$(MINIMUM_NODES)&waitForFinalState=true"
-      restartPolicy: OnFailure
+      restartPolicy: Always