Skip to content

MON-4609 - Add configurationSource selector to ClusterMonitoring API.#2938

Open
marioferh wants to merge 1 commit into
openshift:masterfrom
marioferh:phase_2_selector_crd_configmap
Open

MON-4609 - Add configurationSource selector to ClusterMonitoring API.#2938
marioferh wants to merge 1 commit into
openshift:masterfrom
marioferh:phase_2_selector_crd_configmap

Conversation

@marioferh

Copy link
Copy Markdown
Contributor

Allow choosing between the cluster-monitoring-config ConfigMap and the ClusterMonitoring CRD as the configuration source, defaulting to CRD.

Allow choosing between the cluster-monitoring-config ConfigMap and the
ClusterMonitoring CRD as the configuration source, defaulting to CRD.

Co-authored-by: Cursor <cursoragent@cursor.com>
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci

openshift-ci Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

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.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: c187a9f6-c116-4f57-8165-51af871cf8ab

📥 Commits

Reviewing files that changed from the base of the PR and between 72066cc and 96752c7.

⛔ Files ignored due to path filters (5)
  • config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1alpha1/zz_generated.featuregated-crd-manifests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • config/v1alpha1/zz_generated.swagger_doc_generated.go is excluded by !**/zz_generated*
  • openapi/generated_openapi/zz_generated.openapi.go is excluded by !openapi/**, !**/zz_generated*
  • openapi/openapi.json is excluded by !openapi/**
📒 Files selected for processing (3)
  • config/v1alpha1/tests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml
  • config/v1alpha1/types_cluster_monitoring.go
  • payload-manifests/crds/0000_10_config-operator_01_clustermonitorings.crd.yaml

📝 Walkthrough

Walkthrough

Adds an optional spec.configurationSource field to ClusterMonitoringSpec, with ConfigMap and CRD enum values. Updates the ClusterMonitoring CRD schema to document the field and its default behavior. Adds validation tests covering both supported values and rejection of Invalid.

Suggested reviewers: danielmellado

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change by adding a configurationSource selector to the ClusterMonitoring API.
Description check ✅ Passed The description is directly related to the change and accurately describes the new configuration source selection behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The added test names are static descriptive strings; no dynamic values or unstable identifiers appear in the new YAML test cases.
Test Structure And Quality ✅ Passed The new ClusterMonitoring YAML tests are single-purpose, follow the existing onCreate validation pattern, and don't introduce unmanaged cluster resources or timeout-free waits.
Microshift Test Compatibility ✅ Passed Changed files are YAML validation/schema updates and type/CRD code; no new Ginkgo It/Describe/Context specs or MicroShift-sensitive API use found.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The added YAML cases only validate API enum acceptance/rejection; they aren’t Ginkgo e2e tests and make no multi-node or HA assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed Only API/schema/test updates for configurationSource; no deployment manifests, replicas, affinities, node selectors, or topology assumptions were added.
Ote Binary Stdout Contract ✅ Passed Changed files are API/type/schema artifacts only; no main/init/TestMain/suite setup or stdout logging was found.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed New cases only validate configurationSource enum handling; no IPv4 literals, host/IP parsing, or external connectivity were added.
No-Weak-Crypto ✅ Passed The patch only adds a configurationSource enum, validation, and tests; no weak crypto, custom crypto, or secret/token comparisons were introduced.
Container-Privileges ✅ Passed The PR only adds a configurationSource enum plus validation tests; no privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, or allowPrivilegeEscalation settings were added.
No-Sensitive-Data-In-Logs ✅ Passed PR only adds schema/docs/tests for configurationSource; no runtime logging calls or sensitive-data log statements appear in the changed files.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

Error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented
The command is terminated due to an error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented


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

@openshift-ci openshift-ci Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 17, 2026
@openshift-ci
openshift-ci Bot requested review from JoelSpeed and everettraven July 17, 2026 11:08
@openshift-ci

openshift-ci Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign everettraven for approval. For more information see the Code Review Process.

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

Details 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

openshift-ci Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

@marioferh: The following tests 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/verify-hypershift-integration 96752c7 link true /test verify-hypershift-integration
ci/prow/lint 96752c7 link true /test lint

Full PR test history. Your PR dashboard.

Details

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.

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

Labels

size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant