Skip to content

Commit 975f565

Browse files
committed
config/v1alpha1: fix ClusterMonitoring CRD plural name
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]>
1 parent 138912d commit 975f565

12 files changed

+50
-30
lines changed

config/v1alpha1/tests/clustermonitoring.config.openshift.io/AAA_ungated.yaml renamed to config/v1alpha1/tests/clustermonitorings.config.openshift.io/AAA_ungated.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
22
name: "ClusterMonitoring"
3-
crdName: clustermonitoring.config.openshift.io
3+
crdName: clustermonitorings.config.openshift.io
44
tests:
55
onCreate:
66
- name: Should be able to create a minimal ClusterMonitoring

config/v1alpha1/tests/clustermonitoring.config.openshift.io/ClusterMonitoringConfig.yaml renamed to config/v1alpha1/tests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
22
name: "ClusterMonitoring"
3-
crdName: clustermonitoring.config.openshift.io
3+
crdName: clustermonitorings.config.openshift.io
44
featureGate: ClusterMonitoringConfig
55
tests:
66
onCreate:

config/v1alpha1/types_cluster_monitoring.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333
// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1929
3434
// +openshift:file-pattern=cvoRunLevel=0000_10,operatorName=config-operator,operatorOrdering=01
3535
// +kubebuilder:object:root=true
36-
// +kubebuilder:resource:path=clustermonitoring,scope=Cluster
36+
// +kubebuilder:resource:path=clustermonitorings,scope=Cluster
3737
// +kubebuilder:subresource:status
3838
// +kubebuilder:metadata:annotations="description=Cluster Monitoring Operators configuration API"
3939
// +openshift:enable:FeatureGate=ClusterMonitoringConfig

payload-manifests/crds/0000_10_config-operator_01_clustermonitoring-CustomNoUpgrade.crd.yaml renamed to config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings-CustomNoUpgrade.crd.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ metadata:
88
include.release.openshift.io/ibm-cloud-managed: "true"
99
include.release.openshift.io/self-managed-high-availability: "true"
1010
release.openshift.io/feature-set: CustomNoUpgrade
11-
name: clustermonitoring.config.openshift.io
11+
name: clustermonitorings.config.openshift.io
1212
spec:
1313
group: config.openshift.io
1414
names:
1515
kind: ClusterMonitoring
1616
listKind: ClusterMonitoringList
17-
plural: clustermonitoring
17+
plural: clustermonitorings
1818
singular: clustermonitoring
1919
scope: Cluster
2020
versions:

payload-manifests/crds/0000_10_config-operator_01_clustermonitoring-DevPreviewNoUpgrade.crd.yaml renamed to config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings-DevPreviewNoUpgrade.crd.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ metadata:
88
include.release.openshift.io/ibm-cloud-managed: "true"
99
include.release.openshift.io/self-managed-high-availability: "true"
1010
release.openshift.io/feature-set: DevPreviewNoUpgrade
11-
name: clustermonitoring.config.openshift.io
11+
name: clustermonitorings.config.openshift.io
1212
spec:
1313
group: config.openshift.io
1414
names:
1515
kind: ClusterMonitoring
1616
listKind: ClusterMonitoringList
17-
plural: clustermonitoring
17+
plural: clustermonitorings
1818
singular: clustermonitoring
1919
scope: Cluster
2020
versions:

payload-manifests/crds/0000_10_config-operator_01_clustermonitoring-TechPreviewNoUpgrade.crd.yaml renamed to config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings-TechPreviewNoUpgrade.crd.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ metadata:
88
include.release.openshift.io/ibm-cloud-managed: "true"
99
include.release.openshift.io/self-managed-high-availability: "true"
1010
release.openshift.io/feature-set: TechPreviewNoUpgrade
11-
name: clustermonitoring.config.openshift.io
11+
name: clustermonitorings.config.openshift.io
1212
spec:
1313
group: config.openshift.io
1414
names:
1515
kind: ClusterMonitoring
1616
listKind: ClusterMonitoringList
17-
plural: clustermonitoring
17+
plural: clustermonitorings
1818
singular: clustermonitoring
1919
scope: Cluster
2020
versions:

config/v1alpha1/zz_generated.featuregated-crd-manifests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ clusterimagepolicies.config.openshift.io:
4545
- SigstoreImageVerification
4646
Version: v1alpha1
4747

48-
clustermonitoring.config.openshift.io:
48+
clustermonitorings.config.openshift.io:
4949
Annotations:
5050
description: Cluster Monitoring Operators configuration API
5151
ApprovedPRNumber: https://github.com/openshift/api/pull/1929
52-
CRDName: clustermonitoring.config.openshift.io
52+
CRDName: clustermonitorings.config.openshift.io
5353
Capability: ""
5454
Category: ""
5555
FeatureGates:
@@ -61,7 +61,7 @@ clustermonitoring.config.openshift.io:
6161
HasStatus: true
6262
KindName: ClusterMonitoring
6363
Labels: {}
64-
PluralName: clustermonitoring
64+
PluralName: clustermonitorings
6565
PrinterColumns: []
6666
Scope: Cluster
6767
ShortNames: null
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ metadata:
88
api.openshift.io/filename-ordering: "01"
99
description: Cluster Monitoring Operators configuration API
1010
feature-gate.release.openshift.io/ClusterMonitoringConfig: "true"
11-
name: clustermonitoring.config.openshift.io
11+
name: clustermonitorings.config.openshift.io
1212
spec:
1313
group: config.openshift.io
1414
names:
1515
kind: ClusterMonitoring
1616
listKind: ClusterMonitoringList
17-
plural: clustermonitoring
17+
plural: clustermonitorings
1818
singular: clustermonitoring
1919
scope: Cluster
2020
versions:

openapi/openapi.json

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4780,8 +4780,12 @@
47804780
"x-kubernetes-list-type": "atomic"
47814781
},
47824782
"dnsRecordsType": {
4783-
"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`.",
4784-
"type": "string"
4783+
"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\"`",
4784+
"type": "string",
4785+
"enum": [
4786+
"External",
4787+
"Internal"
4788+
]
47854789
},
47864790
"ingressIP": {
47874791
"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.",
@@ -8929,8 +8933,12 @@
89298933
"x-kubernetes-list-type": "set"
89308934
},
89318935
"dnsRecordsType": {
8932-
"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`.",
8933-
"type": "string"
8936+
"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\"`",
8937+
"type": "string",
8938+
"enum": [
8939+
"External",
8940+
"Internal"
8941+
]
89348942
},
89358943
"ingressIP": {
89368944
"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.",
@@ -9543,8 +9551,12 @@
95439551
"type": "string"
95449552
},
95459553
"dnsRecordsType": {
9546-
"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`.",
9547-
"type": "string"
9554+
"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\"`",
9555+
"type": "string",
9556+
"enum": [
9557+
"External",
9558+
"Internal"
9559+
]
95489560
},
95499561
"ingressIP": {
95509562
"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.",
@@ -9737,8 +9749,12 @@
97379749
"x-kubernetes-list-type": "set"
97389750
},
97399751
"dnsRecordsType": {
9740-
"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`.",
9741-
"type": "string"
9752+
"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\"`",
9753+
"type": "string",
9754+
"enum": [
9755+
"External",
9756+
"Internal"
9757+
]
97429758
},
97439759
"ingressIP": {
97449760
"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.",
@@ -11652,8 +11668,12 @@
1165211668
"x-kubernetes-list-type": "atomic"
1165311669
},
1165411670
"dnsRecordsType": {
11655-
"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`.",
11656-
"type": "string"
11671+
"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\"`",
11672+
"type": "string",
11673+
"enum": [
11674+
"External",
11675+
"Internal"
11676+
]
1165711677
},
1165811678
"ingressIP": {
1165911679
"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.",
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ metadata:
88
include.release.openshift.io/ibm-cloud-managed: "true"
99
include.release.openshift.io/self-managed-high-availability: "true"
1010
release.openshift.io/feature-set: CustomNoUpgrade
11-
name: clustermonitoring.config.openshift.io
11+
name: clustermonitorings.config.openshift.io
1212
spec:
1313
group: config.openshift.io
1414
names:
1515
kind: ClusterMonitoring
1616
listKind: ClusterMonitoringList
17-
plural: clustermonitoring
17+
plural: clustermonitorings
1818
singular: clustermonitoring
1919
scope: Cluster
2020
versions:

0 commit comments

Comments
 (0)