From d53cba2be93997b8151cdf765270d5a5778a52ea Mon Sep 17 00:00:00 2001 From: praemo-admin <88042363+praemo-admin@users.noreply.github.com> Date: Tue, 17 May 2022 10:12:42 -0400 Subject: [PATCH] [bitnami/mongodb-sharded] Fix bug in arbiter statefulset (#10068) * Bump version Signed-off-by: Rob Potter * Fix arbiter statefulset Add missing `$` to advertised hostname Signed-off-by: Rob Potter * Found additional examples of missing $ Signed-off-by: Rob Potter * Typo: Missing S Signed-off-by: Rob Potter * Correcting extra $ Signed-off-by: Rob Potter * Removing extra spaces Signed-off-by: Rob Potter Co-authored-by: Rob Potter --- .../shard/shard-arbiter-statefulset.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bitnami/mongodb-sharded/templates/shard/shard-arbiter-statefulset.yaml b/bitnami/mongodb-sharded/templates/shard/shard-arbiter-statefulset.yaml index 93075f3f75..58e14e4afd 100644 --- a/bitnami/mongodb-sharded/templates/shard/shard-arbiter-statefulset.yaml +++ b/bitnami/mongodb-sharded/templates/shard/shard-arbiter-statefulset.yaml @@ -27,7 +27,7 @@ spec: labels: {{- include "common.labels.standard" $ | nindent 8 }} app.kubernetes.io/component: shardsvr-arbiter {{- if $.Values.common.podLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.common.podLabels "context" $ ) | nindent 8 }} + {{- include "common.tplvalues.render" ( dict "value" $.Values.common.podLabels "context" $ ) | nindent 8 }} {{- end }} {{- if $.Values.shardsvr.arbiter.podLabels }} {{- include "common.tplvalues.render" ( dict "value" $.Values.shardsvr.arbiter.podLabels "context" $ ) | nindent 8 }} @@ -130,7 +130,7 @@ spec: value: {{ printf "%s-shard-%d" ( include "common.names.fullname" $ ) $i }} {{- if $.Values.common.useHostnames }} - name: MONGODB_ADVERTISED_HOSTNAME - value: {{ printf "$(MONGODB_POD_NAME).%s-headless.%s.svc.%s" (include "common.names.fullname" $) (include "common.names.namespace" $) .Values.clusterDomain }} + value: {{ printf "$(MONGODB_POD_NAME).%s-headless.%s.svc.%s" (include "common.names.fullname" $) (include "common.names.namespace" $) $.Values.clusterDomain }} {{- end }} - name: MONGODB_ENABLE_IPV6 {{- if $.Values.common.mongodbEnableIPv6 }} @@ -146,7 +146,7 @@ spec: {{- end }} {{- if $.Values.auth.enabled }} - name: MONGODB_INITIAL_PRIMARY_ROOT_USER - value: {{ .Values.auth.rootUser | quote }} + value: {{ $.Values.auth.rootUser | quote }} {{- if $.Values.auth.usePasswordFile }} - name: MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD_FILE value: "/bitnami/mongodb/secrets/mongodb-root-password" @@ -208,14 +208,14 @@ spec: livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit $.Values.shardsvr.arbiter.livenessProbe "enabled") "context" $) | nindent 12 }} tcpSocket: port: mongodb - {{- else if $.Value.shardsvr.arbiter.customLivenessProbe }} + {{- else if $.Values.shardsvr.arbiter.customLivenessProbe }} livenessProbe: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.arbiter.customLivenessProbe "context" $) | nindent 12 }} {{- end }} - {{- if .Values.shardsvr.arbiter.readinessProbe.enabled }} + {{- if $.Values.shardsvr.arbiter.readinessProbe.enabled }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit $.Values.shardsvr.arbiter.readinessProbe "enabled") "context" $) | nindent 12 }} tcpSocket: port: mongodb - {{- else if $.Value.shardsvr.arbiter.customReadinessProbe }} + {{- else if $.Values.shardsvr.arbiter.customReadinessProbe }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" $.Values.shardsvr.arbiter.customReadinessProbe "context" $) | nindent 12 }} {{- end }} {{- if $.Values.shardsvr.arbiter.startupProbe.enabled }} @@ -263,7 +263,7 @@ spec: env: {{- if $.Values.auth.enabled }} - name: MONGODB_ROOT_USER - value: {{ .Values.auth.rootUser | quote }} + value: {{ $.Values.auth.rootUser | quote }} {{- if $.Values.auth.usePasswordFile }} - name: MONGODB_ROOT_PASSWORD_FILE value: "/bitnami/mongodb/secrets/mongodb-root-password" @@ -276,8 +276,8 @@ spec: {{- end }} {{- end }} {{- if $.Values.diagnosticMode.enabled }} - command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }} - args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }} + command: {{- include "common.tplvalues.render" (dict "value" $.Values.diagnosticMode.command "context" $) | nindent 12 }} + args: {{- include "common.tplvalues.render" (dict "value" $.Values.diagnosticMode.args "context" $) | nindent 12 }} {{- else }} command: - sh