Skip to content

Conversation

@danielmellado
Copy link

the ClusterMonitoring CRD kubebuilder annotation incorrectly
specified path=clustermonitoring (singular) instead of the
conventional plural form clustermonitorings.

this caused a mismatch with client-go generated code which
expects the plural form for list/watch operations, resulting
in 'resource not found' errors when the controller attempted
to watch ClusterMonitoring resources.

fixes the kubebuilder:resource annotation to use the correct
plural path=clustermonitorings.

Signed-off-by: Daniel Mellado [email protected]

@openshift-ci-robot
Copy link

Pipeline controller notification
This repository 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. Review these jobs and use /test <job> to manually trigger optional jobs most likely to be impacted by the proposed changes.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 19, 2025

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

coderabbitai bot commented Nov 19, 2025

Walkthrough

Renames the ClusterMonitoring API resource plural from clustermonitoring to clustermonitorings (Kubebuilder marker and generated/payload CRD manifests), updates test references, and applies a large OpenAPI schema update with expanded descriptions, enums, and validation details.

Changes

Cohort / File(s) Summary
Source marker
config/v1alpha1/types_cluster_monitoring.go
Changes Kubebuilder resource marker path from clustermonitoring to clustermonitorings.
Generated CRD manifests
config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings-CustomNoUpgrade.crd.yaml, config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings-DevPreviewNoUpgrade.crd.yaml, config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings-TechPreviewNoUpgrade.crd.yaml
Updates CRD metadata.name from clustermonitoring.config.openshift.io to clustermonitorings.config.openshift.io and spec.names.plural from clustermonitoring to clustermonitorings. Other CRD fields preserved.
Feature-gated CRD manifests
config/v1alpha1/zz_generated.featuregated-crd-manifests.yaml, config/v1alpha1/zz_generated.featuregated-crd-manifests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml
Renames top-level CRD keys and updates CRDName / PluralName entries and contained CRD definition names/plurals to clustermonitorings.
Payload CRD manifests
payload-manifests/crds/0000_10_config-operator_01_clustermonitorings-CustomNoUpgrade.crd.yaml, payload-manifests/crds/0000_10_config-operator_01_clustermonitorings-DevPreviewNoUpgrade.crd.yaml, payload-manifests/crds/0000_10_config-operator_01_clustermonitorings-TechPreviewNoUpgrade.crd.yaml
Mirrors generated CRD changes: metadata.name and spec.names.plural updated to clustermonitorings.
Tests / Test manifests
config/v1alpha1/tests/clustermonitorings.config.openshift.io/AAA_ungated.yaml, config/v1alpha1/tests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml
Updates test CRD references (crdName / metadata) from clustermonitoring.config.openshift.io to clustermonitorings.config.openshift.io.
OpenAPI schema
openapi/openapi.json
Large schema expansions and clarifications across many API schemas (ingress, DNS, network, storage, operator types, security, etc.): added descriptions, enums, defaults, constraints, and nested definitions; no behavioral control-flow changes indicated.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Heterogeneous changes: marker rename plus many generated and payload CRD files and a large, dense openapi/openapi.json update.
  • Review focus:
    • Ensure CRD name/plural renames are consistent across generated, payload, and test manifests and any internal references.
    • Verify upgrade/compatibility implications of changing CRD metadata.name.
    • Inspect openapi/openapi.json for unintended breaking changes, schema regressions, or formatting issues.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.5.0)

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 and usage tips.

@openshift-ci openshift-ci bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 19, 2025
Copy link

@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.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 19, 2025
@danielmellado danielmellado force-pushed the fix-clustermonitoring-plural branch from 669b712 to b307806 Compare November 19, 2025 13:51
@openshift-ci openshift-ci bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 19, 2025
@jan--f
Copy link
Contributor

jan--f commented Nov 19, 2025

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 19, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 669b712 and b307806.

📒 Files selected for processing (10)
  • config/v1alpha1/types_cluster_monitoring.go (1 hunks)
  • config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings-CustomNoUpgrade.crd.yaml (1 hunks)
  • config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings-DevPreviewNoUpgrade.crd.yaml (1 hunks)
  • config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings-TechPreviewNoUpgrade.crd.yaml (1 hunks)
  • config/v1alpha1/zz_generated.featuregated-crd-manifests.yaml (2 hunks)
  • config/v1alpha1/zz_generated.featuregated-crd-manifests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml (1 hunks)
  • openapi/openapi.json (5 hunks)
  • payload-manifests/crds/0000_10_config-operator_01_clustermonitorings-CustomNoUpgrade.crd.yaml (1 hunks)
  • payload-manifests/crds/0000_10_config-operator_01_clustermonitorings-DevPreviewNoUpgrade.crd.yaml (1 hunks)
  • payload-manifests/crds/0000_10_config-operator_01_clustermonitorings-TechPreviewNoUpgrade.crd.yaml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • openapi/openapi.json
🚧 Files skipped from review as they are similar to previous changes (2)
  • config/v1alpha1/types_cluster_monitoring.go
  • config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings-DevPreviewNoUpgrade.crd.yaml
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings-TechPreviewNoUpgrade.crd.yaml
  • config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings-CustomNoUpgrade.crd.yaml
  • config/v1alpha1/zz_generated.featuregated-crd-manifests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml
  • payload-manifests/crds/0000_10_config-operator_01_clustermonitorings-CustomNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_clustermonitorings-DevPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_clustermonitorings-TechPreviewNoUpgrade.crd.yaml
  • config/v1alpha1/zz_generated.featuregated-crd-manifests.yaml
🔇 Additional comments (5)
payload-manifests/crds/0000_10_config-operator_01_clustermonitorings-DevPreviewNoUpgrade.crd.yaml (1)

11-11: LGTM; matches the corrected GVR. Please also confirm no stale singular references remain.

Same upgrade consistency checks apply as in the TechPreview CRD comment. If helpful, reuse the provided repo scan script to ensure there’s no leftover clustermonitoring.* or plural: clustermonitoring.

Also applies to: 17-17

payload-manifests/crds/0000_10_config-operator_01_clustermonitorings-CustomNoUpgrade.crd.yaml (1)

11-11: Consistent, correct pluralization; finalize by confirming upgrade path.

Approve the change. Please ensure:

  • Old CRD name is removed from payloads to prevent duplicate CRD registration.
  • Any RBAC or client usage in downstream operators references resource “clustermonitorings”.

I can help prep a checklist/notes if needed.

Also applies to: 17-17

config/v1alpha1/zz_generated.featuregated-crd-manifests.yaml (1)

48-65: Rename migration verified as complete.

Verification confirms the old singular clustermonitoring.config.openshift.io entry is not present in the manifest. The rename to clustermonitorings.config.openshift.io (plural) is complete, and related fields (CRDName, PluralName) are correctly updated. No duplicate registration risk.

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

11-11: CRD integration verified across aggregator and consumers.

Verification confirms the CRD is properly integrated: the aggregator file correctly references clustermonitorings.config.openshift.io (lines 48, 52), and the plural resource clustermonitorings is consistently used across all payload manifests, the aggregator index, and the kubebuilder annotation. No issues found.

config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings-CustomNoUpgrade.crd.yaml (1)

11-11: Generated manifest pluralization verified across all CRD variants.

Verification confirms:

  • All 3 CRD variants (Custom, Dev, Tech preview) present in both config/v1alpha1 and payload-manifests
  • metadata.name identical: clustermonitorings.config.openshift.io (line 11)
  • spec.names.plural identical: clustermonitorings (line 17)
  • No singular artifacts remain

include.release.openshift.io/self-managed-high-availability: "true"
release.openshift.io/feature-set: TechPreviewNoUpgrade
name: clustermonitoring.config.openshift.io
name: clustermonitorings.config.openshift.io
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

Correct pluralization fix; verify cleanup of the old CRD and references.

Change looks right. Please ensure the previous CRD name/plural aren’t lingering anywhere (payload, generated, RBAC, controllers) to avoid dueling CRDs or broken watches.

Run from repo root:

If the singular-named CRD ever shipped, add an upgrade note and a one-time manifest to delete clustermonitoring.config.openshift.io or a migration playbook.

Also applies to: 17-17


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "1) Leftovers of old CRD name/plural/path"
rg -nP 'clustermonitoring\.config\.openshift\.io\b|plural:\s*clustermonitoring\b|kubebuilder:resource.*\bpath=clustermonitoring\b' || true

echo "2) Any payload CRD files still using singular in filename"
fd -a -p '0000_10_config-operator_01_*clustermonitoring*.crd.yaml' payload-manifests config/v1alpha1 || true

echo "3) Kubebuilder marker now pluralized"
rg -nP 'kubebuilder:resource.*\bpath=clustermonitorings\b' config/v1alpha1/types_cluster_monitoring.go

echo "4) RBAC rules use new resource name"
rg -nP '\bresources:\s*(\[[^\]]*\bclustermonitorings\b[^\]]*\]|.*\bclustermonitorings\b)' -g '!**/vendor/**' -t yaml

Length of output: 503



🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Check test file content and purpose ==="
cat config/v1alpha1/tests/clustermonitorings.config.openshift.io/AAA_ungated.yaml | head -10

echo ""
echo "=== Look for ClusterRole/Role RBAC files ==="
fd -t f '\.(yaml|yml)$' -x grep -l 'kind:\s*\(ClusterRole\|Role\)' {} \; | head -20

echo ""
echo "=== Search for RBAC rules referencing 'clustermonitoring' or 'clustermonitorings' ==="
rg -nP 'resources:.*\bclustermonitoring' -t yaml -g '!**/vendor/**' -g '!**/test/**' || echo "No direct RBAC references found"

echo ""
echo "=== Check if there are other test fixture files with similar structure ==="
fd -t f 'config/v1alpha1/tests/' -x grep -l 'crdName:' {} \; | head -10

Length of output: 153



🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Search for any file containing 'crdName: clustermonitoring' ==="
rg -l 'crdName:\s*clustermonitoring\.config\.openshift\.io' -t yaml || echo "No matches found"

echo ""
echo "=== List all yaml files in config/v1alpha1/tests/ if it exists ==="
if [ -d "config/v1alpha1/tests" ]; then
  find config/v1alpha1/tests -type f -name "*.yaml" -o -name "*.yml" | head -20
else
  echo "Directory config/v1alpha1/tests does not exist"
fi

echo ""
echo "=== Search for clustermonitoring in config directory broadly ==="
rg 'crdName.*clustermonitoring' -t yaml config/ --max-count=5 || echo "No crdName matches in config/"

echo ""
echo "=== Check payload-manifests CRD file ==="
fd 'clustermonitorings.*\.crd\.yaml' payload-manifests -x cat {} \; | head -30

Length of output: 2649



🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Content of AAA_ungated.yaml ==="
cat config/v1alpha1/tests/clustermonitorings.config.openshift.io/AAA_ungated.yaml

echo ""
echo "=== Content of ClusterMonitoringConfig.yaml ==="
cat config/v1alpha1/tests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml

echo ""
echo "=== Check if these test files have a pattern across other CRDs ==="
rg -A2 'crdName:' config/v1alpha1/tests/ -t yaml | head -30

Length of output: 16756


Update test fixture files with correct (plural) CRD name.

The pluralization fix in the payload CRD is correct, but two validation test fixture files still reference the old singular CRD name. Verify and update:

  • config/v1alpha1/tests/clustermonitorings.config.openshift.io/AAA_ungated.yaml: change crdName: clustermonitoring.config.openshift.io to crdName: clustermonitorings.config.openshift.io
  • config/v1alpha1/tests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml: change crdName: clustermonitoring.config.openshift.io to crdName: clustermonitorings.config.openshift.io

All other CRDs in config/v1alpha1/tests/ correctly use the plural form in their test fixtures. This inconsistency may cause the validation tests to fail or use the wrong CRD schema.

🤖 Prompt for AI Agents
In
payload-manifests/crds/0000_10_config-operator_01_clustermonitorings-TechPreviewNoUpgrade.crd.yaml
around line 11 and the related test fixtures, update the two test fixture files
that still reference the old singular CRD name: open
config/v1alpha1/tests/clustermonitorings.config.openshift.io/AAA_ungated.yaml
and
config/v1alpha1/tests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml
and change the crdName value from "clustermonitoring.config.openshift.io" to the
correct plural "clustermonitorings.config.openshift.io" so they match the CRD
plural name used in the payload.

@openshift-ci-robot
Copy link

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

openshift-ci bot commented Nov 19, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jan--f, simonpasquier
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.

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

the ClusterMonitoring CRD kubebuilder annotation incorrectly
specified path=clustermonitoring (singular) instead of the
conventional plural form clustermonitorings.

this caused a mismatch with client-go generated code which
expects the plural form for list/watch operations, resulting
in 'resource not found' errors when the controller attempted
to watch ClusterMonitoring resources.

fixes the kubebuilder:resource annotation to use the correct
plural path=clustermonitorings.

Signed-off-by: Daniel Mellado <[email protected]>
@danielmellado danielmellado force-pushed the fix-clustermonitoring-plural branch from b307806 to 975f565 Compare November 19, 2025 14:37
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 19, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 19, 2025

New changes are detected. LGTM label has been removed.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (1)
payload-manifests/crds/0000_10_config-operator_01_clustermonitorings-DevPreviewNoUpgrade.crd.yaml (1)

11-18: DevPreviewNoUpgrade CRD rename mirrors CustomNoUpgrade manifest

This manifest carries the same CRD name/plural rename as the CustomNoUpgrade variant; the consistency is good, and the same upgrade/cleanup considerations noted there apply here as well.

🧹 Nitpick comments (1)
payload-manifests/crds/0000_10_config-operator_01_clustermonitorings-CustomNoUpgrade.crd.yaml (1)

11-18: CRD rename is consistent; please confirm upgrade/cleanup behavior

The metadata.name and spec.names.plural updates to clustermonitorings.config.openshift.io / clustermonitorings are consistent with the Go type and other manifests. Since this effectively renames the CRD, please double-check with release/upgrade owners whether any existing clusters could already have clustermonitoring.config.openshift.io installed and, if so, whether an explicit cleanup or migration of the old CRD/CRs is required.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between b307806 and 975f565.

📒 Files selected for processing (12)
  • config/v1alpha1/tests/clustermonitorings.config.openshift.io/AAA_ungated.yaml (1 hunks)
  • config/v1alpha1/tests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml (1 hunks)
  • config/v1alpha1/types_cluster_monitoring.go (1 hunks)
  • config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings-CustomNoUpgrade.crd.yaml (1 hunks)
  • config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings-DevPreviewNoUpgrade.crd.yaml (1 hunks)
  • config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings-TechPreviewNoUpgrade.crd.yaml (1 hunks)
  • config/v1alpha1/zz_generated.featuregated-crd-manifests.yaml (2 hunks)
  • config/v1alpha1/zz_generated.featuregated-crd-manifests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml (1 hunks)
  • openapi/openapi.json (5 hunks)
  • payload-manifests/crds/0000_10_config-operator_01_clustermonitorings-CustomNoUpgrade.crd.yaml (1 hunks)
  • payload-manifests/crds/0000_10_config-operator_01_clustermonitorings-DevPreviewNoUpgrade.crd.yaml (1 hunks)
  • payload-manifests/crds/0000_10_config-operator_01_clustermonitorings-TechPreviewNoUpgrade.crd.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings-CustomNoUpgrade.crd.yaml
  • config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings-TechPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_clustermonitorings-TechPreviewNoUpgrade.crd.yaml
  • config/v1alpha1/zz_generated.featuregated-crd-manifests.yaml
  • config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings-DevPreviewNoUpgrade.crd.yaml
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • config/v1alpha1/tests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml
  • payload-manifests/crds/0000_10_config-operator_01_clustermonitorings-DevPreviewNoUpgrade.crd.yaml
  • config/v1alpha1/zz_generated.featuregated-crd-manifests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml
  • config/v1alpha1/types_cluster_monitoring.go
  • config/v1alpha1/tests/clustermonitorings.config.openshift.io/AAA_ungated.yaml
  • openapi/openapi.json
  • payload-manifests/crds/0000_10_config-operator_01_clustermonitorings-CustomNoUpgrade.crd.yaml
🔇 Additional comments (5)
openapi/openapi.json (1)

4783-4789: Auto-generated OpenAPI schema updates appear consistent and well-structured.

The changes across all five hunks add comprehensive documentation and explicit enum validation for the dnsRecordsType field. The description clearly enumerates allowed values (Internal, External, omitted) with detailed behavior explanations, and the enum array properly constrains the values. The descriptions and enum values are consistently aligned.

However, these changes appear to be auto-generated from source annotations (likely Go struct tags or Kubebuilder markers in the actual API types). Verify that:

  1. This openapi/openapi.json is regenerated from source and not manually edited.
  2. The underlying source (likely in config/v1alpha1/types.go or similar) has been updated to include these documentation enhancements.

The PR description mentions fixing ClusterMonitoring CRD plural naming, but the visible hunks only show dnsRecordsType schema updates—ensure the broader PR changes (if any to ClusterMonitoring itself) are reflected correctly in the schema.

Also applies to: 8936-8942, 9554-9560, 9752-9758, 11671-11677

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

11-18: Feature-gated CRD name and plural are consistent with the Go type

metadata.name and spec.names.plural now use clustermonitorings, matching the kubebuilder marker and keeping the feature-gated CRD aligned with the runtime resource path.

config/v1alpha1/tests/clustermonitorings.config.openshift.io/AAA_ungated.yaml (1)

3-3: Ungated test now references the correct CRD name

Updating crdName to clustermonitorings.config.openshift.io keeps this test aligned with the renamed ClusterMonitoring CRD.

config/v1alpha1/tests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml (1)

3-3: Feature-gated test CRD reference updated to new identifier

crdName now matches clustermonitorings.config.openshift.io, keeping these validation tests in sync with the CRD rename.

config/v1alpha1/types_cluster_monitoring.go (1)

35-37: Pluralized kubebuilder resource path aligns with CRD definition

Changing the kubebuilder resource marker to path=clustermonitorings correctly aligns with the CRD names.plural field. Verification confirms the expected structure: CRD manifests properly define both the singular form and plural form, with the plural used for resource API paths. This change resolves the client-go resource path mismatch without introducing any unintended references or breaking changes.

@danielmellado
Copy link
Author

/retitle OCPBUGS-65819: fix ClusterMonitoring CRD plural name

@openshift-ci openshift-ci bot changed the title config/v1alpha1: fix ClusterMonitoring CRD plural name OCPBUGS-65819: fix ClusterMonitoring CRD plural name Nov 20, 2025
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Nov 20, 2025
@openshift-ci-robot
Copy link

@danielmellado: This pull request references Jira Issue OCPBUGS-65819, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.21.0) matches configured target version for branch (4.21.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @juzhao

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

the ClusterMonitoring CRD kubebuilder annotation incorrectly
specified path=clustermonitoring (singular) instead of the
conventional plural form clustermonitorings.

this caused a mismatch with client-go generated code which
expects the plural form for list/watch operations, resulting
in 'resource not found' errors when the controller attempted
to watch ClusterMonitoring resources.

fixes the kubebuilder:resource annotation to use the correct
plural path=clustermonitorings.

Signed-off-by: Daniel Mellado [email protected]

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 openshift-ci bot requested a review from juzhao November 20, 2025 10:12
@danielmellado
Copy link
Author

@everettraven @JoelSpeed not sure if the CI got stuck or if you'd need to somehow ok-to-test this. Could you PTAL whenever you get some cycles? Thanks!

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

Labels

jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants