From f803af734ef3077913d05512ac0d7fe2d94065c5 Mon Sep 17 00:00:00 2001 From: Will Holley Date: Fri, 5 Jul 2019 08:00:40 +0100 Subject: [PATCH] [incubator/couchdb] fix env vars for db container (#15162) Fixes environment variables not being set correctly for the couchdb container when `.Values.enableSearch` is `false` (the default). The feature toggle for search excluded the search container from the statefulset but did not exclude the associated environment variables. The result of this was a duplicate `env` field for the `couchdb` container which would override the correct `env` field; for example, `ERL_FLAGS` would not be passed to the container. This comment fixes the scoping of the `.Values.enableSearch` feature toggle to include the `env` fields for the `clouseau` container. Signed-off-by: Will Holley --- incubator/couchdb/Chart.yaml | 2 +- incubator/couchdb/templates/statefulset.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/incubator/couchdb/Chart.yaml b/incubator/couchdb/Chart.yaml index 7187e23ef0..a289c9994b 100644 --- a/incubator/couchdb/Chart.yaml +++ b/incubator/couchdb/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: couchdb -version: 1.2.1 +version: 1.2.2 appVersion: 2.3.1 description: A database featuring seamless multi-master sync, that scales from big data to mobile, with an intuitive HTTP/JSON API and designed for diff --git a/incubator/couchdb/templates/statefulset.yaml b/incubator/couchdb/templates/statefulset.yaml index ba93764775..99fd5cddea 100644 --- a/incubator/couchdb/templates/statefulset.yaml +++ b/incubator/couchdb/templates/statefulset.yaml @@ -98,11 +98,6 @@ spec: - name: couchdb-statefulset-assembler image: "{{ .Values.helperImage.repository }}:{{ .Values.helperImage.tag }}" imagePullPolicy: {{ .Values.helperImage.pullPolicy }} -{{- if .Values.enableSearch }} - - name: clouseau - image: "{{ .Values.searchImage.repository }}:{{ .Values.searchImage.tag }}" - imagePullPolicy: {{ .Values.searchImage.pullPolicy }} -{{- end }} {{- if not .Values.allowAdminParty }} env: - name: COUCHDB_USER @@ -116,6 +111,11 @@ spec: name: {{ template "couchdb.fullname" . }} key: adminPassword {{- end }} +{{- if .Values.enableSearch }} + - name: clouseau + image: "{{ .Values.searchImage.repository }}:{{ .Values.searchImage.tag }}" + imagePullPolicy: {{ .Values.searchImage.pullPolicy }} +{{- end }} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 8 }}