From 896208ea4fd121c7b01be79cefb30c3e3f9cdc08 Mon Sep 17 00:00:00 2001 From: Konstantinos Natsakis <5933427+knatsakis@users.noreply.github.com> Date: Mon, 15 Jun 2020 21:03:33 +0300 Subject: [PATCH] [bitnami/mongodb-sharded] Fix metric collection when using a password file (#2800) * mongodb-sharded: Fix mongodb_exporter metrics when using a password file * mongodb-sharded: Bump chart version --- bitnami/mongodb-sharded/Chart.yaml | 2 +- .../templates/config-server/config-server-statefulset.yaml | 2 +- bitnami/mongodb-sharded/templates/mongos/mongos-deployment.yaml | 2 +- .../templates/shard/shard-arbiter-statefulset.yaml | 2 +- .../mongodb-sharded/templates/shard/shard-data-statefulset.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bitnami/mongodb-sharded/Chart.yaml b/bitnami/mongodb-sharded/Chart.yaml index c96fe4a28..1fc4d5b2b 100644 --- a/bitnami/mongodb-sharded/Chart.yaml +++ b/bitnami/mongodb-sharded/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: mongodb-sharded -version: 1.4.2 +version: 1.4.3 appVersion: 4.2.8 description: NoSQL document-oriented database that stores JSON-like documents with dynamic schemas, simplifying the integration of data in content-driven applications. Sharded topology. keywords: diff --git a/bitnami/mongodb-sharded/templates/config-server/config-server-statefulset.yaml b/bitnami/mongodb-sharded/templates/config-server/config-server-statefulset.yaml index ee78250e6..e6fce460e 100644 --- a/bitnami/mongodb-sharded/templates/config-server/config-server-statefulset.yaml +++ b/bitnami/mongodb-sharded/templates/config-server/config-server-statefulset.yaml @@ -236,7 +236,7 @@ spec: - |- #!/bin/sh {{- if .Values.usePasswordFile }} - export MONGODB_ROOT_PASSWORD="$(< "${MONGODB_ROOT_PASSWORD_FILE}")" + export MONGODB_ROOT_PASSWORD="$(cat "${MONGODB_ROOT_PASSWORD_FILE}")" {{- end }} /bin/mongodb_exporter --mongodb.uri mongodb://root:`echo $MONGODB_ROOT_PASSWORD | sed -r "s/@/%40/g;s/:/%3A/g"`@localhost:{{ .Values.service.port }}/admin {{ .Values.metrics.extraArgs }} {{- if .Values.usePasswordFile }} diff --git a/bitnami/mongodb-sharded/templates/mongos/mongos-deployment.yaml b/bitnami/mongodb-sharded/templates/mongos/mongos-deployment.yaml index 6b19984ef..e461323f5 100644 --- a/bitnami/mongodb-sharded/templates/mongos/mongos-deployment.yaml +++ b/bitnami/mongodb-sharded/templates/mongos/mongos-deployment.yaml @@ -224,7 +224,7 @@ spec: - |- #!/bin/sh {{- if .Values.usePasswordFile }} - export MONGODB_ROOT_PASSWORD="$(< "${MONGODB_ROOT_PASSWORD_FILE}")" + export MONGODB_ROOT_PASSWORD="$(cat "${MONGODB_ROOT_PASSWORD_FILE}")" {{- end }} /bin/mongodb_exporter --mongodb.uri mongodb://root:`echo $MONGODB_ROOT_PASSWORD | sed -r "s/@/%40/g;s/:/%3A/g"`@localhost:{{ .Values.service.port }}/admin {{ .Values.metrics.extraArgs }} {{- if .Values.usePasswordFile }} diff --git a/bitnami/mongodb-sharded/templates/shard/shard-arbiter-statefulset.yaml b/bitnami/mongodb-sharded/templates/shard/shard-arbiter-statefulset.yaml index 40ff12822..782d1e822 100644 --- a/bitnami/mongodb-sharded/templates/shard/shard-arbiter-statefulset.yaml +++ b/bitnami/mongodb-sharded/templates/shard/shard-arbiter-statefulset.yaml @@ -211,7 +211,7 @@ spec: - |- #!/bin/sh {{- if $.Values.usePasswordFile }} - export MONGODB_ROOT_PASSWORD="$(< "${MONGODB_ROOT_PASSWORD_FILE}")" + export MONGODB_ROOT_PASSWORD="$(cat "${MONGODB_ROOT_PASSWORD_FILE}")" {{- end }} /bin/mongodb_exporter --mongodb.uri mongodb://root:`echo $MONGODB_ROOT_PASSWORD | sed -r "s/@/%40/g;s/:/%3A/g"`@localhost:{{ $.Values.service.port }}/admin {{ $.Values.metrics.extraArgs }} {{- if $.Values.usePasswordFile }} diff --git a/bitnami/mongodb-sharded/templates/shard/shard-data-statefulset.yaml b/bitnami/mongodb-sharded/templates/shard/shard-data-statefulset.yaml index 73de981c7..0a21f54b9 100644 --- a/bitnami/mongodb-sharded/templates/shard/shard-data-statefulset.yaml +++ b/bitnami/mongodb-sharded/templates/shard/shard-data-statefulset.yaml @@ -216,7 +216,7 @@ spec: - |- #!/bin/sh {{- if $.Values.usePasswordFile }} - export MONGODB_ROOT_PASSWORD="$(< "${MONGODB_ROOT_PASSWORD_FILE}")" + export MONGODB_ROOT_PASSWORD="$(cat "${MONGODB_ROOT_PASSWORD_FILE}")" {{- end }} /bin/mongodb_exporter --mongodb.uri mongodb://root:`echo $MONGODB_ROOT_PASSWORD | sed -r "s/@/%40/g;s/:/%3A/g"`@localhost:{{ $.Values.service.port }}/admin {{ $.Values.metrics.extraArgs }} {{- if $.Values.usePasswordFile }}