<p>I want to use Helm chart of RabbitMQ to set up a cluster but when I try to pass the configuration files that we have at the moment to the values.yaml it doesn't work.</p>

<p>The command that I use:</p>

<pre><code>helm install --dry-run --debug stable/rabbitmq --name testrmq --namespace rmq -f rabbit-values.yaml
</code></pre>

<p>rabbit-values.yaml:</p>

<pre><code>rabbitmq:
  plugins: "rabbitmq_management rabbitmq_federation rabbitmq_federation_management rabbitmq_shovel rabbitmq_shovel_management rabbitmq_mqtt rabbitmq_web_stomp rabbitmq_peer_discovery_k8s"
  advancedConfiguration: |-
    {{ .Files.Get "rabbitmq.config" | quote}}
</code></pre>

<p>And what I get for <code>advancedConfiguration</code>:</p>

<pre><code>NAME:   testrmq
REVISION: 1
RELEASED: Thu Aug 29 10:09:26 2019
CHART: rabbitmq-5.5.0
USER-SUPPLIED VALUES:
rabbitmq:
  advancedConfiguration: '{{ .Files.Get "rabbitmq.config" | quote}}'
  plugins: rabbitmq_management rabbitmq_federation rabbitmq_federation_management
    rabbitmq_shovel rabbitmq_shovel_management rabbitmq_mqtt rabbitmq_web_stomp rabbitmq_peer_discovery_k8s
</code></pre>

<p>I have to mention that:</p>

<ul>
<li>rabbitmq.config is an Erlang file</li>
<li>I tried different things including indentation (<code>indent 4</code>)</li>
</ul>

<p>You can't use Helm templating in the <code>values.yaml</code> file.  (Unless the chart author has specifically called the <code>tpl</code> function when the value is used; for this variable <a href="https://github.com/helm/charts/blob/master/stable/rabbitmq/templates/configuration.yaml#L21" rel="nofollow noreferrer">it doesn't</a>, and that's usually called out in the chart documentation.)</p>
<p>Your two options are to directly embed the file content in the <code>values.yaml</code> file you're passing in, or to use the</p>
<ul>
<li><a href="https://v2.helm.sh/docs/using_helm/#the-format-and-limitations-of-set" rel="nofollow noreferrer">Helm <code>--set-file</code> option</a> (link to v2 docs)</li>
<li><a href="https://helm.sh/docs/helm/helm_install/" rel="nofollow noreferrer">Helm <code>--set-file</code> option</a> (link to v3 docs).</li>
</ul>
<pre class="lang-bash prettyprint-override"><code>helm install --dry-run --debug \
     stable/rabbitmq \
     --name testrmq \
     --namespace rmq \
     -f rabbit-values.yaml \
     --set-file rabbitmq.advancedConfig=rabbitmq.config
</code></pre>
<p>There isn't a way to put a file pointer inside your local values YAML file though.</p>
