Part of #1371.
Summary
GetDataSources() in exporter/datasource.go currently reads the Postgres connection config only from env vars, with no CLI flag path. Add flags that provide the same configuration options, so the env vars have something to deprecate in favor of.
New flags
--datasource.dsn (replaces DATA_SOURCE_NAME)
--datasource.uri (replaces DATA_SOURCE_URI)
--datasource.uri-file (replaces DATA_SOURCE_URI_FILE)
--datasource.user (replaces DATA_SOURCE_USER)
--datasource.user-file (replaces DATA_SOURCE_USER_FILE)
--datasource.pass (replaces DATA_SOURCE_PASS)
--datasource.pass-file (replaces DATA_SOURCE_PASS_FILE)
Part of #1371.
Summary
GetDataSources()inexporter/datasource.gocurrently reads the Postgres connection config only from env vars, with no CLI flag path. Add flags that provide the same configuration options, so the env vars have something to deprecate in favor of.New flags
--datasource.dsn(replacesDATA_SOURCE_NAME)--datasource.uri(replacesDATA_SOURCE_URI)--datasource.uri-file(replacesDATA_SOURCE_URI_FILE)--datasource.user(replacesDATA_SOURCE_USER)--datasource.user-file(replacesDATA_SOURCE_USER_FILE)--datasource.pass(replacesDATA_SOURCE_PASS)--datasource.pass-file(replacesDATA_SOURCE_PASS_FILE)