Skip to content
Merged
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
20 changes: 20 additions & 0 deletions machine/v1beta1/types_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,18 @@ const (
MachineAuthorityMigrating MachineAuthority = "Migrating"
)

// SynchronizedAPI holds the last stable value of authoritativeAPI.
// +kubebuilder:validation:Enum=MachineAPI;ClusterAPI
type SynchronizedAPI string

const (
// MachineAPISynchronized indicates that the Machine API is the last synchronized API.
MachineAPISynchronized SynchronizedAPI = "MachineAPI"

// ClusterAPISynchronized indicates that the Cluster API is the last synchronized API.
ClusterAPISynchronized SynchronizedAPI = "ClusterAPI"
)

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

Expand Down Expand Up @@ -406,6 +418,14 @@ type MachineStatus struct {
// +optional
AuthoritativeAPI MachineAuthority `json:"authoritativeAPI,omitempty"`

// synchronizedAPI holds the last stable value of authoritativeAPI.
// It is used to detect migration cancellation requests and to restore the resource to its previous state.
// Valid values are "MachineAPI" and "ClusterAPI".
// When omitted, the resource has not yet been reconciled by the migration controller.
// +openshift:enable:FeatureGate=MachineAPIMigration
// +optional
SynchronizedAPI SynchronizedAPI `json:"synchronizedAPI,omitempty"`

// synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with.
// This field is set when the authoritative resource is updated and the sync controller has updated the non-authoritative resource to match.
// +kubebuilder:validation:Minimum=0
Expand Down
8 changes: 8 additions & 0 deletions machine/v1beta1/types_machineset.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,14 @@ type MachineSetStatus struct {
// +optional
AuthoritativeAPI MachineAuthority `json:"authoritativeAPI,omitempty"`

// synchronizedAPI holds the last stable value of authoritativeAPI.
// It is used to detect migration cancellation requests and to restore the resource to its previous state.
// Valid values are "MachineAPI" and "ClusterAPI".
// When omitted, the resource has not yet been reconciled by the migration controller.
// +openshift:enable:FeatureGate=MachineAPIMigration
// +optional
SynchronizedAPI SynchronizedAPI `json:"synchronizedAPI,omitempty"`

// synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with.
// This field is set when the authoritative resource is updated and the sync controller has updated the non-authoritative resource to match.
// +kubebuilder:validation:Minimum=0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,16 @@ spec:
serialized/deserialized from this field.
type: object
x-kubernetes-preserve-unknown-fields: true
synchronizedAPI:
description: |-
synchronizedAPI holds the last stable value of authoritativeAPI.
It is used to detect migration cancellation requests and to restore the resource to its previous state.
Valid values are "MachineAPI" and "ClusterAPI".
When omitted, the resource has not yet been reconciled by the migration controller.
enum:
- MachineAPI
- ClusterAPI
type: string
synchronizedGeneration:
description: |-
synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,16 @@ spec:
serialized/deserialized from this field.
type: object
x-kubernetes-preserve-unknown-fields: true
synchronizedAPI:
description: |-
synchronizedAPI holds the last stable value of authoritativeAPI.
It is used to detect migration cancellation requests and to restore the resource to its previous state.
Valid values are "MachineAPI" and "ClusterAPI".
When omitted, the resource has not yet been reconciled by the migration controller.
enum:
- MachineAPI
- ClusterAPI
type: string
synchronizedGeneration:
description: |-
synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,16 @@ spec:
serialized/deserialized from this field.
type: object
x-kubernetes-preserve-unknown-fields: true
synchronizedAPI:
description: |-
synchronizedAPI holds the last stable value of authoritativeAPI.
It is used to detect migration cancellation requests and to restore the resource to its previous state.
Valid values are "MachineAPI" and "ClusterAPI".
When omitted, the resource has not yet been reconciled by the migration controller.
enum:
- MachineAPI
- ClusterAPI
type: string
synchronizedGeneration:
description: |-
synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,16 @@ spec:
description: replicas is the most recently observed number of replicas.
format: int32
type: integer
synchronizedAPI:
description: |-
synchronizedAPI holds the last stable value of authoritativeAPI.
It is used to detect migration cancellation requests and to restore the resource to its previous state.
Valid values are "MachineAPI" and "ClusterAPI".
When omitted, the resource has not yet been reconciled by the migration controller.
enum:
- MachineAPI
- ClusterAPI
type: string
synchronizedGeneration:
description: |-
synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,16 @@ spec:
description: replicas is the most recently observed number of replicas.
format: int32
type: integer
synchronizedAPI:
description: |-
synchronizedAPI holds the last stable value of authoritativeAPI.
It is used to detect migration cancellation requests and to restore the resource to its previous state.
Valid values are "MachineAPI" and "ClusterAPI".
When omitted, the resource has not yet been reconciled by the migration controller.
enum:
- MachineAPI
- ClusterAPI
type: string
synchronizedGeneration:
description: |-
synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,16 @@ spec:
description: replicas is the most recently observed number of replicas.
format: int32
type: integer
synchronizedAPI:
description: |-
synchronizedAPI holds the last stable value of authoritativeAPI.
It is used to detect migration cancellation requests and to restore the resource to its previous state.
Valid values are "MachineAPI" and "ClusterAPI".
When omitted, the resource has not yet been reconciled by the migration controller.
enum:
- MachineAPI
- ClusterAPI
type: string
synchronizedGeneration:
description: |-
synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,16 @@ spec:
serialized/deserialized from this field.
type: object
x-kubernetes-preserve-unknown-fields: true
synchronizedAPI:
description: |-
synchronizedAPI holds the last stable value of authoritativeAPI.
It is used to detect migration cancellation requests and to restore the resource to its previous state.
Valid values are "MachineAPI" and "ClusterAPI".
When omitted, the resource has not yet been reconciled by the migration controller.
enum:
- MachineAPI
- ClusterAPI
type: string
synchronizedGeneration:
description: |-
synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,16 @@ spec:
description: replicas is the most recently observed number of replicas.
format: int32
type: integer
synchronizedAPI:
description: |-
synchronizedAPI holds the last stable value of authoritativeAPI.
It is used to detect migration cancellation requests and to restore the resource to its previous state.
Valid values are "MachineAPI" and "ClusterAPI".
When omitted, the resource has not yet been reconciled by the migration controller.
enum:
- MachineAPI
- ClusterAPI
type: string
synchronizedGeneration:
description: |-
synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with.
Expand Down
2 changes: 2 additions & 0 deletions machine/v1beta1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions openapi/generated_openapi/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.