Skip to content

Commit 32f4fd2

Browse files
authored
Add missing per-node strategy to TA CRD (#2859)
1 parent 946f69d commit 32f4fd2

5 files changed

+8
-2
lines changed

apis/v1beta1/allocation_strategy.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ package v1beta1
1616

1717
type (
1818
// TargetAllocatorAllocationStrategy represent a strategy Target Allocator uses to distribute targets to each collector
19-
// +kubebuilder:validation:Enum=least-weighted;consistent-hashing
19+
// +kubebuilder:validation:Enum=least-weighted;consistent-hashing;per-node
2020
TargetAllocatorAllocationStrategy string
2121
// TargetAllocatorFilterStrategy represent a filtering strategy for targets before they are assigned to collectors
2222
// +kubebuilder:validation:Enum="";relabel-config
@@ -30,6 +30,9 @@ const (
3030
// TargetAllocatorAllocationStrategyConsistentHashing targets will be consistently added to collectors, which allows a high-availability setup.
3131
TargetAllocatorAllocationStrategyConsistentHashing TargetAllocatorAllocationStrategy = "consistent-hashing"
3232

33+
// TargetAllocatorAllocationStrategyPerNode targets will be assigned to the collector on the node they reside on (use only with daemon set).
34+
TargetAllocatorAllocationStrategyPerNode TargetAllocatorAllocationStrategy = "per-node"
35+
3336
// TargetAllocatorFilterStrategyRelabelConfig targets will be consistently drops targets based on the relabel_config.
3437
TargetAllocatorFilterStrategyRelabelConfig TargetAllocatorFilterStrategy = "relabel-config"
3538
)

bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -7146,6 +7146,7 @@ spec:
71467146
enum:
71477147
- least-weighted
71487148
- consistent-hashing
7149+
- per-node
71497150
type: string
71507151
enabled:
71517152
type: boolean

config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -7132,6 +7132,7 @@ spec:
71327132
enum:
71337133
- least-weighted
71347134
- consistent-hashing
7135+
- per-node
71357136
type: string
71367137
enabled:
71377138
type: boolean

config/crd/bases/opentelemetry.io_targetallocators.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -1072,6 +1072,7 @@ spec:
10721072
enum:
10731073
- least-weighted
10741074
- consistent-hashing
1075+
- per-node
10751076
type: string
10761077
args:
10771078
additionalProperties:

docs/api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40460,7 +40460,7 @@ The current options are least-weighted, consistent-hashing and per-node. The def
4046040460
consistent-hashing.
4046140461
WARNING: The per-node strategy currently ignores targets without a Node, like control plane components.<br/>
4046240462
<br/>
40463-
<i>Enum</i>: least-weighted, consistent-hashing<br/>
40463+
<i>Enum</i>: least-weighted, consistent-hashing, per-node<br/>
4046440464
<i>Default</i>: consistent-hashing<br/>
4046540465
</td>
4046640466
<td>false</td>

0 commit comments

Comments
 (0)