<#7525 refactor(flyte-binary): consolidate DB conf...
# flyte-github
a
#7525 refactor(flyte-binary): consolidate DB config to runs.database Pull request opened by pingsutw Tracking issue N/A — chart cleanup. Why are the changes needed? The flyte-binary chart configured the database in two places: •
flyte-core-components.runs.database
— what the unified binary actually connects through (
runsconfig.GetConfig().Database
in
manager/cmd/main.go
, registered under the
runs
config section). •
configuration.database
— a separate top-level block that the unified binary does not read. It only fed the
waitForDB
init container, the
002-database.yaml
config file (a top-level
database:
section read only by the standalone `runs`/`cache_service` cmd binaries, never the unified binary), and an optional password Secret. Keeping both invites drift (the two could point at different DBs) and is confusing. This consolidates to a single, flat source of truth:
configuration.database
. Users set the DB in one conventional place, and the chart maps it to
runs.database
— the path the unified binary actually reads — at render time. What changes were proposed in this pull request? •
values.yaml
— removed the
flyte-core-components.runs.database
block.
configuration.database
is now the single DB config (with
maxIdleConnections
,
maxOpenConnections
,
connMaxLifeTime
, and the
postgres
sub-block). •
configmap.yaml
—
002-database.yaml
now renders
configuration.database
under
runs.database
(instead of the old top-level
database:
), so the unified binary reads it at
runsconfig.GetConfig().Database
. The config dir is loaded via
--config /etc/flyte/config.d/*.yaml
, so this file deep-merges with the
runs:
section in
000-core.yaml
and the password in
012-database-secrets.yaml
. The password field is stripped before
toYaml
(
deepCopy
+
unset
) so it is never written to the ConfigMap in plaintext — it is supplied via the Secret instead. •
config-secret.yaml
— the optional DB-password Secret (
012-database-secrets.yaml
) now reads
configuration.database.postgres.password
and renders it as
runs.database.postgres.password
. •
deployment.yaml
— the
waitForDB
init container derives its
pg_isready
target from
configuration.database.postgres
, so it waits on exactly the DB the binary connects to.
configuration.database
remains the single, required DB config. How was this patch tested? •
helm template
renders cleanly both with a values override and with bare chart defaults. • Verified
002-database.yaml
renders
runs.database
and that the password is never present in the ConfigMap (0 plaintext occurrences) while still being carried by
012-database-secrets.yaml
. • Verified the
wait-for-db
init container resolves to the configured
configuration.database
host/port/user. •
helm lint
passes. Labels changed Check all the applicable boxes • I updated the documentation accordingly. • All new and existing tests passed. • All commits are signed-off. flyteorg/flyte