Skip to content

MON-4616: add support for dmmultipath collector#2956

Open
simonpasquier wants to merge 1 commit into
openshift:masterfrom
simonpasquier:MON-4616
Open

MON-4616: add support for dmmultipath collector#2956
simonpasquier wants to merge 1 commit into
openshift:masterfrom
simonpasquier:MON-4616

Conversation

@simonpasquier

Copy link
Copy Markdown

No description provided.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 27, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 27, 2026

Copy link
Copy Markdown

@simonpasquier: This pull request references MON-4616 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 story to target the "5.0.0" version, but no target version was set.

Details

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-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 27, 2026

Copy link
Copy Markdown
Contributor

Hello @simonpasquier! 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 27, 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: 5a6278da-eeb5-45e0-a810-22f8273099f7

📥 Commits

Reviewing files that changed from the base of the PR and between 9bcaa16 and aff0f29.

⛔ Files ignored due to path filters (7)
  • 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.deepcopy.go is excluded by !**/zz_generated*
  • 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.model_name.go is excluded by !**/zz_generated*
  • 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 (2)
  • config/v1alpha1/types_cluster_monitoring.go
  • payload-manifests/crds/0000_10_config-operator_01_clustermonitorings.crd.yaml

📝 Walkthrough

Walkthrough

Adds an optional deviceMapperMultipath collector configuration to NodeExporterCollectorConfig, with a collectionPolicy field that accepts Collect or DoNotCollect. The collector defaults to enabled. The corresponding ClusterMonitoring CRD schema now exposes this configuration and requires the collection policy.

Possibly related PRs

  • openshift/api#2948: Adds another NodeExporterCollectorConfig collector field and corresponding collectionPolicy configuration to the same API and CRD.
🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No author description was provided, so there is nothing meaningful to assess. Add a brief description of the change and its purpose so the PR context is explicit.
✅ Passed checks (14 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: adding support for the dmmultipath collector.
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 No test files or Ginkgo titles were added/changed; the PR only updates config and generated schema for dmmultipath.
Test Structure And Quality ✅ Passed No Ginkgo test files were changed; the PR only updates config/CRD generation, so the test-quality check is not applicable.
Microshift Test Compatibility ✅ Passed PR only adds API/CRD schema for dmmultipath; no Ginkgo tests or MicroShift-unsafe runtime assumptions were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo/e2e tests were added; the PR only changes config/CRD schemas for the dmmultipath collector.
Topology-Aware Scheduling Compatibility ✅ Passed Only added a node-exporter collector config/CRD schema; no nodeSelector, affinity, toleration, spread, or replica changes.
Ote Binary Stdout Contract ✅ Passed PASS — the PR only adds API types/CRD schema and generated docs; no main/init/TestMain or stdout logging was added to process-level code.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo/e2e tests were added; the PR only updates config types and generated CRD/openapi artifacts.
No-Weak-Crypto ✅ Passed The patch only adds node-exporter collector schema/docs; diff scan found no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB or secret-comparison code.
Container-Privileges ✅ Passed The changes only add node-exporter CRD/schema fields; no container manifests or privileged/hostNetwork/allowPrivilegeEscalation settings appear in the touched files.
No-Sensitive-Data-In-Logs ✅ Passed Changed files only add CRD/type schema for dmmultipath; no new log statements or sensitive data found in the patch.
✨ 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 27, 2026
@qodo-for-rh-openshift

Copy link
Copy Markdown

PR Summary by Qodo

Add ClusterMonitoringConfig API for node-exporter dmmultipath collector

✨ Enhancement ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Add deviceMapperMultipath collector configuration to ClusterMonitoringConfig node-exporter
 settings.
• Regenerate CRD and OpenAPI schemas to expose the new collector toggle.
• Update generated deepcopy and swagger docs for the new API type.
Diagram

graph TD
  admin["Admin"] --> cmc["ClusterMonitoringConfig CR"] --> op(["Monitoring Operator"]) --> ne(["node-exporter"])
  types["Go API types"] --> crd["Generated CRD"] --> k8s[("K8s API") ] --> cmc
  types --> openapi["OpenAPI spec"] --> cmc

  subgraph Legend
    direction LR
    _cfg["Schema/Config"] ~~~ _svc(["Service/Agent"]) ~~~ _api[("API")]
  end
Loading
High-Level Assessment

The PR follows the established pattern for adding node-exporter collector toggles: extend the v1alpha1 type and regenerate CRD/OpenAPI/deepcopy/swagger artifacts. No meaningfully better approach is apparent without a broader redesign of collector configuration modeling.

Files changed (9) +184 / -13

Enhancement (1) +21 / -0
types_cluster_monitoring.goAdd deviceMapperMultipath collector API to NodeExporterCollectorConfig +21/-0

Add deviceMapperMultipath collector API to NodeExporterCollectorConfig

• Introduces the optional deviceMapperMultipath field under node-exporter collector configuration and defines NodeExporterCollectorDeviceMapperMultipathConfig with a required collectionPolicy (Collect/DoNotCollect). Documents that the platform default is currently enabled when omitted.

config/v1alpha1/types_cluster_monitoring.go

Documentation (2) +44 / -12
zz_generated.swagger_doc_generated.goAdd swagger docs for deviceMapperMultipath collector and its config type +22/-12

Add swagger docs for deviceMapperMultipath collector and its config type

• Extends NodeExporterCollectorConfig SwaggerDoc map with a deviceMapperMultipath entry and adds SwaggerDoc output for NodeExporterCollectorDeviceMapperMultipathConfig.

config/v1alpha1/zz_generated.swagger_doc_generated.go

openapi.jsonPublish deviceMapperMultipath in JSON OpenAPI spec +22/-0

Publish deviceMapperMultipath in JSON OpenAPI spec

• Adds the deviceMapperMultipath property to the NodeExporterCollectorConfig definition and introduces a new definition for NodeExporterCollectorDeviceMapperMultipathConfig with required collectionPolicy.

openapi/openapi.json

Other (6) +119 / -1
0000_10_config-operator_01_clustermonitorings.crd.yamlExpose deviceMapperMultipath in generated ClusterMonitoringConfig CRD schema +22/-0

Expose deviceMapperMultipath in generated ClusterMonitoringConfig CRD schema

• Adds the deviceMapperMultipath object schema and required collectionPolicy enum to the CRD manifest so the new API is validated server-side.

config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings.crd.yaml

zz_generated.deepcopy.goRegenerate deepcopy functions for deviceMapperMultipath config +17/-0

Regenerate deepcopy functions for deviceMapperMultipath config

• Updates NodeExporterCollectorConfig DeepCopyInto to include DeviceMapperMultipath and adds autogenerated DeepCopy/DeepCopyInto methods for the new config struct.

config/v1alpha1/zz_generated.deepcopy.go

ClusterMonitoringConfig.yamlUpdate featuregated CRD manifest with deviceMapperMultipath schema +22/-0

Update featuregated CRD manifest with deviceMapperMultipath schema

• Mirrors the deviceMapperMultipath schema addition (including collectionPolicy enum and required field) in the featuregated CRD manifest output.

config/v1alpha1/zz_generated.featuregated-crd-manifests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml

zz_generated.model_name.goRegister OpenAPI model name for deviceMapperMultipath config +5/-0

Register OpenAPI model name for deviceMapperMultipath config

• Adds OpenAPIModelName() for NodeExporterCollectorDeviceMapperMultipathConfig so OpenAPI generation can reference the type.

config/v1alpha1/zz_generated.model_name.go

zz_generated.openapi.goAdd OpenAPI schema definition for deviceMapperMultipath collector config +31/-1

Add OpenAPI schema definition for deviceMapperMultipath collector config

• Registers NodeExporterCollectorDeviceMapperMultipathConfig in the OpenAPI definitions map, adds the new property to NodeExporterCollectorConfig schema, and emits a dedicated schema generator function including required collectionPolicy enum.

openapi/generated_openapi/zz_generated.openapi.go

0000_10_config-operator_01_clustermonitorings.crd.yamlUpdate shipped CRD payload with deviceMapperMultipath schema +22/-0

Update shipped CRD payload with deviceMapperMultipath schema

• Updates the payload CRD manifest to include deviceMapperMultipath and its collectionPolicy validation so clusters receive the new API via the delivered CRD.

payload-manifests/crds/0000_10_config-operator_01_clustermonitorings.crd.yaml

@qodo-for-rh-openshift

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Qodo Logo

@openshift-ci
openshift-ci Bot requested review from JoelSpeed and everettraven July 27, 2026 08:48
@openshift-ci

openshift-ci Bot commented Jul 27, 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 deads2k 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

@simonpasquier

Copy link
Copy Markdown
Author

/test verify-hypershift-integration

@qodo-for-rh-openshift

qodo-for-rh-openshift Bot commented Jul 27, 2026

Copy link
Copy Markdown

PR-Agent: could not find a component named verify-hypershift-integration in a supported language in this PR.

@openshift-ci

openshift-ci Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

@simonpasquier: 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/verify-hypershift-integration aff0f29 link true /test verify-hypershift-integration

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

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. 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.

2 participants