From eab85b379bf0e26bd6962671b1a92119a75cd94d Mon Sep 17 00:00:00 2001 From: Christopher Manzi Date: Wed, 20 Nov 2019 11:10:52 -0800 Subject: [PATCH 1/9] Add --web.prefix-header flag. Signed-off-by: Christopher Manzi --- CHANGELOG.md | 1 + cmd/thanos/bucket.go | 10 +++- docs/components/bucket.md | 97 +++++++++++++++++++++++++++++---------- pkg/ui/bucket.go | 5 ++ 4 files changed, 87 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5acb9bffa..081367a997 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ We use *breaking* word for marking changes that are not backward compatible (rel - [#1712](https://github.com/thanos-io/thanos/pull/1712) Rename flag on bucket web component from `--listen` to `--http-address` to match other components. - [#1733](https://github.com/thanos-io/thanos/pull/1733) New metric `thanos_compactor_iterations_total` on Thanos Compactor which shows the number of successful iterations. - [#1758](https://github.com/thanos-io/thanos/pull/1758) `thanos bucket web` now supports `--web.external-prefix` for proxying on a subpath. +- [#1762](https://github.com/thanos-io/thanos/pull/1762) Fix `--web.external-prefix` and add `--web.prefix-header` flags to allow for bucket UI to be accessible behind a reverse proxy. ### Fixed diff --git a/cmd/thanos/bucket.go b/cmd/thanos/bucket.go index 6581e154d5..7b97d82b1a 100644 --- a/cmd/thanos/bucket.go +++ b/cmd/thanos/bucket.go @@ -311,6 +311,8 @@ func registerBucketInspect(m map[string]setupFunc, root *kingpin.CmdClause, name func registerBucketWeb(m map[string]setupFunc, root *kingpin.CmdClause, name string, objStoreConfig *extflag.PathOrContent) { cmd := root.Command("web", "Web interface for remote storage bucket") httpBindAddr, httpGracePeriod := regHTTPFlags(cmd) + webExternalPrefix := cmd.Flag("web.external-prefix", "Static prefix for all HTML links and redirect URLs in the bucket web UI interface. Actual endpoints are still served on / or the web.route-prefix. This allows thanos bucket web UI to be served behind a reverse proxy that strips a URL sub-path.").Default("").String() + webPrefixHeaderName := cmd.Flag("web.prefix-header", "Name of HTTP request header used for dynamic prefixing of UI links and redirects. This option is ignored if web.external-prefix argument is set. Security risk: enable this option only if a reverse proxy in front of thanos is resetting the header. The --web.prefix-header=X-Forwarded-Prefix option can be useful, for example, if Thanos UI is served via Traefik reverse proxy with PathPrefixStrip option enabled, which sends the stripped prefix value in X-Forwarded-Prefix header. This allows thanos UI to be served on a sub-path.").Default("").String() interval := cmd.Flag("refresh", "Refresh interval to download metadata from remote storage").Default("30m").Duration() timeout := cmd.Flag("timeout", "Timeout to download metadata from remote storage").Default("5m").Duration() label := cmd.Flag("label", "Prometheus label to use as timeline title").String() @@ -331,8 +333,14 @@ func registerBucketWeb(m map[string]setupFunc, root *kingpin.CmdClause, name str } router := route.New() + + flagsMap := map[string]string{ + "web.external-prefix": *webExternalPrefix, + "web.prefix-header": *webPrefixHeaderName, + } + bucketUI := ui.NewBucketUI(logger, *label, flagsMap) - bucketUI.Register(router, extpromhttp.NewInstrumentationMiddleware(reg)) + bucketUI.Register(router.WithPrefix(*webExternalPrefix), extpromhttp.NewInstrumentationMiddleware(reg)) srv.Handle("/", router) if *interval < 5*time.Minute { diff --git a/docs/components/bucket.md b/docs/components/bucket.md index fb977744b0..fc995059c3 100644 --- a/docs/components/bucket.md +++ b/docs/components/bucket.md @@ -42,22 +42,22 @@ Flags: --version Show application version. --log.level=info Log filtering level. --log.format=logfmt Log format to use. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (lower priority). Content of YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (lower - priority). Content of YAML file that contains object + priority). Content of YAML file that contains objec store configuration. See format details: https://thanos.io/storage.md/#configuration @@ -103,15 +103,24 @@ Flags: --version Show application version. --log.level=info Log filtering level. --log.format=logfmt Log format to use. +<<<<<<< HEAD --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration --tracing.config= +======= + --tracing.config-file= + Path to YAML file with tracing configuration. + See format details: + https://thanos.io/tracing.md/#configuration + --tracing.config= +>>>>>>> 146bd34e... Add externalPrefix base path. Alternative to 'tracing.config-file' flag (lower priority). Content of YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration +<<<<<<< HEAD --objstore.config-file= Path to YAML file that contains object store configuration. See format details: @@ -126,16 +135,54 @@ Flags: Listen host:port for HTTP endpoints. --http-grace-period=2m Time to wait after an interrupt received for HTTP Server. +======= + --objstore.config-file= + Path to YAML file that contains object store + configuration. See format details: + https://thanos.io/storage.md/#configuration + --objstore.config= + Alternative to 'objstore.config-file' flag + (lower priority). Content of YAML file tha + contains object store configuration. See forma + details: + https://thanos.io/storage.md/#configuration + --http-address="0.0.0.0:10902" + Listen host:port for HTTP endpoints. + --http-grace-period=2m Time to wait after an interrupt received for + HTTP Server. + --web.external-prefix="" Static prefix for all HTML links and redirec + URLs in the bucket web UI interface. Actual + endpoints are still served on / or the + web.route-prefix. This allows thanos bucket web + UI to be served behind a reverse proxy tha + strips a URL sub-path. + --web.prefix-header="" Name of HTTP request header used for dynamic + prefixing of UI links and redirects. This option + is ignored if web.external-prefix argument is + set. Security risk: enable this option only if a + reverse proxy in front of thanos is resetting + the header. The + --web.prefix-header=X-Forwarded-Prefix option + can be useful, for example, if Thanos UI is + served via Traefik reverse proxy with + PathPrefixStrip option enabled, which sends the + stripped prefix value in X-Forwarded-Prefix + header. This allows thanos UI to be served on a + sub-path. +>>>>>>> 146bd34e... Add externalPrefix base path. --refresh=30m Refresh interval to download metadata from remote storage --timeout=5m Timeout to download metadata from remote storage --label=LABEL Prometheus label to use as timeline title +<<<<<<< HEAD --web.external-prefix="" Static prefix for all HTML links and redirect URLs in the UI query web interface. Actual endpoints are still served on / or the web.route-prefix. This allows thanos UI to be served behind a reverse proxy that strips a URL sub-path. +======= +>>>>>>> 146bd34e... Add externalPrefix base path. ``` @@ -161,43 +208,43 @@ Flags: --version Show application version. --log.level=info Log filtering level. --log.format=logfmt Log format to use. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (lower priority). Content of YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (lower - priority). Content of YAML file that contains object + priority). Content of YAML file that contains objec store configuration. See format details: https://thanos.io/storage.md/#configuration - --objstore-backup.config-file= + --objstore-backup.config-file= Path to YAML file that contains object store-backup configuration. See format details: https://thanos.io/storage.md/#configuration Used for repair logic to backup blocks before removal. - --objstore-backup.config= + --objstore-backup.config= Alternative to 'objstore-backup.config-file' flag (lower priority). Content of YAML file that contains - object store-backup configuration. See format + object store-backup configuration. See forma details: https://thanos.io/storage.md/#configuration Used for repair logic to backup blocks before removal. -r, --repair Attempt to repair blocks for which issues were detected - -i, --issues=index_issue... ... + -i, --issues=index_issue... ... Issues to verify (and optionally repair). Possible values: [duplicated_compaction index_issue overlapped_blocks] - --id-whitelist=ID-WHITELIST ... + --id-whitelist=ID-WHITELIST ... Block IDs to verify (and optionally repair) only. If none is specified, all blocks will be verified. Repeated field @@ -226,22 +273,22 @@ Flags: --version Show application version. --log.level=info Log filtering level. --log.format=logfmt Log format to use. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (lower priority). Content of YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (lower - priority). Content of YAML file that contains object + priority). Content of YAML file that contains objec store configuration. See format details: https://thanos.io/storage.md/#configuration -o, --output="" Optional format in which to print each block's @@ -271,25 +318,25 @@ Flags: --version Show application version. --log.level=info Log filtering level. --log.format=logfmt Log format to use. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (lower priority). Content of YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (lower priority). Content of YAML file that contains object store configuration. See format details: https://thanos.io/storage.md/#configuration - -l, --selector==\"\" ... + -l, --selector==\"\" ... Selects blocks based on label, e.g. '-l key1=\"value1\" -l key2=\"value2\"'. All key value pairs must match. diff --git a/pkg/ui/bucket.go b/pkg/ui/bucket.go index ae9fb2ad41..e5626652ae 100644 --- a/pkg/ui/bucket.go +++ b/pkg/ui/bucket.go @@ -13,6 +13,7 @@ import ( // Bucket is a web UI representing state of buckets as a timeline. type Bucket struct { *BaseUI + flagsMap map[string]string // Unique Prometheus label that identifies each shard, used as the title. If // not present, all labels are displayed externally as a legend. Label string @@ -44,6 +45,10 @@ func (b *Bucket) Register(r *route.Router, ins extpromhttp.InstrumentationMiddle // Handle / of bucket UIs. func (b *Bucket) root(w http.ResponseWriter, r *http.Request) { prefix := GetWebPrefix(b.logger, b.flagsMap, r) +<<<<<<< HEAD +======= + +>>>>>>> 146bd34e... Add externalPrefix base path. b.executeTemplate(w, "bucket.html", prefix, b) } From 5fae9ea3181b47243a6d7b67bc907c582c130b63 Mon Sep 17 00:00:00 2001 From: Christopher Manzi Date: Wed, 20 Nov 2019 11:12:25 -0800 Subject: [PATCH 2/9] Update changelog. Signed-off-by: Christopher Manzi --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 081367a997..6d014a6f7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ We use *breaking* word for marking changes that are not backward compatible (rel - [#1712](https://github.com/thanos-io/thanos/pull/1712) Rename flag on bucket web component from `--listen` to `--http-address` to match other components. - [#1733](https://github.com/thanos-io/thanos/pull/1733) New metric `thanos_compactor_iterations_total` on Thanos Compactor which shows the number of successful iterations. - [#1758](https://github.com/thanos-io/thanos/pull/1758) `thanos bucket web` now supports `--web.external-prefix` for proxying on a subpath. -- [#1762](https://github.com/thanos-io/thanos/pull/1762) Fix `--web.external-prefix` and add `--web.prefix-header` flags to allow for bucket UI to be accessible behind a reverse proxy. +- [#1762](https://github.com/thanos-io/thanos/pull/1762) Add `--web.prefix-header` flags to allow for bucket UI to be accessible behind a reverse proxy. ### Fixed @@ -29,6 +29,7 @@ We use *breaking* word for marking changes that are not backward compatible (rel - [#1669](https://github.com/thanos-io/thanos/pull/1669) Fixed store sharding. Now it does not load excluded meta.jsons and load/fetch index-cache.json files. - [#1670](https://github.com/thanos-io/thanos/pull/1670) Fixed un-ordered blocks upload. Sidecar now uploads the oldest blocks first. - [#1568](https://github.com/thanos-io/thanos/pull/1709) Thanos Store now retains the first raw value of a chunk during downsampling to avoid losing some counter resets that occur on an aggregation boundary. +- [#1762](https://github.com/thanos-io/thanos/pull/1762) Fix `--web.external-prefix` 404s for static resources. ### Changed From 779bdb5c2229e017e789ded618761e111116ff17 Mon Sep 17 00:00:00 2001 From: Christopher Manzi Date: Wed, 20 Nov 2019 11:23:31 -0800 Subject: [PATCH 3/9] Resolve conflicts with upstream. Signed-off-by: Christopher Manzi --- docs/components/bucket.md | 34 ---------------------------------- pkg/ui/bucket.go | 4 ---- 2 files changed, 38 deletions(-) diff --git a/docs/components/bucket.md b/docs/components/bucket.md index fc995059c3..a841337d1e 100644 --- a/docs/components/bucket.md +++ b/docs/components/bucket.md @@ -103,39 +103,15 @@ Flags: --version Show application version. --log.level=info Log filtering level. --log.format=logfmt Log format to use. -<<<<<<< HEAD --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration --tracing.config= -======= - --tracing.config-file= - Path to YAML file with tracing configuration. - See format details: - https://thanos.io/tracing.md/#configuration - --tracing.config= ->>>>>>> 146bd34e... Add externalPrefix base path. Alternative to 'tracing.config-file' flag (lower priority). Content of YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration -<<<<<<< HEAD - --objstore.config-file= - Path to YAML file that contains object store - configuration. See format details: - https://thanos.io/storage.md/#configuration - --objstore.config= - Alternative to 'objstore.config-file' flag - (lower priority). Content of YAML file that - contains object store configuration. See format - details: - https://thanos.io/storage.md/#configuration - --http-address="0.0.0.0:10902" - Listen host:port for HTTP endpoints. - --http-grace-period=2m Time to wait after an interrupt received for - HTTP Server. -======= --objstore.config-file= Path to YAML file that contains object store configuration. See format details: @@ -169,20 +145,10 @@ Flags: stripped prefix value in X-Forwarded-Prefix header. This allows thanos UI to be served on a sub-path. ->>>>>>> 146bd34e... Add externalPrefix base path. --refresh=30m Refresh interval to download metadata from remote storage --timeout=5m Timeout to download metadata from remote storage --label=LABEL Prometheus label to use as timeline title -<<<<<<< HEAD - --web.external-prefix="" Static prefix for all HTML links and redirect - URLs in the UI query web interface. Actual - endpoints are still served on / or the - web.route-prefix. This allows thanos UI to be - served behind a reverse proxy that strips a URL - sub-path. -======= ->>>>>>> 146bd34e... Add externalPrefix base path. ``` diff --git a/pkg/ui/bucket.go b/pkg/ui/bucket.go index e5626652ae..6aa7b67b40 100644 --- a/pkg/ui/bucket.go +++ b/pkg/ui/bucket.go @@ -45,10 +45,6 @@ func (b *Bucket) Register(r *route.Router, ins extpromhttp.InstrumentationMiddle // Handle / of bucket UIs. func (b *Bucket) root(w http.ResponseWriter, r *http.Request) { prefix := GetWebPrefix(b.logger, b.flagsMap, r) -<<<<<<< HEAD -======= - ->>>>>>> 146bd34e... Add externalPrefix base path. b.executeTemplate(w, "bucket.html", prefix, b) } From 13d6c922c1312e430eb042e129c9b2acdc904af0 Mon Sep 17 00:00:00 2001 From: Christopher Manzi Date: Wed, 20 Nov 2019 11:25:25 -0800 Subject: [PATCH 4/9] Lint docs. Signed-off-by: Christopher Manzi --- docs/components/bucket.md | 12 ++++++------ pkg/ui/bucket.go | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/components/bucket.md b/docs/components/bucket.md index a841337d1e..1281abe3d6 100644 --- a/docs/components/bucket.md +++ b/docs/components/bucket.md @@ -57,7 +57,7 @@ Flags: https://thanos.io/storage.md/#configuration --objstore.config= Alternative to 'objstore.config-file' flag (lower - priority). Content of YAML file that contains objec + priority). Content of YAML file that contains object store configuration. See format details: https://thanos.io/storage.md/#configuration @@ -119,7 +119,7 @@ Flags: --objstore.config= Alternative to 'objstore.config-file' flag (lower priority). Content of YAML file tha - contains object store configuration. See forma + contains object store configuration. See format details: https://thanos.io/storage.md/#configuration --http-address="0.0.0.0:10902" @@ -137,7 +137,7 @@ Flags: is ignored if web.external-prefix argument is set. Security risk: enable this option only if a reverse proxy in front of thanos is resetting - the header. The + the header. --web.prefix-header=X-Forwarded-Prefix option can be useful, for example, if Thanos UI is served via Traefik reverse proxy with @@ -189,7 +189,7 @@ Flags: https://thanos.io/storage.md/#configuration --objstore.config= Alternative to 'objstore.config-file' flag (lower - priority). Content of YAML file that contains objec + priority). Content of YAML file that contains object store configuration. See format details: https://thanos.io/storage.md/#configuration --objstore-backup.config-file= @@ -200,7 +200,7 @@ Flags: --objstore-backup.config= Alternative to 'objstore-backup.config-file' flag (lower priority). Content of YAML file that contains - object store-backup configuration. See forma + object store-backup configuration. See format details: https://thanos.io/storage.md/#configuration Used for repair logic to backup blocks before removal. @@ -254,7 +254,7 @@ Flags: https://thanos.io/storage.md/#configuration --objstore.config= Alternative to 'objstore.config-file' flag (lower - priority). Content of YAML file that contains objec + priority). Content of YAML file that contains object store configuration. See format details: https://thanos.io/storage.md/#configuration -o, --output="" Optional format in which to print each block's diff --git a/pkg/ui/bucket.go b/pkg/ui/bucket.go index 6aa7b67b40..e8fcbe6887 100644 --- a/pkg/ui/bucket.go +++ b/pkg/ui/bucket.go @@ -20,7 +20,6 @@ type Bucket struct { Blocks template.JS RefreshedAt time.Time Err error - flagsMap map[string]string } func NewBucketUI(logger log.Logger, label string, flagsMap map[string]string) *Bucket { From 56d32fd7de8686023e285749b8aeb09a0ef85b38 Mon Sep 17 00:00:00 2001 From: Christopher Manzi Date: Wed, 20 Nov 2019 11:34:18 -0800 Subject: [PATCH 5/9] More docs linting. Signed-off-by: Christopher Manzi --- docs/components/bucket.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/bucket.md b/docs/components/bucket.md index 1281abe3d6..08af141bdc 100644 --- a/docs/components/bucket.md +++ b/docs/components/bucket.md @@ -137,7 +137,7 @@ Flags: is ignored if web.external-prefix argument is set. Security risk: enable this option only if a reverse proxy in front of thanos is resetting - the header. + the header. The --web.prefix-header=X-Forwarded-Prefix option can be useful, for example, if Thanos UI is served via Traefik reverse proxy with From 245db80852723107e5e506907f5fe65dcbd27b93 Mon Sep 17 00:00:00 2001 From: Christopher Manzi Date: Wed, 20 Nov 2019 11:36:25 -0800 Subject: [PATCH 6/9] Remove extra flags. Signed-off-by: Christopher Manzi --- cmd/thanos/bucket.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cmd/thanos/bucket.go b/cmd/thanos/bucket.go index 7b97d82b1a..0f7c43cc94 100644 --- a/cmd/thanos/bucket.go +++ b/cmd/thanos/bucket.go @@ -316,7 +316,6 @@ func registerBucketWeb(m map[string]setupFunc, root *kingpin.CmdClause, name str interval := cmd.Flag("refresh", "Refresh interval to download metadata from remote storage").Default("30m").Duration() timeout := cmd.Flag("timeout", "Timeout to download metadata from remote storage").Default("5m").Duration() label := cmd.Flag("label", "Prometheus label to use as timeline title").String() - webExternalPrefix := cmd.Flag("web.external-prefix", "Static prefix for all HTML links and redirect URLs in the UI query web interface. Actual endpoints are still served on / or the web.route-prefix. This allows thanos UI to be served behind a reverse proxy that strips a URL sub-path.").Default("").String() m[name+" web"] = func(g *run.Group, logger log.Logger, reg *prometheus.Registry, _ opentracing.Tracer, _ bool) error { ctx, cancel := context.WithCancel(context.Background()) @@ -330,15 +329,11 @@ func registerBucketWeb(m map[string]setupFunc, root *kingpin.CmdClause, name str flagsMap := map[string]string{ "web.external-prefix": *webExternalPrefix, + "web.prefix-header": *webPrefixHeaderName, } router := route.New() - flagsMap := map[string]string{ - "web.external-prefix": *webExternalPrefix, - "web.prefix-header": *webPrefixHeaderName, - } - bucketUI := ui.NewBucketUI(logger, *label, flagsMap) bucketUI.Register(router.WithPrefix(*webExternalPrefix), extpromhttp.NewInstrumentationMiddleware(reg)) srv.Handle("/", router) From 515597fca35d1d83d1008775bb2c5bf62f4de298 Mon Sep 17 00:00:00 2001 From: Christopher Manzi Date: Wed, 20 Nov 2019 12:00:41 -0800 Subject: [PATCH 7/9] Update changelog. Signed-off-by: Christopher Manzi --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d014a6f7d..c24b3c09a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ We use *breaking* word for marking changes that are not backward compatible (rel - [#1712](https://github.com/thanos-io/thanos/pull/1712) Rename flag on bucket web component from `--listen` to `--http-address` to match other components. - [#1733](https://github.com/thanos-io/thanos/pull/1733) New metric `thanos_compactor_iterations_total` on Thanos Compactor which shows the number of successful iterations. - [#1758](https://github.com/thanos-io/thanos/pull/1758) `thanos bucket web` now supports `--web.external-prefix` for proxying on a subpath. -- [#1762](https://github.com/thanos-io/thanos/pull/1762) Add `--web.prefix-header` flags to allow for bucket UI to be accessible behind a reverse proxy. +- [#1770](https://github.com/thanos-io/thanos/pull/1770) Add `--web.prefix-header` flags to allow for bucket UI to be accessible behind a reverse proxy. ### Fixed @@ -29,7 +29,7 @@ We use *breaking* word for marking changes that are not backward compatible (rel - [#1669](https://github.com/thanos-io/thanos/pull/1669) Fixed store sharding. Now it does not load excluded meta.jsons and load/fetch index-cache.json files. - [#1670](https://github.com/thanos-io/thanos/pull/1670) Fixed un-ordered blocks upload. Sidecar now uploads the oldest blocks first. - [#1568](https://github.com/thanos-io/thanos/pull/1709) Thanos Store now retains the first raw value of a chunk during downsampling to avoid losing some counter resets that occur on an aggregation boundary. -- [#1762](https://github.com/thanos-io/thanos/pull/1762) Fix `--web.external-prefix` 404s for static resources. +- [#1770](https://github.com/thanos-io/thanos/pull/1770) Fix `--web.external-prefix` 404s for static resources. ### Changed From 7af9cd505ae8df2daa1c4ca45bd94d4660207d8c Mon Sep 17 00:00:00 2001 From: Christopher Manzi Date: Wed, 20 Nov 2019 12:11:03 -0800 Subject: [PATCH 8/9] Lint docs. Signed-off-by: Christopher Manzi --- docs/components/bucket.md | 50 +++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/docs/components/bucket.md b/docs/components/bucket.md index 08af141bdc..6b1a96ef48 100644 --- a/docs/components/bucket.md +++ b/docs/components/bucket.md @@ -42,20 +42,20 @@ Flags: --version Show application version. --log.level=info Log filtering level. --log.format=logfmt Log format to use. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (lower priority). Content of YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (lower priority). Content of YAML file that contains object store configuration. See format details: @@ -112,21 +112,21 @@ Flags: priority). Content of YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (lower priority). Content of YAML file tha contains object store configuration. See format details: https://thanos.io/storage.md/#configuration - --http-address="0.0.0.0:10902" + --http-address="0.0.0.0:10902" Listen host:port for HTTP endpoints. --http-grace-period=2m Time to wait after an interrupt received for HTTP Server. - --web.external-prefix="" Static prefix for all HTML links and redirec + --web.external-prefix="" Static prefix for all HTML links and redirect URLs in the bucket web UI interface. Actual endpoints are still served on / or the web.route-prefix. This allows thanos bucket web @@ -174,30 +174,30 @@ Flags: --version Show application version. --log.level=info Log filtering level. --log.format=logfmt Log format to use. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (lower priority). Content of YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (lower priority). Content of YAML file that contains object store configuration. See format details: https://thanos.io/storage.md/#configuration - --objstore-backup.config-file= + --objstore-backup.config-file= Path to YAML file that contains object store-backup configuration. See format details: https://thanos.io/storage.md/#configuration Used for repair logic to backup blocks before removal. - --objstore-backup.config= + --objstore-backup.config= Alternative to 'objstore-backup.config-file' flag (lower priority). Content of YAML file that contains object store-backup configuration. See format @@ -206,11 +206,11 @@ Flags: removal. -r, --repair Attempt to repair blocks for which issues were detected - -i, --issues=index_issue... ... + -i, --issues=index_issue... ... Issues to verify (and optionally repair). Possible values: [duplicated_compaction index_issue overlapped_blocks] - --id-whitelist=ID-WHITELIST ... + --id-whitelist=ID-WHITELIST ... Block IDs to verify (and optionally repair) only. If none is specified, all blocks will be verified. Repeated field @@ -239,20 +239,20 @@ Flags: --version Show application version. --log.level=info Log filtering level. --log.format=logfmt Log format to use. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (lower priority). Content of YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (lower priority). Content of YAML file that contains object store configuration. See format details: @@ -284,25 +284,25 @@ Flags: --version Show application version. --log.level=info Log filtering level. --log.format=logfmt Log format to use. - --tracing.config-file= + --tracing.config-file= Path to YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration - --tracing.config= + --tracing.config= Alternative to 'tracing.config-file' flag (lower priority). Content of YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration - --objstore.config-file= + --objstore.config-file= Path to YAML file that contains object store configuration. See format details: https://thanos.io/storage.md/#configuration - --objstore.config= + --objstore.config= Alternative to 'objstore.config-file' flag (lower priority). Content of YAML file that contains object store configuration. See format details: https://thanos.io/storage.md/#configuration - -l, --selector==\"\" ... + -l, --selector==\"\" ... Selects blocks based on label, e.g. '-l key1=\"value1\" -l key2=\"value2\"'. All key value pairs must match. From 5d568dda0c7bf1b2808898660c2a9321b98084c0 Mon Sep 17 00:00:00 2001 From: Christopher Manzi Date: Wed, 20 Nov 2019 12:20:01 -0800 Subject: [PATCH 9/9] Final docs lint. Signed-off-by: Christopher Manzi --- docs/components/bucket.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/components/bucket.md b/docs/components/bucket.md index 6b1a96ef48..b6fc2c9188 100644 --- a/docs/components/bucket.md +++ b/docs/components/bucket.md @@ -118,7 +118,7 @@ Flags: https://thanos.io/storage.md/#configuration --objstore.config= Alternative to 'objstore.config-file' flag - (lower priority). Content of YAML file tha + (lower priority). Content of YAML file that contains object store configuration. See format details: https://thanos.io/storage.md/#configuration @@ -130,7 +130,7 @@ Flags: URLs in the bucket web UI interface. Actual endpoints are still served on / or the web.route-prefix. This allows thanos bucket web - UI to be served behind a reverse proxy tha + UI to be served behind a reverse proxy that strips a URL sub-path. --web.prefix-header="" Name of HTTP request header used for dynamic prefixing of UI links and redirects. This option