From 41604d793dc92c4d892c3de94fee1682bb8dea19 Mon Sep 17 00:00:00 2001 From: Marc Tuduri Date: Mon, 16 Oct 2023 15:58:53 +0200 Subject: [PATCH 1/3] Make namespace and server optional in discovery nomad --- component/discovery/nomad/nomad.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/component/discovery/nomad/nomad.go b/component/discovery/nomad/nomad.go index 4608928e6545..a5868ab13cb3 100644 --- a/component/discovery/nomad/nomad.go +++ b/component/discovery/nomad/nomad.go @@ -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"` } From be43f4e3f0197ec74cd017934a43c0ddd1a8b924 Mon Sep 17 00:00:00 2001 From: Marc Tuduri Date: Mon, 16 Oct 2023 16:01:41 +0200 Subject: [PATCH 2/3] Update CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b1ab343db61..700ccb3f42d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,8 @@ Main (unreleased) - 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 From d49234fc88190511feca467eb3f47e3f847e8c7d Mon Sep 17 00:00:00 2001 From: Marc Tuduri Date: Mon, 16 Oct 2023 17:00:16 +0200 Subject: [PATCH 3/3] Remove server --- docs/sources/flow/reference/components/discovery.nomad.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/sources/flow/reference/components/discovery.nomad.md b/docs/sources/flow/reference/components/discovery.nomad.md index 6ae878357f7e..4797465ae9fb 100644 --- a/docs/sources/flow/reference/components/discovery.nomad.md +++ b/docs/sources/flow/reference/components/discovery.nomad.md @@ -16,7 +16,6 @@ description: Learn about discovery.nomad ```river discovery.nomad "LABEL" { - server = NOMAD_SERVER } ``` @@ -124,7 +123,6 @@ This example discovers targets from a Nomad server: ```river discovery.nomad "example" { - server = "localhost:8500" } prometheus.scrape "demo" {