Skip to content

Commit 4019d49

Browse files
committed
Add synchronizedAPI to Machine and MachineSet status
1 parent aae5635 commit 4019d49

12 files changed

Lines changed: 2381 additions & 66450 deletions

machine/v1beta1/types_machine.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,18 @@ const (
185185
MachineAuthorityMigrating MachineAuthority = "Migrating"
186186
)
187187

188+
// SynchronizedAPI holds the last stable value of authoritativeAPI.
189+
// +kubebuilder:validation:Enum=MachineAPI;ClusterAPI
190+
type SynchronizedAPI string
191+
192+
const (
193+
// MachineAPISynchronized indicates that the Machine API is the last synchronized API.
194+
MachineAPISynchronized SynchronizedAPI = "MachineAPI"
195+
196+
// ClusterAPISynchronized indicates that the Cluster API is the last synchronized API.
197+
ClusterAPISynchronized SynchronizedAPI = "ClusterAPI"
198+
)
199+
188200
// +genclient
189201
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
190202

@@ -406,6 +418,14 @@ type MachineStatus struct {
406418
// +optional
407419
AuthoritativeAPI MachineAuthority `json:"authoritativeAPI,omitempty"`
408420

421+
// synchronizedAPI holds the last stable value of authoritativeAPI.
422+
// It is used to detect migration cancellation requests and to restore the resource to its previous state.
423+
// Valid values are "MachineAPI" and "ClusterAPI".
424+
// When omitted, the resource has not yet been reconciled by the migration controller.
425+
// +openshift:enable:FeatureGate=MachineAPIMigration
426+
// +optional
427+
SynchronizedAPI SynchronizedAPI `json:"synchronizedAPI,omitempty"`
428+
409429
// synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with.
410430
// This field is set when the authoritative resource is updated and the sync controller has updated the non-authoritative resource to match.
411431
// +kubebuilder:validation:Minimum=0

machine/v1beta1/types_machineset.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,14 @@ type MachineSetStatus struct {
168168
// +optional
169169
AuthoritativeAPI MachineAuthority `json:"authoritativeAPI,omitempty"`
170170

171+
// synchronizedAPI holds the last stable value of authoritativeAPI.
172+
// It is used to detect migration cancellation requests and to restore the resource to its previous state.
173+
// Valid values are "MachineAPI" and "ClusterAPI".
174+
// When omitted, the resource has not yet been reconciled by the migration controller.
175+
// +openshift:enable:FeatureGate=MachineAPIMigration
176+
// +optional
177+
SynchronizedAPI SynchronizedAPI `json:"synchronizedAPI,omitempty"`
178+
171179
// synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with.
172180
// This field is set when the authoritative resource is updated and the sync controller has updated the non-authoritative resource to match.
173181
// +kubebuilder:validation:Minimum=0

machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machines-CustomNoUpgrade.crd.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,16 @@ spec:
567567
serialized/deserialized from this field.
568568
type: object
569569
x-kubernetes-preserve-unknown-fields: true
570+
synchronizedAPI:
571+
description: |-
572+
synchronizedAPI holds the last stable value of authoritativeAPI.
573+
It is used to detect migration cancellation requests and to restore the resource to its previous state.
574+
Valid values are "MachineAPI" and "ClusterAPI".
575+
When omitted, the resource has not yet been reconciled by the migration controller.
576+
enum:
577+
- MachineAPI
578+
- ClusterAPI
579+
type: string
570580
synchronizedGeneration:
571581
description: |-
572582
synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with.

machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machines-DevPreviewNoUpgrade.crd.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,16 @@ spec:
567567
serialized/deserialized from this field.
568568
type: object
569569
x-kubernetes-preserve-unknown-fields: true
570+
synchronizedAPI:
571+
description: |-
572+
synchronizedAPI holds the last stable value of authoritativeAPI.
573+
It is used to detect migration cancellation requests and to restore the resource to its previous state.
574+
Valid values are "MachineAPI" and "ClusterAPI".
575+
When omitted, the resource has not yet been reconciled by the migration controller.
576+
enum:
577+
- MachineAPI
578+
- ClusterAPI
579+
type: string
570580
synchronizedGeneration:
571581
description: |-
572582
synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with.

machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machines-TechPreviewNoUpgrade.crd.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,16 @@ spec:
567567
serialized/deserialized from this field.
568568
type: object
569569
x-kubernetes-preserve-unknown-fields: true
570+
synchronizedAPI:
571+
description: |-
572+
synchronizedAPI holds the last stable value of authoritativeAPI.
573+
It is used to detect migration cancellation requests and to restore the resource to its previous state.
574+
Valid values are "MachineAPI" and "ClusterAPI".
575+
When omitted, the resource has not yet been reconciled by the migration controller.
576+
enum:
577+
- MachineAPI
578+
- ClusterAPI
579+
type: string
570580
synchronizedGeneration:
571581
description: |-
572582
synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with.

machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-CustomNoUpgrade.crd.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,16 @@ spec:
674674
description: replicas is the most recently observed number of replicas.
675675
format: int32
676676
type: integer
677+
synchronizedAPI:
678+
description: |-
679+
synchronizedAPI holds the last stable value of authoritativeAPI.
680+
It is used to detect migration cancellation requests and to restore the resource to its previous state.
681+
Valid values are "MachineAPI" and "ClusterAPI".
682+
When omitted, the resource has not yet been reconciled by the migration controller.
683+
enum:
684+
- MachineAPI
685+
- ClusterAPI
686+
type: string
677687
synchronizedGeneration:
678688
description: |-
679689
synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with.

machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-DevPreviewNoUpgrade.crd.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,16 @@ spec:
674674
description: replicas is the most recently observed number of replicas.
675675
format: int32
676676
type: integer
677+
synchronizedAPI:
678+
description: |-
679+
synchronizedAPI holds the last stable value of authoritativeAPI.
680+
It is used to detect migration cancellation requests and to restore the resource to its previous state.
681+
Valid values are "MachineAPI" and "ClusterAPI".
682+
When omitted, the resource has not yet been reconciled by the migration controller.
683+
enum:
684+
- MachineAPI
685+
- ClusterAPI
686+
type: string
677687
synchronizedGeneration:
678688
description: |-
679689
synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with.

machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-TechPreviewNoUpgrade.crd.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,16 @@ spec:
674674
description: replicas is the most recently observed number of replicas.
675675
format: int32
676676
type: integer
677+
synchronizedAPI:
678+
description: |-
679+
synchronizedAPI holds the last stable value of authoritativeAPI.
680+
It is used to detect migration cancellation requests and to restore the resource to its previous state.
681+
Valid values are "MachineAPI" and "ClusterAPI".
682+
When omitted, the resource has not yet been reconciled by the migration controller.
683+
enum:
684+
- MachineAPI
685+
- ClusterAPI
686+
type: string
677687
synchronizedGeneration:
678688
description: |-
679689
synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with.

machine/v1beta1/zz_generated.featuregated-crd-manifests/machines.machine.openshift.io/MachineAPIMigration.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,16 @@ spec:
569569
serialized/deserialized from this field.
570570
type: object
571571
x-kubernetes-preserve-unknown-fields: true
572+
synchronizedAPI:
573+
description: |-
574+
synchronizedAPI holds the last stable value of authoritativeAPI.
575+
It is used to detect migration cancellation requests and to restore the resource to its previous state.
576+
Valid values are "MachineAPI" and "ClusterAPI".
577+
When omitted, the resource has not yet been reconciled by the migration controller.
578+
enum:
579+
- MachineAPI
580+
- ClusterAPI
581+
type: string
572582
synchronizedGeneration:
573583
description: |-
574584
synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with.

machine/v1beta1/zz_generated.featuregated-crd-manifests/machinesets.machine.openshift.io/MachineAPIMigration.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,16 @@ spec:
676676
description: replicas is the most recently observed number of replicas.
677677
format: int32
678678
type: integer
679+
synchronizedAPI:
680+
description: |-
681+
synchronizedAPI holds the last stable value of authoritativeAPI.
682+
It is used to detect migration cancellation requests and to restore the resource to its previous state.
683+
Valid values are "MachineAPI" and "ClusterAPI".
684+
When omitted, the resource has not yet been reconciled by the migration controller.
685+
enum:
686+
- MachineAPI
687+
- ClusterAPI
688+
type: string
679689
synchronizedGeneration:
680690
description: |-
681691
synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with.

0 commit comments

Comments
 (0)