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

Skip to content

Conversation

heliapb
Copy link
Member

@heliapb heliapb commented Sep 18, 2025

Description

From issue #7922

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.


@heliapb heliapb requested a review from a team as a code owner September 18, 2025 08:31
@heliapb heliapb requested a review from yp969803 September 18, 2025 08:31
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.

we need also the +kubebuilder:subresource:status marker.

@yp969803
Copy link
Contributor

For PrometheusRule and AlertmanagerConfig we need different struct for status, i guess because in future we are having targets information in the current struct

@yp969803
Copy link
Contributor

the current struct which is ConfigResourceStatus is only for smon, podmon and probes,

@yp969803
Copy link
Contributor

also add
"promethuesrules/status" rbac permission in prometheus-operator.libsonnet file

@simonpasquier
Copy link
Contributor

While we have stability guarantees for CRDs, we don't have for the Go structs so I would reuse the same struct for now. We'll refactor when/if we need new fields for scrape-based resources.

The only change that I would see is to relax the validation marker on the resource field (right now, it is +kubebuilder:validation:Enum=prometheuses;prometheusagents and for rules, it needs to accept thanosrulers too). I don't think that it's worth duplicating the structure only for this difference.

@yp969803
Copy link
Contributor

ok, then ! @heliapb also change the comments whenever necessary in the structs to include PrometheusRule as config and thanosruler as workload

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.

3 participants