Skip to content

Chore: Refactor KumaSD#7697

Closed
mviswanathsai wants to merge 20 commits intoprometheus-operator:mainfrom
mviswanathsai:refactor-kumasd
Closed

Chore: Refactor KumaSD#7697
mviswanathsai wants to merge 20 commits intoprometheus-operator:mainfrom
mviswanathsai:refactor-kumasd

Conversation

@mviswanathsai
Copy link
Contributor

Description

Improve CRD validations and test cases for Kuma SD. This PR picks up after #7379
Co-Author: @Dharma-09

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.


@mviswanathsai mviswanathsai requested a review from a team as a code owner July 10, 2025 06:02
return fmt.Errorf("[%d]: %w", i, err)
}

if parsedURL.Host == "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this already be prevented by the API validation?

return fmt.Errorf("[%d]: kuma SD server field must not be empty: %s", i, config.Server)
}

if parsedURL.Scheme != "http" && parsedURL.Scheme != "https" {
Copy link
Contributor

Choose a reason for hiding this comment

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

same question here

return fmt.Errorf("[%d]: invalid scheme '%s'. Only 'http' and 'https' are supported", i, parsedURL.Scheme)
}

if err := validateServer(string(config.Server)); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

redundant?

@nutmos nutmos mentioned this pull request Oct 1, 2025
5 tasks
@simonpasquier
Copy link
Contributor

superseded by #7966.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants