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 14:04:38 UTC

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

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



##########
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:
       I went to a little effort to avoid providing the password on the curl command line. See here: https://github.com/apache/couchdb-helm/pull/42/files#diff-339223d6a106ee3d80bf47312764fc20R25-R28
   
   I'm not sure how important that really is within Kubernetes. If it's not important, I can use your simpler approach in both places. If you think it does provide any value, should I use the same/

##########
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:
       I went to a little effort to avoid providing the password on the curl command line. See here: https://github.com/apache/couchdb-helm/pull/42/files#diff-339223d6a106ee3d80bf47312764fc20R25-R28
   
   I'm not sure how important that really is within Kubernetes. If it's not important, I can use your simpler approach in both places. If you think it does provide any value, should I use the same?




----------------------------------------------------------------
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