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
+9-1Lines changed: 9 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
}
78
79
@@ -93,6 +94,7 @@ func parseFlags() CmdConfig {
93
94
flag.BoolVar(&config.AllowOnlyReadyReplicas, "allow-only-ready-replicas", false, "Populate only Ready receiver replicas in the hashring configuration")
94
95
flag.BoolVar(&config.AllowDynamicScaling, "allow-dynamic-scaling", false, "Update the hashring configuration on scale down events.")
95
96
flag.BoolVar(&config.AnnotatePodsOnChange, "annotate-pods-on-change", false, "Annotates pods with current timestamp on a hashring change")
97
+
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.")
96
98
flag.DurationVar(&config.ScaleTimeout, "scale-timeout", defaultScaleTimeout, "A timeout to wait for receivers to really start after they report healthy")
0 commit comments