-
Notifications
You must be signed in to change notification settings - Fork 581
OCPBUGS-65819: fix ClusterMonitoring CRD plural name #2588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,13 +8,13 @@ metadata: | |
| include.release.openshift.io/ibm-cloud-managed: "true" | ||
| 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 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainCorrect 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 yamlLength 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 -10Length 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 -30Length 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 -30Length 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:
All other CRDs in 🤖 Prompt for AI Agents |
||
| spec: | ||
| group: config.openshift.io | ||
| names: | ||
| kind: ClusterMonitoring | ||
| listKind: ClusterMonitoringList | ||
| plural: clustermonitoring | ||
| plural: clustermonitorings | ||
| singular: clustermonitoring | ||
| scope: Cluster | ||
| versions: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.