Skip to content

Commit

Permalink
Introduce ability to specify strategies for target allocation (open-t…
Browse files Browse the repository at this point in the history
…elemetry#1079)

* Cribbed from another branch

* Refactor part 2

* Fix tests

* Remove deadlocking problem

* Update based on comments

* Unexported some fields, added blocker and comments about invariants

* Comments and imports fixed
  • Loading branch information
jaronoff97 authored Sep 12, 2022
1 parent 0752148 commit 3af517d
Show file tree
Hide file tree
Showing 24 changed files with 800 additions and 622 deletions.
2 changes: 2 additions & 0 deletions apis/v1alpha1/opentelemetrycollector_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ type OpenTelemetryCollectorSpec struct {

// OpenTelemetryTargetAllocator defines the configurations for the Prometheus target allocator.
type OpenTelemetryTargetAllocator struct {
// AllocationStrategy determines which strategy the target allocator should use for allocation
AllocationStrategy string `json:"allocationStrategy,omitempty"`
// ServiceAccount indicates the name of an existing service account to use with this instance.
// +optional
ServiceAccount string `json:"serviceAccount,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion apis/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,10 @@ spec:
description: TargetAllocator indicates a value which determines whether
to spawn a target allocation resource or not.
properties:
allocationStrategy:
description: AllocationStrategy determines which strategy the
target allocator should use for allocation
type: string
enabled:
description: Enabled indicates whether to use a target allocation
mechanism for Prometheus targets or not.
Expand Down
237 changes: 0 additions & 237 deletions cmd/otel-allocator/allocation/allocator.go

This file was deleted.

Loading

0 comments on commit 3af517d

Please sign in to comment.