observatorium / thanos-receive-controller

Kubernetes controller to automatically configure Thanos receive hashrings
Apache License 2.0
93 stars 42 forks source link

main.go: find hashring name in label, not sts name #21

Closed squat closed 4 years ago

squat commented 4 years ago

This commit modifies the controller to match statefulsets to hashrings using a label rather than the statefulset name. This is important because resource names are tied to infrastructure logic, not business logic. Furthermore, most thanos-receive statefulsets names will always have a thanos-receive- prefix, meaning that every hashring name would also have to have that prefix. This change allows us to decouple infrastructure and business.

cc @metalmatze @kakkoyun

brancz commented 4 years ago

lgtm