You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/09/21 13:51:11 UTC

[GitHub] [couchdb-helm] willholley commented on a change in pull request #42: Cluster setup

willholley commented on a change in pull request #42:
URL: https://github.com/apache/couchdb-helm/pull/42#discussion_r492057733



##########
File path: couchdb/templates/clustersetup.yaml
##########
@@ -0,0 +1,76 @@
+{{ if .Values.clusterSetup }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: cluster-setup-script
+  labels:
+    app: {{ template "couchdb.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+data:
+  setup.sh: |
+    set -e
+    BASE_URL=http://{{ template "couchdb.fullname" . }}:5984
+    set -x
+
+    echo "Waiting for CouchDB service to start..."
+    until curl --silent -max-time 5 --head --fail "${BASE_URL}/_up"; do

Review comment:
       it's possible `_up` requires authentication. You likely need to copy the logic from https://github.com/apache/couchdb-helm/blob/master/couchdb/templates/statefulset.yaml#L87 to deal with this




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org