Deprecate environment variable configuration in favor of CLI flags
Débutant
help wantedgo
3 597 ★
Poids du clone léger
Mise à jour
Description
**Summary**
`postgres_exporter` supports env-var configuration in two ways. We want to move fully to CLI flags, deprecate the env vars, and remove them after 2 releases.
**Current state**
1. Flags with an `Envar()` fallback, settable via flag or env var. Kingpin doesn't record which one was used: `PG_EXPORTER_WEB_TELEMETRY_PATH`, `PG_EXPORTER_DISABLE_DEFAULT_METRICS`, `PG_EXPORTER_AUTO_DISCOVER_DATABASES`, `PG_EXPORTER_EXTEND_QUERY_PATH`, `PG_EXPORTER_CONSTANT_LABELS`, `PG_EXPORTER_EXCLUDE_DATABASES`, `PG_EXPORTER_INCLUDE_DATABASES`, `PG_EXPORTER_METRIC_PREFIX`, `PG_EXPORTER_COLLECTION_TIMEOUT`. Each already has a matching CLI flag (several already marked DEPRECATED for other reasons).
2. Env-var-only settings with no CLI flag (`exporter/datasource.go:GetDataSources()`): `DATA_SOURCE_NAME`, `DATA_SOURCE_USER(_FILE)`, `DATA_SOURCE_PASS(_FILE)`, `DATA_SOURCE_URI(_FILE)`. This is the Postgres connection config, and there's no flag today for setting it.
3. The `prometheus-community/helm-charts` postgres-exporter chart sets `DATA_SOURCE_NAME`, `DATA_SOURCE_URI(_FILE)`, `DATA_SOURCE_USER(_FILE)`, and `DATA_SOURCE_PASS(_FILE)` directly as container env vars in `templates/deployment.yaml`, confirmed against the chart's current `main` branch. It has no equivalent flag-based path and will need updating in that separate repo.
Issues similaires
Tout voir
Go
Débutant
v0.8.0 starts a cluster-scoped Secret informer despite namespace-scoped Secret RBAC
## Description While testing Fence Agents Remediation (FAR) v0.8.0, I observed the manager repeatedly attemp…
Mise à jour
Go
Débutant
Check that an issuer's home_domain round-trips to the same stellar.toml
Written to the standard set by #33 — read that issue first for the expected level of detail and the acceptanc…
Mise à jour
Go
Débutant
Report auth_immutable: whether an issuer's flags can still change
> **This issue is the reference standard.** Every other check issue links back here for the expected level of…
Mise à jour