Add example database config for main and ci
What does this MR do?
This MR will add main
and ci
sections to values.yml. This way, we make it explicit that we use two configurations for the database.
I also added an explanation that global.psql
values are used as defaults for main
and ci
. The linked issue was suggesting to move all settings to both main
and ci
. But currently, we also need global.psql
configuration.
Example:
helm template . \
--set certmanager-issuer.email=test@example.com \
--set registry.database.enabled=true \
--show-only charts/gitlab/charts/webservice/templates/configmap.yml | yq '.data."database.yml.erb"'
The resulting database.yml
file will be the same as we now have on master
branch:
production:
main:
adapter: postgresql
encoding: unicode
database: gitlabhq_production
username: gitlab
password: <%= File.read('/etc/gitlab/postgres/psql-password-main').strip.to_json %>
host: "release-name-postgresql.default.svc"
port: 5432
connect_timeout:
keepalives:
keepalives_idle:
keepalives_interval:
keepalives_count:
tcp_user_timeout:
application_name:
prepared_statements: false
database_tasks: true
ci:
adapter: postgresql
encoding: unicode
database: gitlabhq_production
username: gitlab
password: <%= File.read('/etc/gitlab/postgres/psql-password-ci').strip.to_json %>
host: "release-name-postgresql.default.svc"
port: 5432
connect_timeout:
keepalives:
keepalives_idle:
keepalives_interval:
keepalives_count:
tcp_user_timeout:
application_name:
prepared_statements: false
database_tasks: false
Related issues
Author checklist
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion.
Required
-
Merge Request Title and Description are up to date, accurate, and descriptive -
MR targeting the appropriate branch -
MR has a green pipeline on GitLab.com -
When ready for review, follow the instructions in the "Reviewer Roulette" section of the Danger Bot MR comment, as per the Distribution experimental MR workflow
Expected (please provide an explanation if not completing)
-
Test plan indicating conditions for success has been posted and passes -
Documentation created/updated -
Tests added/updated - The generated templates are not changed due to this MR.
-
Integration tests added to GitLab QA - The generated templates are not changed due to this MR.
-
Equivalent MR/issue for omnibus-gitlab opened -
Equivalent MR/issue for Gitlab Operator project opened (see Operator documentation on impact of Charts changes) - No impact expected: the generated templates are not changed due to this MR.
-
Validate potential values for new configuration settings. Formats such as integer 10
, duration10s
, URIscheme://user:passwd@host:port
may require quotation or other special handling when rendered in a template and written to a configuration file.- No new values
Closes #4664 (closed)
Edited by Jason Plum