Can't install the chart twice into the same namespace

If you would run the following commands:

helm install --wait nc1 . -f values-local1.yaml
helm install --wait nc2 . -f values-local2.yaml

(assuming you have values-local1 and 2 configured for non-clashing ingresses)

You would run into the issue that the second helm install tries to create a configmap with the name nextcloud-mariadb-initdbscripts, but that name is already taken. The error looks as follows:

Error: INSTALLATION FAILED: rendered manifests contain a resource that already exists. Unable to continue with install: ConfigMap "nextcloud-mariadb-initdbscripts" in namespace "default" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-name" must equal "nc2": current value is "nc1"

This also happens in this job: https://open.greenhost.net/stackspin/nextcloud/-/jobs/206125

Solution: make the name of templates/nextcloud-mariadb-initdbscripts.yaml dependant on the Release name.

Problem: we need to use this name inside values.yaml where we configure the initdbScriptsConfigMap setting of the mariadb chart. We still need to figure out how to do that...

Edited by Maarten de Waard
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information