helm icon indicating copy to clipboard operation
helm copied to clipboard

Wrong database name in Nextcloud initContainer

Open GillesMocellin opened this issue 3 years ago • 3 comments

In the deployment template, here: https://github.com/nextcloud/helm/blob/master/charts/nextcloud/templates/deployment.yaml#L274

The commands are using %s-mariadb or %s-postgresql. Why not use the variable ${MYSQL_HOST} and ${POSTGRESQL_HOST} ?

I tried a deployment with a primary/secondary MariaDB cluster, and the host should then be nextcloud-mariadb-primary instead of nextcloud-mariadb.

GillesMocellin avatar Jan 06 '22 16:01 GillesMocellin

Sorry @GillesMocellin , something went wrong and your variable suggestion rendered a bit weird for me: Screenshot 2023-01-27 at 00 54 36

Could you please fix that to be more readable?

As for the host, perhaps I'm misunderstanding, but does this actually break anything? I am not using mariadb at this time, so maybe I'm missing something.

Thanks for your time and patience!

jessebot avatar Jan 26 '23 23:01 jessebot

Sorry, I've edited my post...

GillesMocellin avatar Jan 27 '23 23:01 GillesMocellin

I looked at this again and I see what you mean as this: https://github.com/nextcloud/helm/blob/bf6cc4a9df0b3bffd3915dc940ddbec71976429e/charts/nextcloud/templates/deployment.yaml#L316

Doesn't match this: https://github.com/nextcloud/helm/blob/bf6cc4a9df0b3bffd3915dc940ddbec71976429e/charts/nextcloud/templates/deployment.yaml#L335

In fact, we should probably accommodate also using the externalDatabase.host/externalDatabase.existingSecret here as well: https://github.com/nextcloud/helm/blob/bf6cc4a9df0b3bffd3915dc940ddbec71976429e/charts/nextcloud/templates/deployment.yaml#L330-L331

For the mariaDB init container, we need to add this env var: https://github.com/nextcloud/helm/blob/bf6cc4a9df0b3bffd3915dc940ddbec71976429e/charts/nextcloud/templates/_helpers.tpl#L76-L77

Marking this as "to develop". This might make sense to include in the planned major release for other database related updates in the values.yaml.

jessebot avatar Jul 26 '24 07:07 jessebot