prometheus-operator icon indicating copy to clipboard operation
prometheus-operator copied to clipboard

feat: Add support for attaching namespace metadata to Kubernetes SD

Open dongjiang1989 opened this issue 6 months ago • 6 comments

Description

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.

If it fixes an existing issue (bug or feature), use the following keyword:

Closes: #7799

Type of change

What type of changes does your code introduce to the Prometheus operator? Put an x in the box that apply.

  • [ ] CHANGE (fix or feature that would cause existing functionality to not work as expected)
  • [x] FEATURE (non-breaking change which adds functionality)
  • [ ] BUGFIX (non-breaking change which fixes an issue)
  • [ ] ENHANCEMENT (non-breaking change which improves existing functionality)
  • [ ] NONE (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)

Verification

Please check the Prometheus-Operator testing guidelines for recommendations about automated tests.

Changelog entry

Please put a one-line changelog entry below. This will be copied to the changelog file during the release process.

Add support for attaching namespace metadata to Kubernetes SD

dongjiang1989 avatar Aug 15 '25 06:08 dongjiang1989

Thanks for the PR! Don't we have an existing issue with ScrapeConfig CRD and scrape classes? It seems that we don't merge the scrape class' attach metadata when generating the configuration from ScrapeConfig.

Thanks @simonpasquier Currently, there appears to be no issue, as the results have been uniformly processed via appendAttachMetadata.

dongjiang1989 avatar Aug 19 '25 10:08 dongjiang1989

Thanks for the work on this @dongjiang1989 ! šŸ™ Is this PR still active? I’d love to use the namespace metadata feature and was wondering about its status.

sebastienrospars avatar Oct 18 '25 14:10 sebastienrospars

Thanks for the work on this @dongjiang1989 ! šŸ™ Is this PR still active? I’d love to use the namespace metadata feature and was wondering about its status.

Hi @dongjiang1989 seems the pr has some conflicts if you could check? Thanks

heliapb avatar Oct 19 '25 20:10 heliapb

@heliapb and @sebastienrospars I'll fix it soon

dongjiang1989 avatar Oct 20 '25 10:10 dongjiang1989

@simonpasquier @heliapb PTAL

dongjiang1989 avatar Oct 20 '25 12:10 dongjiang1989

Hello @heliapb, do you have some times to review this PR please ? Thanks by advance.

sebastienrospars avatar Nov 14 '25 10:11 sebastienrospars