Im new to helm. While installing a helm chart I had to update its dependency, post which Im unable to install the helm chart.
These are the steps that I have followed:
helm pull codecentric/keycloak --version 18.1.1 --untar
name: postgresql
is changed to name: postgresql-ha
and 10.3.13
changed to version: 9.1.0
rm -R charts/postgresql
helm dependency update keycloak
$helm install keycloak ./keycloak -n identity
Error: INSTALLATION FAILED: template: keycloak/templates/statefulset.yaml:59:48: executing "keycloak/templates/statefulset.yaml" at <include "keycloak.postgresql.fullname" .>: error calling include: template: keycloak/templates/_helpers.tpl:68:3: executing "keycloak.postgresql.fullname" at <include "postgresql.primary.fullname" $postgresContext>: error calling include: template: no template "postgresql.primary.fullname" associated with template "gotpl"
I see that its tried to get value from _helpers.tpl file, so I have tried to update the file for words having postgresql
to postgresql-ha
this has not solved the issue.
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.
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.
How this is done is explained in the docs of the keycloak chart (https://github.com/codecentric/helm-charts/tree/master/charts/keycloak#using-an-external-database).