Skip to content

Commit 127ee71

Browse files
committed
fix compact: minor fixes after CR
1 parent f91182c commit 127ee71

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ We use *breaking* word for marking changes that are not backward compatible (rel
1919

2020
- [#1248](https://github.com/improbable-eng/thanos/pull/1248) Add a web UI to show the state of remote storage.
2121

22-
- [#1297](https://github.com/improbable-eng/thanos/pull/1297) Added `/-/ready` and `/-healthy` endpoints to Thanos compact.
22+
- [#1297](https://github.com/improbable-eng/thanos/pull/1297) Added `/-/ready` and `/-/healthy` endpoints to Thanos compact.
2323

2424
### Changed
2525

cmd/thanos/compact.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ func (cs compactionSet) maxLevel() int {
6969
return len(cs) - 1
7070
}
7171

72-
func registerCompact(m map[string]setupFunc, app *kingpin.Application, component component.Component) {
72+
func registerCompact(m map[string]setupFunc, app *kingpin.Application) {
73+
component := component.Compact
7374
cmd := app.Command(component.String(), "continuously compacts blocks in an object store bucket")
7475

7576
haltOnError := cmd.Flag("debug.halt-on-error", "Halt the process if a critical compaction error is detected.").

cmd/thanos/main.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import (
2525
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
2626
grpc_recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery"
2727
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
28-
"github.com/improbable-eng/thanos/pkg/component"
2928
"github.com/improbable-eng/thanos/pkg/prober"
3029
"github.com/improbable-eng/thanos/pkg/runutil"
3130
"github.com/improbable-eng/thanos/pkg/tracing"
@@ -75,7 +74,7 @@ func main() {
7574
registerStore(cmds, app, "store")
7675
registerQuery(cmds, app, "query")
7776
registerRule(cmds, app, "rule")
78-
registerCompact(cmds, app, component.Compact)
77+
registerCompact(cmds, app)
7978
registerBucket(cmds, app, "bucket")
8079
registerDownsample(cmds, app, "downsample")
8180
registerReceive(cmds, app, "receive")

tutorials/kubernetes-demo/manifests/thanos-compactor.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ spec:
3535
ports:
3636
- name: http
3737
containerPort: 10902
38+
livenessProbe:
39+
httpGet:
40+
port: 10902
41+
path: /-/healthy
42+
readinessProbe:
43+
httpGet:
44+
port: 10902
45+
path: /-/ready
3846
resources:
3947
limits:
4048
cpu: "1"

0 commit comments

Comments
 (0)