You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow to annotate pods on change using a different label
This change allows users to optionally specify a different label (than the
one used to watch receiver pods) for annotating pods on hashring change.
This is useful in a separate Thanos receiver router and ingestor setup:
https://thanos.io/tip/proposals-accepted/202012-receive-split.md/ where
we need to watch a different set of ingestor pods to update the hashring,
but the hashring is consumed by a different set of router pods.
Signed-off-by: Ratnadeep Debnath <[email protected]>
Copy file name to clipboardExpand all lines: main.go
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -73,6 +73,7 @@ type CmdConfig struct {
73
73
AllowOnlyReadyReplicasbool
74
74
AllowDynamicScalingbool
75
75
AnnotatePodsOnChangebool
76
+
AnnotatePodsLabelstring
76
77
ScaleTimeout time.Duration
77
78
useAzAwareHashRingbool
78
79
podAzAnnotationKeystring
@@ -95,6 +96,7 @@ func parseFlags() CmdConfig {
95
96
flag.BoolVar(&config.AllowOnlyReadyReplicas, "allow-only-ready-replicas", false, "Populate only Ready receiver replicas in the hashring configuration")
96
97
flag.BoolVar(&config.AllowDynamicScaling, "allow-dynamic-scaling", false, "Update the hashring configuration on scale down events.")
97
98
flag.BoolVar(&config.AnnotatePodsOnChange, "annotate-pods-on-change", false, "Annotates pods with current timestamp on a hashring change")
99
+
flag.StringVar(&config.AnnotatePodsLabel, "annotate-pods-label", "", "The label pods must have to be annotated with current timestamp by the controller on a hashring change.")
98
100
flag.DurationVar(&config.ScaleTimeout, "scale-timeout", defaultScaleTimeout, "A timeout to wait for receivers to really start after they report healthy")
99
101
flag.BoolVar(&config.useAzAwareHashRing, "use-az-aware-hashring", false, "A boolean to use az aware hashring to comply with Thanos v0.32+")
100
102
flag.StringVar(&config.podAzAnnotationKey, "pod-az-annotation-key", "", "pod annotation key for AZ Info, If not specified or key not found, will use sts name as AZ key")
0 commit comments