Open brandan-schmitz opened 2 years ago
Alternatively remove the logic for the databases and subcharts to fall in line with #1572 and simply have a section called externalDatabase and have it default to not being enabled which would use sqlite in the settings which firefly-iii supports by default:
externalDatabase:
# Enabled or disable the connection to an external database server.
# If disabled firefly-iii will use the built in sqlite database.
enabled: true
# Set the database server type. Supported types are mysql and pgsql. sqlite is not supported as that is local to the system.
# This maps to the DB_CONNECTION field
databaseType: mysql
username: firefly
password: firefly
database: firefly
host: externaldatabase.com
port: 3306
If the user disables the external database, it should be noted that they should enable persistence for the built in sqlite database located at /var/www/html/storage/database/database.sqlite
:
# -- Configure persistence settings for the chart under this key.
# @default -- See values.yaml
persistence:
config:
enabled: false
database:
# -- Enable persistence for the built in sqlite database. This is only necessary
# if not using an external database configured in the externalDatabase section.
enabled: false
mountPath: "/var/www/html/storage/database"
accessMode: ReadWriteOnce
size: 8Gi
retain: true
uploads:
# -- Enable persistence for uploading attachments for transactions
enabled: false
mountPath: "/var/www/html/storage/upload"
accessMode: ReadWriteOnce
size: 1Gi
retain: true
Helm chart name
firefly-iii
Helm chart version
0.1.0
Container name
firefly-iii/core
Container tag
version-5.7.9
Description
When configuring this chart and applying the DB_CONNECTION, DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, and DB_PASSWORD variables, they are overridden by the settings for MariaDB and PostgreSQL. This makes this chart unusable when using an external database already configured as if both the options for using the sub-charts for MariaDB and PostgreSQL are disabled then it overwrites any of the DB related variables with per-configured items in the template.
Expected result
If you specified database configuration values and do not enable either of the sub-charts for the different database engines then it should use the values you specified in the configuration and not overwrite them.
Helm values to reproduce
Additional Information
A suggestion for this would be to move all database settings into one section. If mariadb is enabled then externalDatabase and postgresql values would be ignored, likewise for the other two. I imagine this new section would look something like this:
Repo link
No response