Skip to content

Commit c5de88f

Browse files
author
Ivan Valkov
authored
Changed the file SD flags names (thanos-io#583)
* pr comments * make docs
1 parent 08f6ded commit c5de88f

File tree

5 files changed

+13
-15
lines changed

5 files changed

+13
-15
lines changed

cmd/thanos/query.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ func registerQuery(m map[string]setupFunc, app *kingpin.Application, name string
6868
stores := cmd.Flag("store", "Addresses of statically configured store API servers (repeatable).").
6969
PlaceHolder("<store>").Strings()
7070

71-
fileSDFiles := cmd.Flag("store.file-sd-config.files", "Path to files that contain addresses of store API servers. The path can be a glob pattern (repeatable).").
71+
fileSDFiles := cmd.Flag("store.sd-files", "Path to files that contain addresses of store API servers. The path can be a glob pattern (repeatable).").
7272
PlaceHolder("<path>").Strings()
7373

74-
fileSDInterval := modelDuration(cmd.Flag("store.file-sd-config.interval", "Refresh interval to re-read file SD files. (used as a fallback)").
74+
fileSDInterval := modelDuration(cmd.Flag("store.sd-interval", "Refresh interval to re-read file SD files. It is used as a resync fallback.").
7575
Default("5m"))
7676

7777
enableAutodownsampling := cmd.Flag("query.auto-downsampling", "Enable automatic adjustment (step / 5) to what source of data should be used in store gateways if no max_source_resolution param is specified. ").

cmd/thanos/rule.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ func registerRule(m map[string]setupFunc, app *kingpin.Application, name string)
8181
queries := cmd.Flag("query", "Addresses of statically configured query API servers (repeatable).").
8282
PlaceHolder("<query>").Strings()
8383

84-
fileSDFiles := cmd.Flag("query.file-sd-config.files", "Path to file that contain addresses of query peers. The path can be a glob pattern (repeatable).").
84+
fileSDFiles := cmd.Flag("query.sd-files", "Path to file that contain addresses of query peers. The path can be a glob pattern (repeatable).").
8585
PlaceHolder("<path>").Strings()
8686

87-
fileSDInterval := modelDuration(cmd.Flag("query.file-sd-config.interval", "Refresh interval to re-read file SD files. (used as a fallback)").
87+
fileSDInterval := modelDuration(cmd.Flag("query.sd-interval", "Refresh interval to re-read file SD files. (used as a fallback)").
8888
Default("5m"))
8989

9090
m[name] = func(g *run.Group, logger log.Logger, reg *prometheus.Registry, tracer opentracing.Tracer, _ bool) error {

docs/components/query.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,12 @@ Flags:
129129
info endpoint (repeated).
130130
--store=<store> ... Addresses of statically configured store API
131131
servers (repeatable).
132-
--store.file-sd-config.files=<path> ...
132+
--store.sd-files=<path> ...
133133
Path to files that contain addresses of store
134134
API servers. The path can be a glob pattern
135135
(repeatable).
136-
--store.file-sd-config.interval=5m
137-
Refresh interval to re-read file SD files.
138-
(used as a fallback)
136+
--store.sd-interval=5m Refresh interval to re-read file SD files. It
137+
is used as a resync fallback.
139138
--query.auto-downsampling Enable automatic adjustment (step / 5) to what
140139
source of data should be used in store gateways
141140
if no max_source_resolution param is specified.

docs/components/rule.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,11 @@ Flags:
135135
Object store configuration in YAML.
136136
--query=<query> ... Addresses of statically configured query API
137137
servers (repeatable).
138-
--query.file-sd-config.files=<path> ...
138+
--query.sd-files=<path> ...
139139
Path to file that contain addresses of query
140140
peers. The path can be a glob pattern
141141
(repeatable).
142-
--query.file-sd-config.interval=5m
143-
Refresh interval to re-read file SD files.
142+
--query.sd-interval=5m Refresh interval to re-read file SD files.
144143
(used as a fallback)
145144

146145
```

test/e2e/spinup_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ func querierWithFileSD(i int, replicaLabel string, storesAddresses ...string) cm
152152
}
153153

154154
args := append(defaultQuerierFlags(i, replicaLabel),
155-
"--store.file-sd-config.files", path.Join(queryFileSDDir, "filesd.json"),
156-
"--store.file-sd-config.interval", "5s")
155+
"--store.sd-files", path.Join(queryFileSDDir, "filesd.json"),
156+
"--store.sd-interval", "5s")
157157

158158
return []*exec.Cmd{exec.Command("thanos", args...)}, nil
159159
}
@@ -274,8 +274,8 @@ func rulerWithFileSD(i int, rules string, queryAddresses ...string) (cmdSchedule
274274
}
275275

276276
args := append(defaultRulerFlags(i, dbDir),
277-
"--query.file-sd-config.files", path.Join(ruleFileSDDir, "filesd.json"),
278-
"--query.file-sd-config.interval", "5s")
277+
"--query.sd-files", path.Join(ruleFileSDDir, "filesd.json"),
278+
"--query.sd-interval", "5s")
279279

280280
return []*exec.Cmd{exec.Command("thanos", args...)}, nil
281281
}, ""

0 commit comments

Comments
 (0)