Skip to content

Commit

Permalink
[stable/rabbitmq] fix sed invocation to handle special characters
Browse files Browse the repository at this point in the history
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 helm#15069.
  • Loading branch information
karolinepauls committed Jun 27, 2019
1 parent 458d8b9 commit 901a370
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stable/rabbitmq/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF
#!/bin/sh
Expand Down

0 comments on commit 901a370

Please sign in to comment.