-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
4.20, 4.21
-
None
-
None
-
False
-
-
2
-
None
-
None
-
None
-
None
-
MON Sprint 279
-
1
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Description of problem:
The ClusterMonitoring CRD in config/v1alpha1 uses an incorrect singular resource path in its kubebuilder annotation, causing client-go generation issues and test failures. The annotation uses "clustermonitoring" (singular) instead of "clustermonitorings" (plural), violating Kubernetes API conventions.
Version-Release number of selected component (if applicable):
OpenShift API repository - config/v1alpha1/types_cluster_monitoring.go
How reproducible:
Always
Steps to Reproduce:
1. Examine config/v1alpha1/types_cluster_monitoring.go kubebuilder annotation 2. Run make update-codegen-crds to generate CRD manifests 3. Run make integration to execute test suite 4. Observe test failures due to CRD name mismatches between generated manifests and test fixtures
Actual results:
- kubebuilder annotation uses: +kubebuilder:resource:path=clustermonitoring (singular) - Integration tests fail with "missing CRD files" errors - Generated CRD manifests use plural names but test files reference singular names - Client-go generated code uses incorrect endpoint paths
Expected results:
- kubebuilder annotation should use: +kubebuilder:resource:path=clustermonitorings (plural) - Integration tests should pass - CRD manifests and test files should use consistent plural naming - Client-go should generate correct plural endpoint paths following Kubernetes conventions
Additional info:
Fix requires both automated regeneration (CRDs, OpenAPI) and manual updates (test directory names, crdName fields in test fixtures). The test framework intentionally keeps test files semi-manual, so kubebuilder resource path changes require manual synchronization of test suite files. Root cause: Lack of automated validation to ensure kubebuilder resource paths match test file crdName references.