Skip to content

Commit 23089e3

Browse files
committed
Update APIs and docs with new strategy
Signed-off-by: Matej Gera <[email protected]>
1 parent 886a80c commit 23089e3

5 files changed

+14
-8
lines changed

apis/v1alpha1/allocation_strategy.go

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

1717
type (
1818
// OpenTelemetryTargetAllocatorAllocationStrategy represent which strategy to distribute target to each collector
19-
// +kubebuilder:validation:Enum=least-weighted;consistent-hashing
19+
// +kubebuilder:validation:Enum=least-weighted;consistent-hashing;per-node
2020
OpenTelemetryTargetAllocatorAllocationStrategy string
2121
)
2222

@@ -26,4 +26,7 @@ const (
2626

2727
// OpenTelemetryTargetAllocatorAllocationStrategyConsistentHashing targets will be consistently added to collectors, which allows a high-availability setup.
2828
OpenTelemetryTargetAllocatorAllocationStrategyConsistentHashing OpenTelemetryTargetAllocatorAllocationStrategy = "consistent-hashing"
29+
30+
// OpenTelemetryTargetAllocatorAllocationStrategyPerNode targets will be assigned to the collector on the node they reside on (use only with daemon set).
31+
OpenTelemetryTargetAllocatorAllocationStrategyPerNode OpenTelemetryTargetAllocatorAllocationStrategy = "per-node"
2932
)

apis/v1alpha1/opentelemetrycollector_types.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,8 @@ type OpenTelemetryTargetAllocator struct {
297297
// +optional
298298
Resources v1.ResourceRequirements `json:"resources,omitempty"`
299299
// AllocationStrategy determines which strategy the target allocator should use for allocation.
300-
// The current options are least-weighted and consistent-hashing. The default option is least-weighted
300+
// The current options are least-weighted, consistent-hashing and per-node. The default is
301+
// least-weighted.
301302
// +optional
302303
AllocationStrategy OpenTelemetryTargetAllocatorAllocationStrategy `json:"allocationStrategy,omitempty"`
303304
// FilterStrategy determines how to filter targets before allocating them among the collectors.

bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -4832,11 +4832,12 @@ spec:
48324832
allocationStrategy:
48334833
description: AllocationStrategy determines which strategy the
48344834
target allocator should use for allocation. The current options
4835-
are least-weighted and consistent-hashing. The default option
4836-
is least-weighted
4835+
are least-weighted, consistent-hashing and per-node. The default
4836+
is least-weighted.
48374837
enum:
48384838
- least-weighted
48394839
- consistent-hashing
4840+
- per-node
48404841
type: string
48414842
enabled:
48424843
description: Enabled indicates whether to use a target allocation

config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -4829,11 +4829,12 @@ spec:
48294829
allocationStrategy:
48304830
description: AllocationStrategy determines which strategy the
48314831
target allocator should use for allocation. The current options
4832-
are least-weighted and consistent-hashing. The default option
4833-
is least-weighted
4832+
are least-weighted, consistent-hashing and per-node. The default
4833+
is least-weighted.
48344834
enum:
48354835
- least-weighted
48364836
- consistent-hashing
4837+
- per-node
48374838
type: string
48384839
enabled:
48394840
description: Enabled indicates whether to use a target allocation

docs/api.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18027,9 +18027,9 @@ TargetAllocator indicates a value which determines whether to spawn a target all
1802718027
<td><b>allocationStrategy</b></td>
1802818028
<td>enum</td>
1802918029
<td>
18030-
AllocationStrategy determines which strategy the target allocator should use for allocation. The current options are least-weighted and consistent-hashing. The default option is least-weighted<br/>
18030+
AllocationStrategy determines which strategy the target allocator should use for allocation. The current options are least-weighted, consistent-hashing and per-node. The default option is least-weighted<br/>
1803118031
<br/>
18032-
<i>Enum</i>: least-weighted, consistent-hashing<br/>
18032+
<i>Enum</i>: least-weighted, consistent-hashing, per-node<br/>
1803318033
</td>
1803418034
<td>false</td>
1803518035
</tr><tr>

0 commit comments

Comments
 (0)