Skip to content

feat: update prometheus agent daemonset proposal #7571

Open
slashexx wants to merge 1 commit intoprometheus-operator:mainfrom
slashexx:slashexx/propup
Open

feat: update prometheus agent daemonset proposal #7571
slashexx wants to merge 1 commit intoprometheus-operator:mainfrom
slashexx:slashexx/propup

Conversation

@slashexx
Copy link
Member

@slashexx slashexx commented May 29, 2025

Description

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
If it fixes a bug or resolves a feature request, be sure to link to that issue.

Draft PR to start off the change of last years DaemonSet proposal.

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)
  • 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.

updated 2024's DaemonSet proposal to a complete version

Copy link
Contributor

@mviswanathsai mviswanathsai left a comment

Choose a reason for hiding this comment

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

Great start! 🥳
I have a few concerns that I have mentioned.

@slashexx slashexx force-pushed the slashexx/propup branch 2 times, most recently from 4a349dd to 3db062c Compare June 10, 2025 07:03
@slashpai slashpai changed the title chore: added need and features of CEL validations feat: update prometheus agent daemonset propoal with features of CEL validations Jun 24, 2025
@pull-request-size pull-request-size bot added size/L and removed size/M labels Jul 2, 2025
@slashexx slashexx changed the title feat: update prometheus agent daemonset propoal with features of CEL validations feat: update prometheus agent daemonset propoal Jul 2, 2025
@slashexx
Copy link
Member Author

slashexx commented Jul 2, 2025

@mviswanathsai I've added updated text about ServiceMonitors and EndpointSlices, requesting review !

EndpointSlices were supported after v1.21.0. My proposal mentioned a fallback to endpoints incase the cluster doesn't support. Since we were discussing the same thing about CEL expression, I'm not sure if this is needed in this case as well.

@slashpai
Copy link
Contributor

slashpai commented Jul 9, 2025

As discussed in the call we can explore the servicemonitor option as a separate feature gate so it doesn't block making current feature GA.

@slashexx slashexx force-pushed the slashexx/propup branch 2 times, most recently from 12a6a10 to 643c2c3 Compare July 22, 2025 19:13
@slashexx slashexx marked this pull request as ready for review July 22, 2025 19:55
@slashexx slashexx requested a review from a team as a code owner July 22, 2025 19:55
@slashexx slashexx changed the title feat: update prometheus agent daemonset propoal feat: update prometheus agent daemonset proposal Aug 13, 2025
@slashexx
Copy link
Member Author

@slashpai @mviswanathsai @simonpasquier I added the remaining selectors and fields, requesting review to see if there are any that I'm missing.

@slashpai slashpai requested a review from simonpasquier August 25, 2025 05:58
CEL validation will provide immediate feedback during `kubectl apply` but we will need runtime validation logic in the controller as a fallback mechanism. This fallback will be integrated directly in the `PrometheusAgent` reconciler loop.

This is mainly because :
1. CEL validation will require Kubernetes version 1.25+ and hence not all users might have CEL supported clusters.
Copy link
Contributor

Choose a reason for hiding this comment

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

CEL has been there for quite some time now (1.25 is 3 years-old) so we can also update our min requirements (no cloud provider should be offering 1.25 by now).

Copy link
Member Author

@slashexx slashexx Aug 31, 2025

Choose a reason for hiding this comment

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

@simonpasquier then should we drop the runtime validations entirely ? We already have a PR in place.

Or should we specify that while runtime validations exist, most validations will be handled by CEL ? Exceptions include bare metal environments.

Copy link
Contributor

Choose a reason for hiding this comment

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

Even when running self-managed Kubernetes you should be upgrading to a reasonably recent version :)

I don't have a strong opinion but I wouldn't mind if we need to require at least 1.25. Maybe a discussion item for the next office hours meeting.

@slashexx
Copy link
Member Author

slashexx commented Sep 2, 2025

cc @slashpai @mviswanathsai ptal at the comments once and let's finalize.

@slashexx
Copy link
Member Author

gentle ping @slashpai @mviswanathsai

@github-actions github-actions bot added the stale label Nov 29, 2025
slashpai
slashpai previously approved these changes Jan 6, 2026
Copy link
Contributor

@slashpai slashpai left a comment

Choose a reason for hiding this comment

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

lgtm

@simonpasquier if no objections we can merge this :)

@slashpai slashpai removed the stale label Jan 6, 2026
Add comprehensive CEL (Common Expression Language) validation rules
to the agent daemonset proposal documentation, including:
- x-kubernetes-validations for field validation
- Runtime fallback logic for validation handling
- Service monitor section refactoring
- Endpointslice section documentation
- Related field blocks and validation requirements
@slashexx
Copy link
Member Author

slashexx commented Jan 7, 2026

@slashpai done !

@slashpai slashpai requested a review from simonpasquier January 7, 2026 06:14
@slashpai
Copy link
Contributor

@simonpasquier could you please take a look again

@slashexx
Copy link
Member Author

@slashpai considering this PR mentions the runtime validations in #7602 , we should finalize on that first, once it is done, I suppose moving this proposal to implemented should be in order ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants