Skip to content

Add --datasource.* CLI flags to replace DATA_SOURCE_* env vars #1372

Description

@nicolastakashi

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    goPull requests that update go codehelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions