diff --git a/cmd/thanos/config.go b/cmd/thanos/config.go index b53da505deb..bcc06faecda 100644 --- a/cmd/thanos/config.go +++ b/cmd/thanos/config.go @@ -56,7 +56,7 @@ func (hc *httpConfig) registerFlag(cmd extkingpin.FlagClause) *httpConfig { "Time to wait after an interrupt received for HTTP Server."). Default("2m").SetValue(&hc.gracePeriod) cmd.Flag( - "http-tls-config", + "http.config", "[EXPERIMENTAL] Path to the configuration file that can enable TLS or authentication for all HTTP endpoints.", ).Default("").StringVar(&hc.tlsConfig) return hc diff --git a/docs/components/compact.md b/docs/components/compact.md index 126c37297a3..ba7c183ac89 100644 --- a/docs/components/compact.md +++ b/docs/components/compact.md @@ -377,7 +377,7 @@ Flags: Listen host:port for HTTP endpoints. --http-grace-period=2m Time to wait after an interrupt received for HTTP Server. - --http-tls-config="" [EXPERIMENTAL] Path to the configuration file + --http.config="" [EXPERIMENTAL] Path to the configuration file that can enable TLS or authentication for all HTTP endpoints. --log.format=logfmt Log format to use. Possible options: logfmt or diff --git a/docs/components/query-frontend.md b/docs/components/query-frontend.md index ede867a9b6d..93fbcc00484 100644 --- a/docs/components/query-frontend.md +++ b/docs/components/query-frontend.md @@ -136,7 +136,7 @@ Flags: Listen host:port for HTTP endpoints. --http-grace-period=2m Time to wait after an interrupt received for HTTP Server. - --http-tls-config="" [EXPERIMENTAL] Path to the configuration file + --http.config="" [EXPERIMENTAL] Path to the configuration file that can enable TLS or authentication for all HTTP endpoints. --labels.default-time-range=24h diff --git a/docs/components/query.md b/docs/components/query.md index 3e70054791b..5144ebaa67f 100644 --- a/docs/components/query.md +++ b/docs/components/query.md @@ -323,7 +323,7 @@ Flags: Listen host:port for HTTP endpoints. --http-grace-period=2m Time to wait after an interrupt received for HTTP Server. - --http-tls-config="" [EXPERIMENTAL] Path to the configuration file + --http.config="" [EXPERIMENTAL] Path to the configuration file that can enable TLS or authentication for all HTTP endpoints. --log.format=logfmt Log format to use. Possible options: logfmt or diff --git a/docs/components/receive.md b/docs/components/receive.md index 4ffe4a4625f..7b1fe505efa 100644 --- a/docs/components/receive.md +++ b/docs/components/receive.md @@ -101,7 +101,7 @@ Flags: Listen host:port for HTTP endpoints. --http-grace-period=2m Time to wait after an interrupt received for HTTP Server. - --http-tls-config="" [EXPERIMENTAL] Path to the configuration file + --http.config="" [EXPERIMENTAL] Path to the configuration file that can enable TLS or authentication for all HTTP endpoints. --label=key="value" ... External labels to announce. This flag will be diff --git a/docs/components/rule.md b/docs/components/rule.md index dae67389f56..cf40e37b7cc 100644 --- a/docs/components/rule.md +++ b/docs/components/rule.md @@ -311,7 +311,7 @@ Flags: Listen host:port for HTTP endpoints. --http-grace-period=2m Time to wait after an interrupt received for HTTP Server. - --http-tls-config="" [EXPERIMENTAL] Path to the configuration file + --http.config="" [EXPERIMENTAL] Path to the configuration file that can enable TLS or authentication for all HTTP endpoints. --label=="" ... diff --git a/docs/components/sidecar.md b/docs/components/sidecar.md index 1379d7f2e26..a33bcfc6dbf 100644 --- a/docs/components/sidecar.md +++ b/docs/components/sidecar.md @@ -108,7 +108,7 @@ Flags: Listen host:port for HTTP endpoints. --http-grace-period=2m Time to wait after an interrupt received for HTTP Server. - --http-tls-config="" [EXPERIMENTAL] Path to the configuration file + --http.config="" [EXPERIMENTAL] Path to the configuration file that can enable TLS or authentication for all HTTP endpoints. --log.format=logfmt Log format to use. Possible options: logfmt or diff --git a/docs/components/store.md b/docs/components/store.md index e71f92c3137..b654cce2e3c 100644 --- a/docs/components/store.md +++ b/docs/components/store.md @@ -75,7 +75,7 @@ Flags: Listen host:port for HTTP endpoints. --http-grace-period=2m Time to wait after an interrupt received for HTTP Server. - --http-tls-config="" [EXPERIMENTAL] Path to the configuration file + --http.config="" [EXPERIMENTAL] Path to the configuration file that can enable TLS or authentication for all HTTP endpoints. --ignore-deletion-marks-delay=24h diff --git a/docs/components/tools.md b/docs/components/tools.md index 4e61a0500e3..2d66d896076 100644 --- a/docs/components/tools.md +++ b/docs/components/tools.md @@ -218,7 +218,7 @@ Flags: Listen host:port for HTTP endpoints. --http-grace-period=2m Time to wait after an interrupt received for HTTP Server. - --http-tls-config="" [EXPERIMENTAL] Path to the configuration file + --http.config="" [EXPERIMENTAL] Path to the configuration file that can enable TLS or authentication for all HTTP endpoints. --label=LABEL Prometheus label to use as timeline title @@ -488,7 +488,7 @@ Flags: Listen host:port for HTTP endpoints. --http-grace-period=2m Time to wait after an interrupt received for HTTP Server. - --http-tls-config="" [EXPERIMENTAL] Path to the configuration file + --http.config="" [EXPERIMENTAL] Path to the configuration file that can enable TLS or authentication for all HTTP endpoints. --id=ID ... Block to be replicated to the destination @@ -595,7 +595,7 @@ Flags: Listen host:port for HTTP endpoints. --http-grace-period=2m Time to wait after an interrupt received for HTTP Server. - --http-tls-config="" [EXPERIMENTAL] Path to the configuration file that + --http.config="" [EXPERIMENTAL] Path to the configuration file that can enable TLS or authentication for all HTTP endpoints. --log.format=logfmt Log format to use. Possible options: logfmt or diff --git a/docs/operating/https.md b/docs/operating/https.md index dfa70d02763..74b1dbac927 100644 --- a/docs/operating/https.md +++ b/docs/operating/https.md @@ -8,7 +8,7 @@ menu: operating Thanos supports basic authentication and TLS. This is **experimental** and might change in the future. -To specify which HTTP TLS configuration file to load, use the `--http-tls-config` flag. +To specify which HTTP TLS configuration file to load, use the `--http.config` flag. The file is written in [YAML format](https://en.wikipedia.org/wiki/YAML), defined by the scheme described below. ## Scheme diff --git a/pkg/extkingpin/flags.go b/pkg/extkingpin/flags.go index 570e5eda28d..0a5bd1a8ba1 100644 --- a/pkg/extkingpin/flags.go +++ b/pkg/extkingpin/flags.go @@ -47,7 +47,7 @@ func RegisterHTTPFlags(cmd FlagClause) (httpBindAddr *string, httpGracePeriod *m httpBindAddr = cmd.Flag("http-address", "Listen host:port for HTTP endpoints.").Default("0.0.0.0:10902").String() httpGracePeriod = ModelDuration(cmd.Flag("http-grace-period", "Time to wait after an interrupt received for HTTP Server.").Default("2m")) // by default it's the same as query.timeout. httpTLSConfig = cmd.Flag( - "http-tls-config", + "http.config", "[EXPERIMENTAL] Path to the configuration file that can enable TLS or authentication for all HTTP endpoints.", ).Default("").String() return httpBindAddr, httpGracePeriod, httpTLSConfig