<p>Im new to helm. While installing a helm chart I had to update its dependency, post which Im unable to install the helm chart.</p>
<p>These are the steps that I have followed:</p>
<ol>
<li>Downloaded the helm chart using</li>
</ol>
<pre><code>helm pull codecentric/keycloak --version 18.1.1 --untar
</code></pre>
<ol start="2">
<li>Changed chart.yaml two fields, i.e, <code>name: postgresql</code> is changed to <code>name: postgresql-ha</code> and <code>10.3.13</code> changed to <code>version: 9.1.0</code></li>
<li>Deleted the existing dependency under the charts folder i.e , <code>rm -R charts/postgresql</code></li>
<li>Helm dependency update I have done using : <code>helm dependency update keycloak</code></li>
<li>When I install this updated helm, Im facing the below issue:</li>
</ol>
<pre><code>$helm install keycloak ./keycloak -n identity
Error: INSTALLATION FAILED: template: keycloak/templates/statefulset.yaml:59:48: executing &quot;keycloak/templates/statefulset.yaml&quot; at &lt;include &quot;keycloak.postgresql.fullname&quot; .&gt;: error calling include: template: keycloak/templates/_helpers.tpl:68:3: executing &quot;keycloak.postgresql.fullname&quot; at &lt;include &quot;postgresql.primary.fullname&quot; $postgresContext&gt;: error calling include: template: no template &quot;postgresql.primary.fullname&quot; associated with template &quot;gotpl&quot;
</code></pre>
<p>I see that its tried to get value from _helpers.tpl file, so I have tried to update the file for words having <code>postgresql</code> to <code>postgresql-ha</code> this has not solved the issue.</p>

<p>it seems that the statefulset template in the keycloak chart includes a function from the postgresql chart when its deployment is enabled. since you replaced the postgresql chart with the postgresql-ha chart, the function cannot be included (probably because the function doesn't exist in the postgresql-ha chart) and therefore the installation fails with this error.</p>
<p>I suggest you keep the keycloak chart at its original state, deploy the postgresql-ha chart separately and configure keycloak to use the postgresql-ha deployment instead. This way you don't break the functionality of the keycloak chart but can use the postgresl-ha setup.</p>
<p>How this is done is explained in the docs of the keycloak chart (<a href="https://github.com/codecentric/helm-charts/tree/master/charts/keycloak#using-an-external-database" rel="nofollow noreferrer">https://github.com/codecentric/helm-charts/tree/master/charts/keycloak#using-an-external-database</a>).</p>
