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

Merged
mmuenster merged 2 commits from master into master 2020-09-18 03:21:31 +00:00
mmuenster commented 2020-09-17 16:12:48 +00:00 (Migrated from gitea.com)

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).
lunny (Migrated from gitea.com) approved these changes 2020-09-18 02:39:17 +00:00
techknowlogick (Migrated from gitea.com) approved these changes 2020-09-18 03:21:21 +00:00
Sign in to join this conversation.
No description provided.