From 35f77c358ab38e3aea2671edd9052d2763cef22f Mon Sep 17 00:00:00 2001 From: Karoline Pauls Date: Thu, 27 Jun 2019 22:15:36 +0100 Subject: [PATCH] [stable/rabbitmq] fix sed invocation to handle special characters Tested with '/\/\--||?+*': $ kubectl create secret generic rabbitmq-secret --from-literal=rabbitmq-password='/\/\--||?+*' ... $ helm install --name my-release stable/rabbitmq --set rabbitmq.existingPasswordSecret=rabbitmq-secret --set persistence.storageClass=standard ... $ kubectl exec my-release-rabbitmq-0 -ti -- grep default_pass /opt/bitnami/rabbitmq/etc/rabbitmq/rabbitmq.conf default_pass=/\/\--||?+* Resolves #15069. Signed-off-by: Karoline Pauls --- stable/rabbitmq/Chart.yaml | 2 +- stable/rabbitmq/templates/statefulset.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stable/rabbitmq/Chart.yaml b/stable/rabbitmq/Chart.yaml index 8633a529b715..6b1e091ce46a 100644 --- a/stable/rabbitmq/Chart.yaml +++ b/stable/rabbitmq/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: rabbitmq -version: 6.1.2 +version: 6.1.3 appVersion: 3.7.15 description: Open source message broker software that implements the Advanced Message Queuing Protocol (AMQP) keywords: diff --git a/stable/rabbitmq/templates/statefulset.yaml b/stable/rabbitmq/templates/statefulset.yaml index 2940d11115e1..5724297cfdc8 100644 --- a/stable/rabbitmq/templates/statefulset.yaml +++ b/stable/rabbitmq/templates/statefulset.yaml @@ -93,7 +93,7 @@ spec: ulimit -n "${RABBITMQ_ULIMIT_NOFILES}" {{- end }} #replace the default password that is generated - sed -i "s|CHANGEME|$RABBITMQ_PASSWORD|g" /opt/bitnami/rabbitmq/etc/rabbitmq/rabbitmq.conf + sed -i "/CHANGEME/cdefault_pass=${RABBITMQ_PASSWORD//\\/\\\\}" /opt/bitnami/rabbitmq/etc/rabbitmq/rabbitmq.conf #api check for probes cat > /opt/bitnami/rabbitmq/sbin/rabbitmq-api-check <