This is an automated email from the ASF dual-hosted git repository. jaydoane pushed a commit to branch clouseau-3 in repository https://gitbox.apache.org/repos/asf/couchdb-helm.git
commit 5e13e98e42ed9f3d4ff6daebfa26425140431b85 Author: Jay Doane <[email protected]> AuthorDate: Fri Dec 12 16:52:19 2025 -0800 Attempt to use secret erlangCookie Clouseau still unavailable --- couchdb/templates/statefulset.yaml | 23 +++++++++++++++++++++++ couchdb/values.yaml | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/couchdb/templates/statefulset.yaml b/couchdb/templates/statefulset.yaml index 7ad01d0..aab862e 100644 --- a/couchdb/templates/statefulset.yaml +++ b/couchdb/templates/statefulset.yaml @@ -91,6 +91,16 @@ spec: - name: couchdb image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + command: + - sh + - -c + - | + echo "$COUCHDB_ERLANG_COOKIE" > /opt/couchdb/.erlang.cookie + chmod 400 /opt/couchdb/.erlang.cookie + {{- if not (hasKey .Values.erlangFlags "setcookie") }} + export ERL_FLAGS="$ERL_FLAGS -setcookie $COUCHDB_ERLANG_COOKIE" + {{- end }} + exec /docker-entrypoint.sh /opt/couchdb/bin/couchdb ports: - name: couchdb containerPort: 5984 @@ -196,6 +206,19 @@ spec: - name: clouseau image: "{{ .Values.searchImage.repository }}:{{ .Values.searchImage.tag }}" imagePullPolicy: {{ .Values.searchImage.pullPolicy }} + command: + - sh + - -c + - | + echo "$ERLANG_COOKIE" > /opt/couchdb-search/.erlang.cookie + chmod 400 /opt/couchdb-search/.erlang.cookie + exec tini -- java -server -Dsun.net.inetaddr.ttl=30 -Dsun.net.inetaddr.negative.ttl=30 -classpath /opt/couchdb-search/lib/* com.cloudant.ziose.clouseau.Main /opt/couchdb-search/etc/app.conf + env: + - name: ERLANG_COOKIE + valueFrom: + secretKeyRef: + name: {{ .Values.extraSecretName | default (include "couchdb.fullname" .) }} + key: {{ .Values.erlangCookieKey | default "erlangCookie" }} volumeMounts: - name: database-storage mountPath: /opt/couchdb-search/data diff --git a/couchdb/values.yaml b/couchdb/values.yaml index 5f58052..ed700c2 100644 --- a/couchdb/values.yaml +++ b/couchdb/values.yaml @@ -221,7 +221,7 @@ erlangFlags: # Older versions of the official CouchDB image (anything prior to 3.2.1) # do not act on the COUCHDB_ERLANG_COOKIE environment variable, so if you # want to cluster these deployments it's necessary to pass in a cookie here - setcookie: ERLANG_COOKIE_HERE + # setcookie: make-something-up # -- couchdbConfig will override default CouchDB configuration settings. # The contents of this map are reformatted into a .ini file laid down
