diff --git a/CHANGELOG.md b/CHANGELOG.md index c0219cf0..fba10e4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ We use *breaking* word for marking changes that are not backward compatible (rel - [#192](https://github.com/thanos-io/kube-thanos/pull/192) sidecar: Add pod discovery - [#194](https://github.com/thanos-io/kube-thanos/pull/194) Allow configuring --label and --receive.tenant-label-name flags. +- [#209](https://github.com/thanos-io/kube-thanos/pull/209) Allow configuring --label and --refresh flags of bucket web. ### Fixed diff --git a/all.jsonnet b/all.jsonnet index 5283f196..404c841e 100644 --- a/all.jsonnet +++ b/all.jsonnet @@ -39,7 +39,8 @@ local commonConfig = { local b = t.bucket(commonConfig { replicas: 1, - + label: 'cluster_name', + refresh: '5m', // Example on how to overwrite the tracing config on a per component basis // tracing+: { // config+: { diff --git a/examples/all/manifests/thanos-bucket-deployment.yaml b/examples/all/manifests/thanos-bucket-deployment.yaml index ea8904e5..1ab666ce 100644 --- a/examples/all/manifests/thanos-bucket-deployment.yaml +++ b/examples/all/manifests/thanos-bucket-deployment.yaml @@ -37,6 +37,8 @@ spec: "sampler_type": "ratelimiting" "service_name": "thanos-bucket" "type": "JAEGER" + - --label=cluster_name + - --refresh=5m env: - name: OBJSTORE_CONFIG valueFrom: diff --git a/jsonnet/kube-thanos/kube-thanos-bucket.libsonnet b/jsonnet/kube-thanos/kube-thanos-bucket.libsonnet index b8452b57..71d77df3 100644 --- a/jsonnet/kube-thanos/kube-thanos-bucket.libsonnet +++ b/jsonnet/kube-thanos/kube-thanos-bucket.libsonnet @@ -90,6 +90,14 @@ function(params) { { config+: { service_name: defaults.name } } + tb.config.tracing ), ] else [] + ) + ( + if std.objectHas(tb.config, 'label') then [ + '--label=' + tb.config.label, + ] else [] + ) + ( + if std.objectHas(tb.config, 'refresh') then [ + '--refresh=' + tb.config.refresh, + ] else [] ), securityContext: { runAsUser: 65534,