Expose PostgreSQL load balancing options as global chart values
Summary
I'm using GitLab in Amazon EKS with an RDS Aurora PostgreSQL cluster for the database. While GitLab supports hot-standby load balancing (https://docs.gitlab.com/ee/administration/database_load_balancing.html), there is no way to configure it as part of the Helm charts.
Current behavior
globals.psql allows only a single host to be provided.
Expected behavior
globals.psql to have a loadbalancing section that allows multiple hosts to be specified.
Versions
- Chart: 1.3.0
- Platform:
- Cloud: EKS
- Kubernetes: (
kubectl version
)- Client: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"clean", BuildDate:"2018-05-21T09:17:39Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"windows/amd64"}
- Server: version.Info{Major:"1", Minor:"10+", GitVersion:"v1.10.11-eks", GitCommit:"6bf27214b7e3e1e47dce27dcbd73ee1b27adadd0", GitTreeState:"clean", BuildDate:"2018-12-04T13:33:10Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
- Helm: (
helm version
)- Client: &version.Version{SemVer:"v2.11.0", GitCommit:"2e55dbe1fdb5fdb96b75ff144a339489417b146b", GitTreeState:"clean"}
- Server: &version.Version{SemVer:"v2.11.0", GitCommit:"2e55dbe1fdb5fdb96b75ff144a339489417b146b", GitTreeState:"clean"}
Changes necessary
Per documentation of configuration:
- Support configuration of
global.psql.loadbalancing.(hosts|discover)
through properties and templates intodatabase.yml
. - When using database load balancing, there is no supplied host or port. We need to ensure our charts can operate as such, when
psql.loadbalancing
is present / populated. This includes anyfail
orcheckConfig
patterns. -
☝ Interesting note, is that these don't seem to indicate a password🤔 - Logging of db load balancing is performed to yet another log file, in
database_load_balancing.log
. This must be added to
Documentation should be added or linked on how to setup the necessary environment for both "host based" load balancing, as well as "service discovery" based configurations. This may be most concisely done via gitlab-org/gitlab-orchestrator
-
Add configuration properties and templating for global.psql.loadbalancing
-
Ensure that database_load_balancing.log
is added to varioustail
lists in CNG -
Add checkConfig to ensure that either host
orloadbalancing.*
is provided, whenpostgresql.install: false
-
Add matching configuration properties and implementation for GeoMoved to #2164 -
Document setting up a test environment, possibly add to docs/advanced
Edited by Jason Plum