thanos-io / kube-thanos

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

example: Fix missing common resources for (compact|store)-shards/receive-hashrings #234

Closed maxbrunet closed 2 years ago

maxbrunet commented 3 years ago

Changes

~Hide hashrings and shards fields in thanos-receive-hashrings and store-shards. This allows to loop through them like the others instead of hand-picking resources and risking missing them (like the service accounts) or having a condition in the loop (e.g. if name != 'shards').~ Loop through compact-shards, receive-hashrings and store-shards common resources and conditionally skip non-resource fields.

Verification

Generated manifests are still the same and service accounts are now here

maxbrunet commented 3 years ago

On an afterthought, hiding keys could potentially annoy some people like Tanka users which extracts Kubernetes resources from any level as long as they are not hidden, so I am just going to fix the example by looping and filtering out these keys.