File tree 2 files changed +23
-38
lines changed
2 files changed +23
-38
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -114,3 +114,26 @@ type TargetAllocatorPrometheusCR struct {
114
114
// +optional
115
115
ServiceMonitorSelector * metav1.LabelSelector `json:"serviceMonitorSelector,omitempty"`
116
116
}
117
+
118
+ type (
119
+ // TargetAllocatorAllocationStrategy represent a strategy Target Allocator uses to distribute targets to each collector
120
+ // +kubebuilder:validation:Enum=least-weighted;consistent-hashing;per-node
121
+ TargetAllocatorAllocationStrategy string
122
+ // TargetAllocatorFilterStrategy represent a filtering strategy for targets before they are assigned to collectors
123
+ // +kubebuilder:validation:Enum="";relabel-config
124
+ TargetAllocatorFilterStrategy string
125
+ )
126
+
127
+ const (
128
+ // TargetAllocatorAllocationStrategyLeastWeighted targets will be distributed to collector with fewer targets currently assigned.
129
+ TargetAllocatorAllocationStrategyLeastWeighted TargetAllocatorAllocationStrategy = "least-weighted"
130
+
131
+ // TargetAllocatorAllocationStrategyConsistentHashing targets will be consistently added to collectors, which allows a high-availability setup.
132
+ TargetAllocatorAllocationStrategyConsistentHashing TargetAllocatorAllocationStrategy = "consistent-hashing"
133
+
134
+ // TargetAllocatorAllocationStrategyPerNode targets will be assigned to the collector on the node they reside on (use only with daemon set).
135
+ TargetAllocatorAllocationStrategyPerNode TargetAllocatorAllocationStrategy = "per-node"
136
+
137
+ // TargetAllocatorFilterStrategyRelabelConfig targets will be consistently drops targets based on the relabel_config.
138
+ TargetAllocatorFilterStrategyRelabelConfig TargetAllocatorFilterStrategy = "relabel-config"
139
+ )
You can’t perform that action at this time.
0 commit comments