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

Target allocator allocation stragy mismatch metween v1alpha1 and v1beta1 #2860

Closed
pavolloffay opened this issue Apr 16, 2024 · 1 comment · Fixed by #2893
Closed

Target allocator allocation stragy mismatch metween v1alpha1 and v1beta1 #2860

pavolloffay opened this issue Apr 16, 2024 · 1 comment · Fixed by #2893
Assignees
Labels
enhancement New feature or request needs triage

Comments

@pavolloffay
Copy link
Member

Component(s)

target allocator

Is your feature request related to a problem? Please describe.

The v1alpha1

const (
	// OpenTelemetryTargetAllocatorAllocationStrategyLeastWeighted targets will be distributed to collector with fewer targets currently assigned.
	OpenTelemetryTargetAllocatorAllocationStrategyLeastWeighted OpenTelemetryTargetAllocatorAllocationStrategy = "least-weighted"

	// OpenTelemetryTargetAllocatorAllocationStrategyConsistentHashing targets will be consistently added to collectors, which allows a high-availability setup.
	OpenTelemetryTargetAllocatorAllocationStrategyConsistentHashing OpenTelemetryTargetAllocatorAllocationStrategy = "consistent-hashing"

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

The v1beta1

const (
	// TargetAllocatorAllocationStrategyLeastWeighted targets will be distributed to collector with fewer targets currently assigned.
	TargetAllocatorAllocationStrategyLeastWeighted TargetAllocatorAllocationStrategy = "least-weighted"

	// TargetAllocatorAllocationStrategyConsistentHashing targets will be consistently added to collectors, which allows a high-availability setup.
	TargetAllocatorAllocationStrategyConsistentHashing TargetAllocatorAllocationStrategy = "consistent-hashing"

	// TargetAllocatorFilterStrategyRelabelConfig targets will be consistently drops targets based on the relabel_config.
	TargetAllocatorFilterStrategyRelabelConfig TargetAllocatorFilterStrategy = "relabel-config"
)

Describe the solution you'd like

Both v1beta1 should have supported allocation strategies as v1alpha1. If no the conversion should handle it properly (which is not the case now)

AllocationStrategy: v1beta1.TargetAllocatorAllocationStrategy(in.AllocationStrategy),

Describe alternatives you've considered

No response

Additional context

No response

@swiatekm
Copy link
Contributor

As a follow-up to #2859, we should add an explicit conversion function between the v1alpha1 and v1beta1 enums.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants