Skip to content

Commit

Permalink
remote.vault: respect value of namespace argument (#5582)
Browse files Browse the repository at this point in the history
Unfortunately, this setting can't be easily tested because Vault
namespaces are an enterprise-only feature.

Co-authored-by: Paschalis Tsilias <[email protected]>
  • Loading branch information
rfratto and tpaschalis authored Oct 25, 2023
1 parent 96ea88d commit c0a52bc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
10 changes: 6 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Main (unreleased)

### Features

- Added a new `stage.decolorize` stage to `loki.process` component which
- Added a new `stage.decolorize` stage to `loki.process` component which
allows to strip ANSI color codes from the log lines. (@thampiotr)

- Added a new `stage.sampling` stage to `loki.process` component which
Expand All @@ -45,7 +45,7 @@ Main (unreleased)

### Bugfixes

- Fixed an issue where `loki.process` validation for stage `metric.counter` was
- Fixed an issue where `loki.process` validation for stage `metric.counter` was
allowing invalid combination of configuration options. (@thampiotr)

- Fixed issue where adding a module after initial start, that failed to load then subsequently resolving the issue would cause the module to
Expand All @@ -60,9 +60,11 @@ Main (unreleased)

- Fixed an issue where native histogram time series were being dropped silently. (@krajorama)

- Fix an issue with static mode and `promtail` converters, where static targets
- Fix an issue with static mode and `promtail` converters, where static targets
did not correctly default to `localhost` when not provided. (@thampiotr)

- Fix an issue where `remote.vault` ignored the `namespace` argument. (@rfratto)

- Fix validation issue with ServiceMonitors when scrape timeout is greater than interval. (@captncraig)

- Static mode's spanmetrics processor will now prune histograms when the dimension cache is pruned.
Expand Down Expand Up @@ -98,7 +100,7 @@ v0.37.2 (2023-10-16)
config not being included in the river output. (@erikbaranowski)

- Fix issue with default values in `discovery.nomad`. (@marctc)

### Enhancements

- Update Prometheus dependency to v2.47.2. (@tpaschalis)
Expand Down
10 changes: 9 additions & 1 deletion component/remote/vault/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,15 @@ func (a *Arguments) client() (*vault.Client, error) {
cfg.MaxRetries = a.ClientOptions.MaxRetries
cfg.Timeout = a.ClientOptions.Timeout

return vault.NewClient(cfg)
cli, err := vault.NewClient(cfg)
if err != nil {
return cli, err
}

if a.Namespace != "" {
cli.SetNamespace(a.Namespace)
}
return cli, nil
}

// SetToDefault implements river.Defaulter.
Expand Down

0 comments on commit c0a52bc

Please sign in to comment.