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 support for ScrapeConfig CRD to prometheus.operator #2638

Open
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

alex-berger
Copy link

@alex-berger alex-berger commented Feb 6, 2025

PR Description

Adding support for ScrapeConfig, initially only supporting StaticConfig.

Feedback and guidance highly appreciated.

Which issue(s) this PR fixes

Fixes #1428

Notes to the Reviewer

PR Checklist

  • CHANGELOG.md updated
  • Documentation added
  • Tests updated
  • Config converters updated

@alex-berger alex-berger requested review from clayton-cornell and a team as code owners February 6, 2025 18:48
@CLAassistant
Copy link

CLAassistant commented Feb 6, 2025

CLA assistant check
All committers have signed the CLA.

@alex-berger alex-berger force-pushed the feature/scrapeconfig branch 3 times, most recently from d397209 to 0d8558e Compare February 7, 2025 11:48
@alex-berger alex-berger changed the title [Draft] Add support for ScrapeConfig CRD in Kubernetes Add support for ScrapeConfig CRD in Kubernetes Feb 7, 2025
@alex-berger alex-berger changed the title Add support for ScrapeConfig CRD in Kubernetes Add support for ScrapeConfig CRD to prometheus.operator Feb 7, 2025
clayton-cornell
clayton-cornell previously approved these changes Feb 7, 2025
Copy link
Contributor

@clayton-cornell clayton-cornell left a comment

Choose a reason for hiding this comment

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

Doc suggestions are almost all style related to align with incoming style changes for the component docs.

The two important questions that need clarification are:

  1. Is this an Experimental, Public preview, or GA component?
  2. Is this a Community supported component?

description: Learn about prometheus.operator.scrapeconfigs
title: prometheus.operator.scrapeconfigs
---

Copy link
Contributor

Choose a reason for hiding this comment

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

Will this one be a Community supported component?

Copy link
Author

@alex-berger alex-berger Feb 10, 2025

Choose a reason for hiding this comment

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

I am definitively not the authority to answer this questions :-). However, reading https://github.com/grafana/alloy/blob/main/docs/developer/adding-community-components.md my intuition is that it should have the same status as the other prometheus.operator components (servicemonitors, podmonitors and probes).


Some additional thoughts/checks regarding https://github.com/grafana/alloy/blob/main/docs/developer/adding-community-components.md:

The community components category is mainly targeted at vendor-specific components for which Grafana does not offer commercial support (for example the Datadog exporter).

It's neither vendor specific nor proprietary, and I assume we can safely say that those Prometheus Operator CRDs are kind of an open (source) de-facto standard.

Avoid overlapping functionalities.

AFAIK, this component closed a feature gap and I am not aware of overlapping functionalities.

Avoid components that can be implemented as modules.

AFAIK, this component closed a feature gap and I am not aware of achieving the same with modules.

Avoid components that affect our dependencies in an undesired way, such as pulling in an incompatible version or bloating the collector.

Should be OK, as it depends on the same dependencies as the other prometheus.operator components.

Make sure that the code licenses are compatible with Alloy's [license](https://github.com/grafana/alloy/blob/main/LICENSE).

Should be OK, as it depends on the same dependencies as the other prometheus.operator components.

@clayton-cornell clayton-cornell dismissed their stale review February 7, 2025 17:25

Clicked the wrong button in the review screen.

@clayton-cornell clayton-cornell requested a review from a team February 7, 2025 17:26
@clayton-cornell clayton-cornell added the type/docs Docs Squad label across all Grafana Labs repos label Feb 11, 2025
alex-berger and others added 17 commits February 12, 2025 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/docs Docs Squad label across all Grafana Labs repos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support ScrapeConfig CR from Prometheus CRDs
3 participants