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 TargetAllocator CRD #2516

Merged
merged 1 commit into from
Jan 19, 2024
Merged

Conversation

swiatekm
Copy link
Contributor

Description:

Add type definitions for the new TargetAllocator CRD. See the linked issue for the plan on how this will be rolled out.

Link to tracking Issue: #2422

@swiatekm swiatekm added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Jan 14, 2024
@swiatekm swiatekm marked this pull request as ready for review January 14, 2024 15:44
@swiatekm swiatekm requested a review from a team January 14, 2024 15:44
Copy link
Contributor

@jaronoff97 jaronoff97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this LGTM. It's a solid simple start that we can add to later. Are we going to add the collector selector in this PR or in a later one? Also, can we adjust the v1alpha2 collector's existing TA config to be a minimal version of this, or do we want to do that in a follow?

@swiatekm
Copy link
Contributor Author

Are we going to add the collector selector in this PR or in a later one?

I'd like to add it alongside the conversion from the embedded TA to the v1alpha2 CRD.

Also, can we adjust the v1alpha2 collector's existing TA config to be a minimal version of this, or do we want to do that in a follow?

I'm not completely convinced we want to do this at all tbh, it will make the conversion a lot more complicated.

}

// TargetAllocatorStatus defines the observed state of Target Allocator.
type TargetAllocatorStatus struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note for the future, it would be REALLY cool if we could add some info here like number of jobs, collectors discovered, etc.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be cool to book a ticket for it :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder how difficult it is to actually do this. We'd have to get the target allocator metrics, which while not exactly difficult, seems not very robust to me.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

certainly something to figure out in the future. #2549

// Enabled indicates whether to use a PrometheusOperator custom resources as targets or not.
// +optional
Enabled bool `json:"enabled,omitempty"`
// Interval between consecutive scrapes. Equivalent to the same setting on the Prometheus CRD.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any precedence order for the interval defined here and on the service/pod monitors?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's exactly the same as the respective setting on the Prometheus CR - a default that can be overridden in individual CRs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it smth that should be documented here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment already says it's equivalent to the Prometheus CR attribute, but I can also mention it's an overridable default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

}

// TargetAllocatorStatus defines the observed state of Target Allocator.
type TargetAllocatorStatus struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@swiatekm
Copy link
Contributor Author

I've also added a separate type for filter strategies and set the right default in kubebuilder tags.

@jaronoff97 jaronoff97 merged commit 72c2e92 into open-telemetry:main Jan 19, 2024
27 checks passed
ItielOlenick pushed a commit to ItielOlenick/opentelemetry-operator that referenced this pull request May 1, 2024
@swiatekm swiatekm deleted the feat/add-ta-crd branch November 30, 2024 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants