<p>When I deploy the Bitnami PostgreSQL Helm Chart (chart version 10.9.4, appVersion: 11.13.0), the passwords for any user are not updated or changed after the first installation.</p>
<p>Lets say that for the first installation I use this command:</p>
<pre><code>helm install postgresql --set postgresqlUsername=rpuser  --set postgresqlPassword=rppass --set 
postgresqlDatabase=reportportal --set postgresqlPostgresPassword=password2 -f 
./reportportal/postgresql/values.yaml ./charts/postgresql
</code></pre>
<p>Deleting the Helm release also deletes the stateful set. After that, If I try to install PostgreSQL the same way but with different password values, these won't be updated and will keep the previous ones from the first installation.</p>
<p>Is there something I'm missing regarding where the users' passwords are stored? Do I have to remove the PV and PVC, or do they have nothing to do with this? (I know I can change the passwords using psql commands, but I'm failing to understand why this happens)</p>

<p>The database password and all of the other database data is stored in the Kubernetes PersistentVolume.  Helm won't delete the PersistentVolumeClaim by default, so even if you <code>helm uninstall &amp;&amp; helm install</code> the chart, it will still use the old database data and the old login credentials.</p>
<p><a href="https://docs.helm.sh/docs/helm/helm_uninstall/" rel="nofollow noreferrer"><code>helm uninstall</code></a> doesn't have an option to delete the PVC.  This matches the standard behavior of a Kubernetes StatefulSet (there is an <a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention" rel="nofollow noreferrer">alpha option to automatically delete the PVC</a> but it needs to be enabled at the cluster level and also requires modifying the StatefulSet object).  When you uninstall the chart, you also need to manually delete the PVC:</p>
<pre class="lang-bash prettyprint-override"><code>helm uninstall postgresql
kubectl delete pvc postgresql-primary-data-0
helm install postgresql ... ./charts/postgresql
</code></pre>
