Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agent configuration databind variables support #251

Merged
merged 17 commits into from
Dec 11, 2020
Merged

Conversation

varas
Copy link
Contributor

@varas varas commented Nov 25, 2020

This PR adds secrets management support for the infrastructure agent configuration file.

Therefore same variables section as the one defined for integrations is available.

IE:

variables:
  creds:
    vault:
      http:
        url: http://my.vault.host/v1/newengine/data/secret
        headers:
          X-Vault-Token: my-vault-token

proxy: https://${creds.user}:${creds.password}@myproxy.url

This also removes AgentMode type, as databind is not handling this well.

@varas varas added the wip label Nov 25, 2020
@varas varas requested a review from a team November 25, 2020 15:59
@varas varas changed the title feat databind cfg Agent configuration databind variables support Nov 25, 2020
@coveralls
Copy link

coveralls commented Nov 25, 2020

Pull Request Test Coverage Report for Build 415587773

  • 41 of 74 (55.41%) changed or added relevant lines in 8 files are covered.
  • 5 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.04%) to 58.076%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/plugins/linux/hostinfo.go 0 1 0.0%
pkg/integrations/legacy/runner.go 0 1 0.0%
pkg/databind/pkg/databind/binder.go 0 3 0.0%
pkg/databind/pkg/databind/config.go 17 24 70.83%
pkg/databind/pkg/databind/replacer.go 4 11 36.36%
pkg/config/config.go 16 30 53.33%
Files with Coverage Reduction New Missed Lines %
pkg/config/config.go 1 70.71%
pkg/integrations/v4/logs/cfg_watcher.go 4 67.5%
Totals Coverage Status
Change from base Build 415536125: -0.04%
Covered Lines: 11362
Relevant Lines: 19564

💛 - Coveralls

@varas varas removed the wip label Dec 4, 2020
@josemore josemore linked an issue Dec 9, 2020 that may be closed by this pull request
Copy link
Contributor

@carlosroman carlosroman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice changes. Will add a note somewhere about decoupling the databind providers.

@varas varas merged commit 1ad558d into master Dec 11, 2020
@varas varas deleted the feat_databind-cfg branch December 11, 2020 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Agent config “variables” section
4 participants