Skip to content

Remove NodeSelector and Tolerations from NodeExporterConfig#2837

Open
danielmellado wants to merge 1 commit into
openshift:masterfrom
danielmellado:mon_crd_remove_nodeexporter_scheduling
Open

Remove NodeSelector and Tolerations from NodeExporterConfig#2837
danielmellado wants to merge 1 commit into
openshift:masterfrom
danielmellado:mon_crd_remove_nodeexporter_scheduling

Conversation

@danielmellado
Copy link
Copy Markdown
Contributor

@danielmellado danielmellado commented May 7, 2026

Node-exporter runs as a DaemonSet that must run on all nodes, so
nodeSelector and tolerations fields are not meaningful for it.

This PR removesthese fields from the CRD API along with their
associated tests.

Signed-off-by: Daniel Mellado dmellado@fedoraproject.org

@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
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 7, 2026

Hello @danielmellado! 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
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

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: 30f21226-1c42-4825-981e-3bfa623296ea

📥 Commits

Reviewing files that changed from the base of the PR and between 1f02d69 and 54cf5db.

⛔ 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.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.swagger_doc_generated.go is excluded by !**/zz_generated*
  • openapi/generated_openapi/zz_generated.openapi.go is excluded by !openapi/**, !**/zz_generated*
📒 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
💤 Files with no reviewable changes (2)
  • config/v1alpha1/tests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml
  • payload-manifests/crds/0000_10_config-operator_01_clustermonitorings.crd.yaml

📝 Walkthrough

Walkthrough

The NodeExporterConfig schema and tests were updated: nodeSelector and tolerations fields were removed from the Go type (left as reserved "TOMBSTONE" comments), tests adjusted to drop those fields from initial/expected payloads and to relocate a tolerations-related test, and remaining NodeExporterConfig tests for collectors and validation were retained. The ClusterMonitoring CRD descriptions were edited to update nodeExporterConfig.resources default request values and to state that tolerations defaults are empty/unset when omitted.

🚥 Pre-merge checks | ✅ 12
✅ Passed checks (12 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: removal of NodeSelector and Tolerations fields from NodeExporterConfig.
Description check ✅ Passed The description clearly explains the rationale and scope of changes: removing nodeSelector and tolerations fields from the CRD API and associated tests.
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 All test names are static and deterministic. No timestamps, UUIDs, pod/node names, or IPs found in test titles. NodeExporterConfig tests use descriptive names.
Test Structure And Quality ✅ Passed Framework meets all 5 requirements: single responsibility, cleanup, timeouts, assertion messages, consistency. PR correctly removes deleted field tests.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests added. PR contains YAML schema tests and Go struct changes. Check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e tests are added in this PR. The changes only modify CRD type definitions, test fixture YAML data, and manifest files. The custom check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR removes nodeSelector and tolerations from NodeExporterConfig. No topology-incompatible scheduling constraints introduced.
Ote Binary Stdout Contract ✅ Passed The PR modifies only configuration/type definition files and YAML schemas. No executable code, main/init functions, or stdout writes are present. Not applicable to OTE Binary Stdout Contract check.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This PR does not introduce any new Ginkgo e2e tests. It only modifies CRD definitions and YAML-based CEL validation tests, which are outside the scope of this check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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

@openshift-ci openshift-ci Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 7, 2026
@openshift-ci openshift-ci Bot requested review from JoelSpeed and everettraven May 7, 2026 13:57
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 7, 2026

[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

@danielmellado
Copy link
Copy Markdown
Contributor Author

@everettraven CI failures are expected as per the 'NoFieldRemoval', we'd need to override that, thanks in advance!

Comment thread config/v1alpha1/types_cluster_monitoring.go
Node-exporter runs as a DaemonSet that must run on all nodes, so
nodeSelector and tolerations fields are not meaningful for it.

This PR removesthese fields from the CRD API along with their
associated tests.

Signed-off-by: Daniel Mellado <dmellado@fedoraproject.org>
@danielmellado danielmellado force-pushed the mon_crd_remove_nodeexporter_scheduling branch from 1f02d69 to 54cf5db Compare May 12, 2026 07:38
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 12, 2026

@danielmellado: 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-crd-schema 54cf5db link true /test verify-crd-schema
ci/prow/verify 54cf5db link true /test verify
ci/prow/verify-crdify 54cf5db link true /test verify-crdify

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.

3 participants