Closed FredericLespez closed 1 year ago
Hoi @FredericLespez, thanks for all the info you've provided. It looks like your issue is that you need to update the following externalDatabse.enabled
setting to true
and then fill in your db info. Here's my values.yaml
as an example:
internalDatabase:
# this must be set to false
enabled: false
# External database configuration
externalDatabase:
# this must be set to true
enabled: true
## Supported database engines: mysql or postgresql
type: postgresql
host: localhost:5432
# Database name
database: nextcloud
## Use a existing secret for credentials
existingSecret:
enabled: true
secretName: nextcloud-pgsql-credentials
usernameKey: username
passwordKey: nextcloudPassword
# Uses: https://github.com/bitnami/charts/tree/master/bitnami/postgresql
postgresql:
enabled: true
global:
postgresql:
auth:
username: nextcloud
database: nextcloud
existingSecret: nextcloud-pgsql-credentials
secretKeys:
userPasswordKey: nextcloudPassword
adminPasswordKey: postgresPassword
It may be worth a PR to update the documentation in the README, and then maybe we should consider refactoring this warning a bit in the future so that if internalDatabase.enabled
is set to false
, we perhaps display a warning about not being provided the external database settings. We could also default check the postgresql
or maridb
yaml setting for the info we need, but that could get messy if a user was testing one or the other, as there's a few different raise conditions there. Happy to chat more about it and review any PRs you want to submit, otherwise I'll at least try to make some time to fix the docs on this at a later time. Just let me know if you want to move forward on it, so I don't step on your toes :)
We've recently added clarification to the documentation here: https://github.com/nextcloud/helm/tree/main/charts/nextcloud#database-configurations
I'll close this now, but if you have further issues, let us know by opening a new issue after updating your externalDatabase
parameters. (you don't have to use our bundled postgres or mariadb charts, but you do need to fill in externalDatabase
)
I deployed a Nextcloud instance with a PostgreSQL database. The deployment went fine and Nextcloud is working correctly. The PostgreSQL database is working fine and Nextcloud use it. But the helm command displayed this warning:
This warning is misleading since the instance is not running with the integrated sqlite database.
How to reproduce:
internalDatabase.enabled
to false andpostgresql.enabled
to truevalues.yaml
fileFor better performance etc. you have to configure nextcloud with a resolvable database host. To configure nextcloud to use and external database host:
Complete your nextcloud deployment by running:
export APP_HOST=127.0.0.1 export APP_PASSWORD=$(kubectl get secret --namespace test nextcloud -o jsonpath="{.data.nextcloud-password}" | base64 --decode)
PLEASE UPDATE THE EXTERNAL DATABASE CONNECTION PARAMETERS IN THE FOLLOWING COMMAND AS NEEDED
helm upgrade nextcloud nextcloud/nextcloud \ --set nextcloud.password=$APP_PASSWORD,nextcloud.host=$APP_HOST,service.type=ClusterIP,mariadb.enabled=false,externalDatabase.user=nextcloud,externalDatabase.database=nextcloud,externalDatabase.host=YOUR_EXTERNAL_DATABASE_HOST
What was expected:
In any case not warning about "Running Nextcloud with the integrated sqlite database is not recommended for production instances" since Nextcloud is not using the integrated sqlite database. Maybe a warning about not using an external database...
Full configuration and tests
values.yaml
Nextcloud config.php
Nextcloud database in PostgreSQL container