api icon indicating copy to clipboard operation
api copied to clipboard

MON-4031: Add prometheusOperatorConfig API

Open marioferh opened this issue 5 months ago โ€ข 10 comments

marioferh avatar Sep 17 '25 11:09 marioferh

Hello @marioferh! Some important instructions when contributing to openshift/api: API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

openshift-ci[bot] avatar Sep 17 '25 11:09 openshift-ci[bot]

/assign

everettraven avatar Sep 17 '25 11:09 everettraven

@marioferh: This pull request references MON-4031 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.21.0" version, but no target version was set.

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

openshift-ci-robot avatar Sep 23 '25 07:09 openshift-ci-robot

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot avatar Dec 30 '25 01:12 openshift-bot

[!NOTE]

Reviews paused

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.
๐Ÿ“ Walkthrough

Walkthrough

Added a new public type PrometheusOperatorConfig in config/v1alpha1 and an optional PrometheusOperatorConfig field on ClusterMonitoringSpec. PrometheusOperatorConfig exposes logLevel, nodeSelector, resources, tolerations, and topologySpreadConstraints. Generated deepcopy, SwaggerDoc, and OpenAPI mappings were added for the new type and wired into ClusterMonitoringSpec. The ClusterMonitoring CRD payloads (CustomNoUpgrade, DevPreviewNoUpgrade, TechPreviewNoUpgrade) were updated to include the prometheusOperatorConfig property with detailed nested schema and validations. MetricsServerConfig also gained a topologySpreadConstraints field and several validation comment punctuations were normalized.

๐Ÿšฅ Pre-merge checks | โœ… 1 | โŒ 2
โŒ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage โš ๏ธ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check โ“ Inconclusive No pull request description was provided by the author. Without any descriptive text, the check cannot assess whether the description relates to the changeset. Provide a pull request description explaining the purpose, motivation, and key details of the PrometheusOperatorConfig API addition.
โœ… Passed checks (1 passed)
Check name Status Explanation
Title check โœ… Passed The title clearly describes the main change: adding a new prometheusOperatorConfig API, which is directly supported by the file changes showing introduction of PrometheusOperatorConfig type and related schema definitions.

โœ๏ธ Tip: You can configure your own custom pre-merge checks in the settings.

โœจ Finishing touches
๐Ÿงช Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

[!TIP]

๐Ÿงช Unit Test Generation v2 is now available!

We have significantly improved our unit test generation capabilities.

To enable: Add this to your .coderabbit.yaml configuration:

reviews:
  finishing_touches:
    unit_tests:
      enabled: true

Try it out by using the @coderabbitai generate unit tests command on your code files or under โœจ Finishing Touches on the walkthrough!

Have feedback? Share your thoughts on our Discord thread!


Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Dec 30 '25 01:12 coderabbitai[bot]

@marioferh When this PR is ready for another round of review, please remove the lifecycle/stale label and ping me for a review.

Thank you!

everettraven avatar Jan 08 '26 12:01 everettraven

/remove-lifecycle stale

marioferh avatar Jan 08 '26 14:01 marioferh

@marioferh When this PR is ready for another round of review, please remove the lifecycle/stale label and ping me for a review.

Thank you!

Done.

About this: https://github.com/openshift/api/pull/2481#discussion_r2391324182

I think current approach is the better one

marioferh avatar Jan 08 '26 14:01 marioferh

@CodeRabbit ignore

marioferh avatar Jan 28 '26 10:01 marioferh

โœ… Actions performed

Reviews paused.

coderabbitai[bot] avatar Jan 28 '26 10:01 coderabbitai[bot]

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters: /test e2e-aws-ovn /test e2e-aws-ovn-hypershift /test e2e-aws-ovn-hypershift-conformance /test e2e-aws-ovn-techpreview /test e2e-aws-serial-1of2 /test e2e-aws-serial-2of2 /test e2e-aws-serial-techpreview-1of2 /test e2e-aws-serial-techpreview-2of2 /test e2e-azure /test e2e-gcp /test e2e-upgrade /test e2e-upgrade-out-of-change

openshift-ci-robot avatar Jan 30 '26 13:01 openshift-ci-robot

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: everettraven

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

openshift-ci[bot] avatar Jan 30 '26 13:01 openshift-ci[bot]

@marioferh: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/okd-scos-e2e-aws-ovn fca22971f58e575bbe765b0c261f0777e4156393 link false /test okd-scos-e2e-aws-ovn

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

openshift-ci[bot] avatar Jan 30 '26 17:01 openshift-ci[bot]

/test e2e-aws-ovn-hypershift

marioferh avatar Feb 02 '26 07:02 marioferh

PR-Agent: could not fine a component named e2e-aws-ovn-hypershift in a supported language in this PR.

qodo-code-review[bot] avatar Feb 02 '26 07:02 qodo-code-review[bot]

The pending pipeline tests no longer exist and were sharded some time ago. The sharded versions of the tests are passing so this should be good to go.

/override ci/prow/e2e-aws-serial /override ci/prow/e2e-aws-serial-techpreview

everettraven avatar Feb 02 '26 13:02 everettraven

@everettraven: Overrode contexts on behalf of everettraven: ci/prow/e2e-aws-serial, ci/prow/e2e-aws-serial-techpreview

In response to this:

The pending pipeline tests no longer exist and were sharded some time ago. The sharded versions of the tests are passing so this should be good to go.

/override ci/prow/e2e-aws-serial /override ci/prow/e2e-aws-serial-techpreview

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

openshift-ci[bot] avatar Feb 02 '26 13:02 openshift-ci[bot]

The pending pipeline tests no longer exist and were sharded some time ago. The sharded versions of the tests are passing so this should be good to go.

/override ci/prow/e2e-aws-serial /override ci/prow/e2e-aws-serial-techpreview

thanks

marioferh avatar Feb 02 '26 13:02 marioferh

/verified by @juzhao

juzhao avatar Feb 05 '26 02:02 juzhao

@juzhao: This PR has been marked as verified by @juzhao.

In response to this:

/verified by @juzhao

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

openshift-ci-robot avatar Feb 05 '26 02:02 openshift-ci-robot

/retest-required

Remaining retests: 0 against base HEAD 0acc398c4ed3511a1b311c29283aed8c19071588 and 2 for PR HEAD fe0f7f815d18b880630006cd6dadb56f36e55a0b in total

openshift-ci-robot avatar Feb 05 '26 02:02 openshift-ci-robot