Prevent custom HOST name from being overwritten in mysql, postgresql, cache #23

Merged
techknowlogick merged 5 commits from mmuenster/helm-chart-mm:master into master 2020-09-18 03:21:31 +00:00
Contributor

This change would allow a user not in a default cluster to use Gitea. The default dns values are set here for postgresql and here for mysql and memcache. Before, these default values overwrote any value set in gitea.config.database/cache.HOST. This PR would use these default values whenever gitea.config.database/cache.HOST is not set, and use the value in gitea.config.database/cache.HOST when it is set.

Similar code can be found here, where the server domain is conditionally set to gitea.default_domain.

This change would allow a user not in a default cluster to use Gitea. The default dns values are set [here](https://gitea.com/gitea/helm-chart/src/branch/master/templates/_helpers.tpl#L55) for postgresql and [here](https://gitea.com/gitea/helm-chart/src/branch/master/templates/_helpers.tpl#L78-L84) for mysql and memcache. Before, these default values overwrote any value set in gitea.config.database/cache.HOST. This PR would use these default values whenever gitea.config.database/cache.HOST is not set, and use the value in gitea.config.database/cache.HOST when it is set. Similar code can be found [here](https://gitea.com/gitea/helm-chart/src/branch/master/templates/gitea/config.yaml#L41), where the server domain is conditionally set to [gitea.default_domain](https://gitea.com/gitea/helm-chart/src/branch/master/templates/_helpers.tpl#L86-L88).
mmuenster added 5 commits 2020-09-17 16:12:50 +00:00
Config map uses "postgresql/mysql.dns" when useDefaultHost is true, and the value from gitea.config.database.HOST when useDefaultHost is false.
Using whether gitea.config.database.HOST exists instead in the values file. If true, don't overwrite. If false, use "mysql/postgresql.dns"
no longer needed
Adding same changes to cache
All checks were successful
continuous-integration/drone/pr Build is passing
6b083a6456
lunny added the
kind
enhancement
label 2020-09-18 02:39:00 +00:00
lunny approved these changes 2020-09-18 02:39:17 +00:00
Dismissed
techknowlogick approved these changes 2020-09-18 03:21:21 +00:00
Dismissed
techknowlogick merged commit c168d47181 into master 2020-09-18 03:21:31 +00:00
Sign in to join this conversation.
No description provided.