<p>I am using PostgreSQL helm chart and facing an issue while adding an init.sql script in the <code>/charts/postgresql/files/docker-entrypoint-initdb.d</code> and running <code>helm install</code> 
and I am getting the following issue - </p>

<pre class="lang-none prettyprint-override"><code>Error: YAML parse error on iriusrisk/charts/postgresql/templates/._metrics-configmap.yaml: error converting YAML to JSON: yaml: control characters are not allowed
</code></pre>

<p>I believe it has more to do with some issue introduced by Mac I am currently using MacOS Mojave Version - 10.14.6</p>

<p>I have uploaded the files here <a href="https://github.com/prav10194/helm-chart" rel="nofollow noreferrer">https://github.com/prav10194/helm-chart</a> and the <a href="https://github.com/prav10194/helm-chart/blob/master/charts/postgresql-8.6.16.tgz" rel="nofollow noreferrer">https://github.com/prav10194/helm-chart/blob/master/charts/postgresql-8.6.16.tgz</a> is the one with the sql script and <a href="https://github.com/prav10194/helm-chart/blob/master/charts/postgresql-8.6.12.tgz" rel="nofollow noreferrer">https://github.com/prav10194/helm-chart/blob/master/charts/postgresql-8.6.12.tgz</a> is without the sql script.  </p>

<p>Running it on minikube version: v1.6.2</p>

<p>Helm version:</p>

<pre class="lang-none prettyprint-override"><code>version.BuildInfo{Version:"`v3.0.2`", GitCommit:"19e47ee3283ae98139d98460de796c1be1e3975f", GitTreeState:"clean", GoVersion:"go1.13.5"}
</code></pre>

<p>Your error doesn't seem to have much to do with Mac. While it's not informative, it looks like the problem is that Helm can't find the chart version 8.1.16: it doesn't exist in Bitnami repo and the version is not updated in your local <code>Chart.yaml</code>. Here's what I did to replicate it:</p>

<ol>
<li>Cloned the repo.</li>
<li>Changed the version in <code>requirements.yaml</code> from <code>*</code> to <code>8.6.16</code>.</li>
<li>Ran <code>helm install . --generate-name</code></li>
</ol>

<p>Got this error:</p>

<pre><code>Error: YAML parse error on iriusrisk/charts/postgresql/templates/.__helpers.tpl: error converting YAML to JSON: yaml: control characters are not allowed
</code></pre>

<p>If your error has the same origins, here's what you can do to fix it (provided you start from a clean clone of your repo):</p>

<ol>
<li>Delete the archive for <code>8.6.12</code>.</li>
<li>Unpack the archive for <code>8.6.16</code> and delete it as well. You will now have <code>charts/postgresql</code> directory.</li>
<li>Go to <code>charts/postgresql/Chart.yaml</code> and update the version there to <code>8.6.16</code>.</li>
<li>Go to <code>requirements.yaml</code> and change the version to <code>8.6.16</code>. You can also remove/comment the <code>repository</code> line as you're using the local chart.</li>
<li>Delete <code>requirements.lock</code>.</li>
<li>Run <code>helm install . &lt;your name or --generate-name&gt;</code></li>
</ol>

<p>You should now have <code>8.6.16</code> installed in your minikube cluster.</p>

<p>Tested using minikube 1.9.0 on macOS 10.15.4 (19E266) with Helm 3.1.2.</p>
