Add a new registry config for specifying the primary database host used for running migration
Context
In Enable service discovery for schema migrations ... (#1006 - closed) we noticed the registry could resolve the fqdn of the primary postgres server naturally and we did not need service discovery
We should introduce a new configuration parameter that allows us to specify the host (fqdn/IP) of the primary postgres server. This parameter when specified will be the target to be used for running schema migrations.
Proposed new config
database:
primary: my.primary.postgres.server
Implementation
- Add the new config field to the registry config setup. if the new config field is populated use it to run migrations
- Add the new config to the registry k8s charts https://gitlab.com/gitlab-org/charts/gitlab/-/blob/master/charts/registry/templates/_database.tpl?ref_type=heads
Edited by Suleimi Ahmed