Skip to content

Conversation

@slashexx
Copy link
Member

@slashexx slashexx commented Sep 5, 2025

Description

This PR adds the remaining CEL validations for fields which were missing before.

  • scrapeConfigNamespaceSelector
    
  • probeNamespaceSelector
    
  • serviceMonitorSelector
    
  • serviceMonitorNamespaceSelector
    
  • additionalScrapeConfigs
    

Important to note that these fields are yet to be finalised and await merge of #7571

Closes: #7880

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.


@slashexx slashexx requested a review from a team as a code owner September 5, 2025 10:46
@slashexx slashexx changed the title add missing CEL validations which remained feat: add remaining CEL validations Sep 6, 2025
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.

Sorry about the delays.
Looks good to me for the most part, just one nit.
CC: @slashpai

@github-actions github-actions bot added the stale label Nov 18, 2025
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.

t.Run("DaemonSetInvalidPVCRetentionPolicy", testDaemonSetInvalidPVCRetentionPolicy)
t.Run("DaemonSetInvalidScrapeConfigSelector", testDaemonSetInvalidScrapeConfigSelector)
t.Run("DaemonSetInvalidProbeSelector", testDaemonSetInvalidProbeSelector)
t.Run("DaemonSetInvalidScrapeConfigNamespaceSelector", testDaemonSetInvalidScrapeConfigNamespaceSelector)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we could have table driven tests combining all tests in this but that can be a followup PR

Copy link
Member Author

Choose a reason for hiding this comment

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

Will work on a follow up ! @slashpai

@slashpai slashpai removed the stale label Jan 6, 2026
Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

LGTM. This would need a rebase to trigger the CI again.

@slashpai
Copy link
Contributor

slashpai commented Jan 6, 2026

@slashexx can you do a rebase, there are no conflicts but main branch is much ahead

@slashexx
Copy link
Member Author

slashexx commented Jan 6, 2026

@slashpai will do

@slashpai
Copy link
Contributor

slashpai commented Jan 7, 2026

would you be able to do rebase today? I am trying to get new operator release today, if done today we can get this one also :)

@slashexx
Copy link
Member Author

slashexx commented Jan 7, 2026

@slashpai done !

I've also rebased all pending PRs :D

@slashpai slashpai merged commit 37ad872 into prometheus-operator:main Jan 7, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

Add missing field CEL validations for DaemonSet mode

4 participants