Thanks to visit codestin.com
Credit goes to github.com

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

Comment on lines +895 to +902
_, err := framework.CreateOrUpdatePrometheusOperatorWithOpts(
ctx, testFramework.PrometheusOperatorOpts{
Namespace: ns,
AllowedNamespaces: []string{ns},
EnabledFeatureGates: []operator.FeatureGateName{operator.PrometheusAgentDaemonSetFeature},
},
)
require.NoError(t, err)
Copy link
Contributor

Choose a reason for hiding this comment

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

It isn't problematic, but we likely don't need to set up the operator to test just the CEL rules. I would be fine with removing this as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

I might be wrong though, so you may want to test it out first :)

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
2 participants