Skip to content

Commit

Permalink
Make namespace and server optional in discovery nomad (#5488)
Browse files Browse the repository at this point in the history
  • Loading branch information
marctc authored Oct 16, 2023
1 parent a871c34 commit d84fe30
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ v0.37.2 (2023-10-16)
- Fix an issue with the static to flow converter for blackbox exporter modules
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
4 changes: 2 additions & 2 deletions component/discovery/nomad/nomad.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ func init() {
type Arguments struct {
AllowStale bool `river:"allow_stale,attr,optional"`
HTTPClientConfig config.HTTPClientConfig `river:",squash"`
Namespace string `river:"namespace,attr"`
Namespace string `river:"namespace,attr,optional"`
RefreshInterval time.Duration `river:"refresh_interval,attr,optional"`
Region string `river:"region,attr,optional"`
Server string `river:"server,attr"`
Server string `river:"server,attr,optional"`
TagSeparator string `river:"tag_separator,attr,optional"`
}

Expand Down
2 changes: 0 additions & 2 deletions docs/sources/flow/reference/components/discovery.nomad.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ description: Learn about discovery.nomad

```river
discovery.nomad "LABEL" {
server = NOMAD_SERVER
}
```

Expand Down Expand Up @@ -124,7 +123,6 @@ This example discovers targets from a Nomad server:

```river
discovery.nomad "example" {
server = "localhost:8500"
}
prometheus.scrape "demo" {
Expand Down

0 comments on commit d84fe30

Please sign in to comment.