From 54d28823a7e046bb7674f977a920ef6c2dc9e263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20Ma=C5=88=C3=A1k?= Date: Wed, 15 Apr 2026 15:49:49 +0200 Subject: [PATCH] Add labelSelector to MachineSet status for scale subresource --- machine/v1beta1/types_machineset.go | 8 ++++++++ ...0_machine-api_01_machinesets-CustomNoUpgrade.crd.yaml | 9 +++++++++ .../0000_10_machine-api_01_machinesets-Default.crd.yaml | 9 +++++++++ ...chine-api_01_machinesets-DevPreviewNoUpgrade.crd.yaml | 9 +++++++++ ...hine-api_01_machinesets-TechPreviewNoUpgrade.crd.yaml | 9 +++++++++ .../machinesets.machine.openshift.io/AAA_ungated.yaml | 9 +++++++++ .../MachineAPIMigration.yaml | 9 +++++++++ machine/v1beta1/zz_generated.swagger_doc_generated.go | 1 + openapi/generated_openapi/zz_generated.openapi.go | 7 +++++++ openapi/openapi.json | 4 ++++ 10 files changed, 74 insertions(+) diff --git a/machine/v1beta1/types_machineset.go b/machine/v1beta1/types_machineset.go index a2343dc3982..1ecfd16526a 100644 --- a/machine/v1beta1/types_machineset.go +++ b/machine/v1beta1/types_machineset.go @@ -128,6 +128,14 @@ type MachineSetStatus struct { // observedGeneration reflects the generation of the most recently observed MachineSet. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` + // labelSelector is a label selector, in string format, for Machines corresponding to the MachineSet. + // It is exposed via the scale subresource as status.selector. + // When omitted, the MachineSet controller has not yet reconciled spec.selector into status.labelSelector. + // When present, it must not be empty and must not exceed 4096 characters. + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=4096 + // +optional + LabelSelector string `json:"labelSelector,omitempty"` // In the event that there is a terminal problem reconciling the // replicas, both ErrorReason and ErrorMessage will be set. ErrorReason // will be populated with a succinct value suitable for machine diff --git a/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-CustomNoUpgrade.crd.yaml b/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-CustomNoUpgrade.crd.yaml index 0809c028a56..63db606c266 100644 --- a/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-CustomNoUpgrade.crd.yaml +++ b/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-CustomNoUpgrade.crd.yaml @@ -660,6 +660,15 @@ spec: labels of the machine template of the MachineSet. format: int32 type: integer + labelSelector: + description: |- + labelSelector is a label selector, in string format, for Machines corresponding to the MachineSet. + It is exposed via the scale subresource as status.selector. + When omitted, the MachineSet controller has not yet reconciled spec.selector into status.labelSelector. + When present, it must not be empty and must not exceed 4096 characters. + maxLength: 4096 + minLength: 1 + type: string observedGeneration: description: observedGeneration reflects the generation of the most recently observed MachineSet. diff --git a/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-Default.crd.yaml b/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-Default.crd.yaml index 624d477021f..fb47ff7c995 100644 --- a/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-Default.crd.yaml +++ b/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-Default.crd.yaml @@ -615,6 +615,15 @@ spec: labels of the machine template of the MachineSet. format: int32 type: integer + labelSelector: + description: |- + labelSelector is a label selector, in string format, for Machines corresponding to the MachineSet. + It is exposed via the scale subresource as status.selector. + When omitted, the MachineSet controller has not yet reconciled spec.selector into status.labelSelector. + When present, it must not be empty and must not exceed 4096 characters. + maxLength: 4096 + minLength: 1 + type: string observedGeneration: description: observedGeneration reflects the generation of the most recently observed MachineSet. diff --git a/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-DevPreviewNoUpgrade.crd.yaml b/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-DevPreviewNoUpgrade.crd.yaml index abfdbda0dde..f1845581c97 100644 --- a/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-DevPreviewNoUpgrade.crd.yaml +++ b/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-DevPreviewNoUpgrade.crd.yaml @@ -660,6 +660,15 @@ spec: labels of the machine template of the MachineSet. format: int32 type: integer + labelSelector: + description: |- + labelSelector is a label selector, in string format, for Machines corresponding to the MachineSet. + It is exposed via the scale subresource as status.selector. + When omitted, the MachineSet controller has not yet reconciled spec.selector into status.labelSelector. + When present, it must not be empty and must not exceed 4096 characters. + maxLength: 4096 + minLength: 1 + type: string observedGeneration: description: observedGeneration reflects the generation of the most recently observed MachineSet. diff --git a/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-TechPreviewNoUpgrade.crd.yaml b/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-TechPreviewNoUpgrade.crd.yaml index 0d59497ee56..6075f07aaf3 100644 --- a/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-TechPreviewNoUpgrade.crd.yaml +++ b/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-TechPreviewNoUpgrade.crd.yaml @@ -660,6 +660,15 @@ spec: labels of the machine template of the MachineSet. format: int32 type: integer + labelSelector: + description: |- + labelSelector is a label selector, in string format, for Machines corresponding to the MachineSet. + It is exposed via the scale subresource as status.selector. + When omitted, the MachineSet controller has not yet reconciled spec.selector into status.labelSelector. + When present, it must not be empty and must not exceed 4096 characters. + maxLength: 4096 + minLength: 1 + type: string observedGeneration: description: observedGeneration reflects the generation of the most recently observed MachineSet. diff --git a/machine/v1beta1/zz_generated.featuregated-crd-manifests/machinesets.machine.openshift.io/AAA_ungated.yaml b/machine/v1beta1/zz_generated.featuregated-crd-manifests/machinesets.machine.openshift.io/AAA_ungated.yaml index 965f1ed30da..1762bc72e16 100644 --- a/machine/v1beta1/zz_generated.featuregated-crd-manifests/machinesets.machine.openshift.io/AAA_ungated.yaml +++ b/machine/v1beta1/zz_generated.featuregated-crd-manifests/machinesets.machine.openshift.io/AAA_ungated.yaml @@ -617,6 +617,15 @@ spec: labels of the machine template of the MachineSet. format: int32 type: integer + labelSelector: + description: |- + labelSelector is a label selector, in string format, for Machines corresponding to the MachineSet. + It is exposed via the scale subresource as status.selector. + When omitted, the MachineSet controller has not yet reconciled spec.selector into status.labelSelector. + When present, it must not be empty and must not exceed 4096 characters. + maxLength: 4096 + minLength: 1 + type: string observedGeneration: description: observedGeneration reflects the generation of the most recently observed MachineSet. diff --git a/machine/v1beta1/zz_generated.featuregated-crd-manifests/machinesets.machine.openshift.io/MachineAPIMigration.yaml b/machine/v1beta1/zz_generated.featuregated-crd-manifests/machinesets.machine.openshift.io/MachineAPIMigration.yaml index 27f5decae69..d33eca833c3 100644 --- a/machine/v1beta1/zz_generated.featuregated-crd-manifests/machinesets.machine.openshift.io/MachineAPIMigration.yaml +++ b/machine/v1beta1/zz_generated.featuregated-crd-manifests/machinesets.machine.openshift.io/MachineAPIMigration.yaml @@ -662,6 +662,15 @@ spec: labels of the machine template of the MachineSet. format: int32 type: integer + labelSelector: + description: |- + labelSelector is a label selector, in string format, for Machines corresponding to the MachineSet. + It is exposed via the scale subresource as status.selector. + When omitted, the MachineSet controller has not yet reconciled spec.selector into status.labelSelector. + When present, it must not be empty and must not exceed 4096 characters. + maxLength: 4096 + minLength: 1 + type: string observedGeneration: description: observedGeneration reflects the generation of the most recently observed MachineSet. diff --git a/machine/v1beta1/zz_generated.swagger_doc_generated.go b/machine/v1beta1/zz_generated.swagger_doc_generated.go index 903faf94bad..6032054d6c3 100644 --- a/machine/v1beta1/zz_generated.swagger_doc_generated.go +++ b/machine/v1beta1/zz_generated.swagger_doc_generated.go @@ -726,6 +726,7 @@ var map_MachineSetStatus = map[string]string{ "readyReplicas": "The number of ready replicas for this MachineSet. A machine is considered ready when the node has been created and is \"Ready\".", "availableReplicas": "The number of available replicas (ready for at least minReadySeconds) for this MachineSet.", "observedGeneration": "observedGeneration reflects the generation of the most recently observed MachineSet.", + "labelSelector": "labelSelector is a label selector, in string format, for Machines corresponding to the MachineSet. It is exposed via the scale subresource as status.selector. When omitted, the MachineSet controller has not yet reconciled spec.selector into status.labelSelector. When present, it must not be empty and must not exceed 4096 characters.", "errorReason": "In the event that there is a terminal problem reconciling the replicas, both ErrorReason and ErrorMessage will be set. ErrorReason will be populated with a succinct value suitable for machine interpretation, while ErrorMessage will contain a more verbose string suitable for logging and human consumption.\n\nThese fields should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is fundamentally wrong with the MachineTemplate's spec or the configuration of the machine controller, and that manual intervention is required. Examples of terminal errors would be invalid combinations of settings in the spec, values that are unsupported by the machine controller, or the responsible machine controller itself being critically misconfigured.\n\nAny transient errors that occur during the reconciliation of Machines can be added as events to the MachineSet object and/or logged in the controller's output.", "conditions": "conditions defines the current state of the MachineSet", "authoritativeAPI": "authoritativeAPI is the API that is authoritative for this resource. Valid values are MachineAPI, ClusterAPI and Migrating. This value is updated by the migration controller to reflect the authoritative API. Machine API and Cluster API controllers use this value to determine whether or not to reconcile the resource. When set to Migrating, the migration controller is currently performing the handover of authority from one API to the other.", diff --git a/openapi/generated_openapi/zz_generated.openapi.go b/openapi/generated_openapi/zz_generated.openapi.go index 8df74309f43..4999326b231 100644 --- a/openapi/generated_openapi/zz_generated.openapi.go +++ b/openapi/generated_openapi/zz_generated.openapi.go @@ -41024,6 +41024,13 @@ func schema_openshift_api_machine_v1beta1_MachineSetStatus(ref common.ReferenceC Format: "int64", }, }, + "labelSelector": { + SchemaProps: spec.SchemaProps{ + Description: "labelSelector is a label selector, in string format, for Machines corresponding to the MachineSet. It is exposed via the scale subresource as status.selector. When omitted, the MachineSet controller has not yet reconciled spec.selector into status.labelSelector. When present, it must not be empty and must not exceed 4096 characters.", + Type: []string{"string"}, + Format: "", + }, + }, "errorReason": { SchemaProps: spec.SchemaProps{ Description: "In the event that there is a terminal problem reconciling the replicas, both ErrorReason and ErrorMessage will be set. ErrorReason will be populated with a succinct value suitable for machine interpretation, while ErrorMessage will contain a more verbose string suitable for logging and human consumption.\n\nThese fields should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is fundamentally wrong with the MachineTemplate's spec or the configuration of the machine controller, and that manual intervention is required. Examples of terminal errors would be invalid combinations of settings in the spec, values that are unsupported by the machine controller, or the responsible machine controller itself being critically misconfigured.\n\nAny transient errors that occur during the reconciliation of Machines can be added as events to the MachineSet object and/or logged in the controller's output.", diff --git a/openapi/openapi.json b/openapi/openapi.json index adf201a09eb..1aad7056c98 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -23699,6 +23699,10 @@ "type": "integer", "format": "int32" }, + "labelSelector": { + "description": "labelSelector is a label selector, in string format, for Machines corresponding to the MachineSet. It is exposed via the scale subresource as status.selector. When omitted, the MachineSet controller has not yet reconciled spec.selector into status.labelSelector. When present, it must not be empty and must not exceed 4096 characters.", + "type": "string" + }, "observedGeneration": { "description": "observedGeneration reflects the generation of the most recently observed MachineSet.", "type": "integer",