Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing per-node strategy to TA CRD #2859

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion apis/v1beta1/allocation_strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package v1beta1

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

// TargetAllocatorAllocationStrategyPerNode targets will be assigned to the collector on the node they reside on (use only with daemon set).
TargetAllocatorAllocationStrategyPerNode TargetAllocatorAllocationStrategy = "per-node"

// TargetAllocatorFilterStrategyRelabelConfig targets will be consistently drops targets based on the relabel_config.
TargetAllocatorFilterStrategyRelabelConfig TargetAllocatorFilterStrategy = "relabel-config"
)
Original file line number Diff line number Diff line change
Expand Up @@ -7146,6 +7146,7 @@ spec:
enum:
- least-weighted
- consistent-hashing
- per-node
type: string
enabled:
type: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7132,6 +7132,7 @@ spec:
enum:
- least-weighted
- consistent-hashing
- per-node
type: string
enabled:
type: boolean
Expand Down
1 change: 1 addition & 0 deletions config/crd/bases/opentelemetry.io_targetallocators.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,7 @@ spec:
enum:
- least-weighted
- consistent-hashing
- per-node
type: string
args:
additionalProperties:
Expand Down
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -40460,7 +40460,7 @@ The current options are least-weighted, consistent-hashing and per-node. The def
consistent-hashing.
WARNING: The per-node strategy currently ignores targets without a Node, like control plane components.<br/>
<br/>
<i>Enum</i>: least-weighted, consistent-hashing<br/>
<i>Enum</i>: least-weighted, consistent-hashing, per-node<br/>
<i>Default</i>: consistent-hashing<br/>
</td>
<td>false</td>
Expand Down
Loading