Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "ClusterMonitoring"
crdName: clustermonitoring.config.openshift.io
crdName: clustermonitorings.config.openshift.io
tests:
onCreate:
- name: Should be able to create a minimal ClusterMonitoring
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "ClusterMonitoring"
crdName: clustermonitoring.config.openshift.io
crdName: clustermonitorings.config.openshift.io
featureGate: ClusterMonitoringConfig
tests:
onCreate:
Expand Down
2 changes: 1 addition & 1 deletion config/v1alpha1/types_cluster_monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1929
// +openshift:file-pattern=cvoRunLevel=0000_10,operatorName=config-operator,operatorOrdering=01
// +kubebuilder:object:root=true
// +kubebuilder:resource:path=clustermonitoring,scope=Cluster
// +kubebuilder:resource:path=clustermonitorings,scope=Cluster
// +kubebuilder:subresource:status
// +kubebuilder:metadata:annotations="description=Cluster Monitoring Operators configuration API"
// +openshift:enable:FeatureGate=ClusterMonitoringConfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: CustomNoUpgrade
name: clustermonitoring.config.openshift.io
name: clustermonitorings.config.openshift.io
spec:
group: config.openshift.io
names:
kind: ClusterMonitoring
listKind: ClusterMonitoringList
plural: clustermonitoring
plural: clustermonitorings
singular: clustermonitoring
scope: Cluster
versions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: DevPreviewNoUpgrade
name: clustermonitoring.config.openshift.io
name: clustermonitorings.config.openshift.io
spec:
group: config.openshift.io
names:
kind: ClusterMonitoring
listKind: ClusterMonitoringList
plural: clustermonitoring
plural: clustermonitorings
singular: clustermonitoring
scope: Cluster
versions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
spec:
group: config.openshift.io
names:
kind: ClusterMonitoring
listKind: ClusterMonitoringList
plural: clustermonitoring
plural: clustermonitorings
singular: clustermonitoring
scope: Cluster
versions:
Expand Down
6 changes: 3 additions & 3 deletions config/v1alpha1/zz_generated.featuregated-crd-manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ clusterimagepolicies.config.openshift.io:
- SigstoreImageVerification
Version: v1alpha1

clustermonitoring.config.openshift.io:
clustermonitorings.config.openshift.io:
Annotations:
description: Cluster Monitoring Operators configuration API
ApprovedPRNumber: https://github.com/openshift/api/pull/1929
CRDName: clustermonitoring.config.openshift.io
CRDName: clustermonitorings.config.openshift.io
Capability: ""
Category: ""
FeatureGates:
Expand All @@ -61,7 +61,7 @@ clustermonitoring.config.openshift.io:
HasStatus: true
KindName: ClusterMonitoring
Labels: {}
PluralName: clustermonitoring
PluralName: clustermonitorings
PrinterColumns: []
Scope: Cluster
ShortNames: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ metadata:
api.openshift.io/filename-ordering: "01"
description: Cluster Monitoring Operators configuration API
feature-gate.release.openshift.io/ClusterMonitoringConfig: "true"
name: clustermonitoring.config.openshift.io
name: clustermonitorings.config.openshift.io
spec:
group: config.openshift.io
names:
kind: ClusterMonitoring
listKind: ClusterMonitoringList
plural: clustermonitoring
plural: clustermonitorings
singular: clustermonitoring
scope: Cluster
versions:
Expand Down
40 changes: 30 additions & 10 deletions openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -4780,8 +4780,12 @@
"x-kubernetes-list-type": "atomic"
},
"dnsRecordsType": {
"description": "dnsRecordsType determines whether records for api, api-int, and ingress are provided by the internal DNS service or externally. Allowed values are `Internal`, `External`, and omitted. When set to `Internal`, records are provided by the internal infrastructure When set to `External`, records are not provided by the internal infrastructure and must be configured by the user. This value may only be set when a user-managed loadbalancer is configured. When omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. The current default is `Internal`.",
"type": "string"
"description": "dnsRecordsType determines whether records for api, api-int, and ingress are provided by the internal DNS service or externally. Allowed values are `Internal`, `External`, and omitted. When set to `Internal`, records are provided by the internal infrastructure and no additional user configuration is required for the cluster to function. When set to `External`, records are not provided by the internal infrastructure and must be configured by the user on a DNS server outside the cluster. Cluster nodes must use this external server for their upstream DNS requests. This value may only be set when loadBalancer.type is set to UserManaged. When omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. The current default is `Internal`.\n\nPossible enum values:\n - `\"External\"`\n - `\"Internal\"`",
"type": "string",
"enum": [
"External",
"Internal"
]
},
"ingressIP": {
"description": "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.\n\nDeprecated: Use IngressIPs instead.",
Expand Down Expand Up @@ -8929,8 +8933,12 @@
"x-kubernetes-list-type": "set"
},
"dnsRecordsType": {
"description": "dnsRecordsType determines whether records for api, api-int, and ingress are provided by the internal DNS service or externally. Allowed values are `Internal`, `External`, and omitted. When set to `Internal`, records are provided by the internal infrastructure When set to `External`, records are not provided by the internal infrastructure and must be configured by the user. This value may only be set when a user-managed loadbalancer is configured. When omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. The current default is `Internal`.",
"type": "string"
"description": "dnsRecordsType determines whether records for api, api-int, and ingress are provided by the internal DNS service or externally. Allowed values are `Internal`, `External`, and omitted. When set to `Internal`, records are provided by the internal infrastructure and no additional user configuration is required for the cluster to function. When set to `External`, records are not provided by the internal infrastructure and must be configured by the user on a DNS server outside the cluster. Cluster nodes must use this external server for their upstream DNS requests. This value may only be set when loadBalancer.type is set to UserManaged. When omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. The current default is `Internal`.\n\nPossible enum values:\n - `\"External\"`\n - `\"Internal\"`",
"type": "string",
"enum": [
"External",
"Internal"
]
},
"ingressIP": {
"description": "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.\n\nDeprecated: Use IngressIPs instead.",
Expand Down Expand Up @@ -9543,8 +9551,12 @@
"type": "string"
},
"dnsRecordsType": {
"description": "dnsRecordsType determines whether records for api, api-int, and ingress are provided by the internal DNS service or externally. Allowed values are `Internal`, `External`, and omitted. When set to `Internal`, records are provided by the internal infrastructure When set to `External`, records are not provided by the internal infrastructure and must be configured by the user. This value may only be set when a user-managed loadbalancer is configured. When omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. The current default is `Internal`.",
"type": "string"
"description": "dnsRecordsType determines whether records for api, api-int, and ingress are provided by the internal DNS service or externally. Allowed values are `Internal`, `External`, and omitted. When set to `Internal`, records are provided by the internal infrastructure and no additional user configuration is required for the cluster to function. When set to `External`, records are not provided by the internal infrastructure and must be configured by the user on a DNS server outside the cluster. Cluster nodes must use this external server for their upstream DNS requests. This value may only be set when loadBalancer.type is set to UserManaged. When omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. The current default is `Internal`.\n\nPossible enum values:\n - `\"External\"`\n - `\"Internal\"`",
"type": "string",
"enum": [
"External",
"Internal"
]
},
"ingressIP": {
"description": "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.\n\nDeprecated: Use IngressIPs instead.",
Expand Down Expand Up @@ -9737,8 +9749,12 @@
"x-kubernetes-list-type": "set"
},
"dnsRecordsType": {
"description": "dnsRecordsType determines whether records for api, api-int, and ingress are provided by the internal DNS service or externally. Allowed values are `Internal`, `External`, and omitted. When set to `Internal`, records are provided by the internal infrastructure When set to `External`, records are not provided by the internal infrastructure and must be configured by the user. This value may only be set when a user-managed loadbalancer is configured. When omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. The current default is `Internal`.",
"type": "string"
"description": "dnsRecordsType determines whether records for api, api-int, and ingress are provided by the internal DNS service or externally. Allowed values are `Internal`, `External`, and omitted. When set to `Internal`, records are provided by the internal infrastructure and no additional user configuration is required for the cluster to function. When set to `External`, records are not provided by the internal infrastructure and must be configured by the user on a DNS server outside the cluster. Cluster nodes must use this external server for their upstream DNS requests. This value may only be set when loadBalancer.type is set to UserManaged. When omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. The current default is `Internal`.\n\nPossible enum values:\n - `\"External\"`\n - `\"Internal\"`",
"type": "string",
"enum": [
"External",
"Internal"
]
},
"ingressIP": {
"description": "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.\n\nDeprecated: Use IngressIPs instead.",
Expand Down Expand Up @@ -11652,8 +11668,12 @@
"x-kubernetes-list-type": "atomic"
},
"dnsRecordsType": {
"description": "dnsRecordsType determines whether records for api, api-int, and ingress are provided by the internal DNS service or externally. Allowed values are `Internal`, `External`, and omitted. When set to `Internal`, records are provided by the internal infrastructure When set to `External`, records are not provided by the internal infrastructure and must be configured by the user. This value may only be set when a user-managed loadbalancer is configured. When omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. The current default is `Internal`.",
"type": "string"
"description": "dnsRecordsType determines whether records for api, api-int, and ingress are provided by the internal DNS service or externally. Allowed values are `Internal`, `External`, and omitted. When set to `Internal`, records are provided by the internal infrastructure and no additional user configuration is required for the cluster to function. When set to `External`, records are not provided by the internal infrastructure and must be configured by the user on a DNS server outside the cluster. Cluster nodes must use this external server for their upstream DNS requests. This value may only be set when loadBalancer.type is set to UserManaged. When omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. The current default is `Internal`.\n\nPossible enum values:\n - `\"External\"`\n - `\"Internal\"`",
"type": "string",
"enum": [
"External",
"Internal"
]
},
"ingressIP": {
"description": "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.\n\nDeprecated: Use IngressIPs instead.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: CustomNoUpgrade
name: clustermonitoring.config.openshift.io
name: clustermonitorings.config.openshift.io
spec:
group: config.openshift.io
names:
kind: ClusterMonitoring
listKind: ClusterMonitoringList
plural: clustermonitoring
plural: clustermonitorings
singular: clustermonitoring
scope: Cluster
versions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: DevPreviewNoUpgrade
name: clustermonitoring.config.openshift.io
name: clustermonitorings.config.openshift.io
spec:
group: config.openshift.io
names:
kind: ClusterMonitoring
listKind: ClusterMonitoringList
plural: clustermonitoring
plural: clustermonitorings
singular: clustermonitoring
scope: Cluster
versions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
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.

spec:
group: config.openshift.io
names:
kind: ClusterMonitoring
listKind: ClusterMonitoringList
plural: clustermonitoring
plural: clustermonitorings
singular: clustermonitoring
scope: Cluster
versions:
Expand Down