thanos-community / thanos-operator

WIP: Operator to manage Thanos installation
Apache License 2.0
22 stars 3 forks source link

chore: Refactor options struct to de-dupe logic from builders #103

Closed philipgough closed 3 weeks ago

philipgough commented 4 weeks ago

This tries to centralise some of the common logic that we do in the builders to make it less error prone and more clear as to its intention.

It also changes the store sharding logic somewhat from a build perspective. The aim is that we don't leak the api into the build function which should make pruning the unused/orphaned shards more straightforward.

The change means (from a labelling perspective), all shards belong to the same instance but will get their own shard label (if it is a shard). This will allow us to look up shards by instance label at reconcile time and prune whatever has been orphaned by config changes.

Will follow up with other components in similar fashion if you agree @saswatamcode