thanos-io / kube-thanos

Kubernetes specific configuration for deploying Thanos.
Apache License 2.0
520 stars 177 forks source link

Support compactor hash sharding #232

Closed yeya24 closed 3 years ago

yeya24 commented 3 years ago

Signed-off-by: ben.ye ben.ye@bytedance.com

Changes

Fixes #231

Similar to the store shards, I add shards for compactors. The difference is that store gateway is sharded by __block_id, but compactor needs to be sharded by the external labels of the blocks (e.g. cluster). This should be configured by users.

Verification

metalmatze commented 3 years ago

Nice!!! One questions: Can we reuse the same service and match via labels?

yeya24 commented 3 years ago

Hi @metalmatze, thank you for the review. Now I have one service per shard. Do you mean I need to use one service for all statefulsets? Can you explain how would it work via label matching?