diff --git a/api/v1beta1/azureasomanagedcluster_types.go b/api/v1beta1/azureasomanagedcluster_types.go index 50587d67f27..fcee6fb9428 100644 --- a/api/v1beta1/azureasomanagedcluster_types.go +++ b/api/v1beta1/azureasomanagedcluster_types.go @@ -50,6 +50,19 @@ type AzureASOManagedClusterStatus struct { //+optional Resources []ResourceStatus `json:"resources,omitempty"` + + // initialization provides observations of the AzureASOManagedCluster initialization process. + // NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial Cluster provisioning. + // +optional + Initialization *AzureASOManagedClusterInitializationStatus `json:"initialization,omitempty"` +} + +// AzureASOManagedClusterInitializationStatus provides observations of the AzureASOManagedCluster initialization process. +type AzureASOManagedClusterInitializationStatus struct { + // provisioned is true when the infrastructure provider reports that the Cluster's infrastructure is fully provisioned. + // NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial Cluster provisioning. + // +optional + Provisioned *bool `json:"provisioned,omitempty"` } // ResourceStatus represents the status of a resource. diff --git a/api/v1beta1/azureasomanagedcontrolplane_types.go b/api/v1beta1/azureasomanagedcontrolplane_types.go index 5a318209a3e..5991d91093d 100644 --- a/api/v1beta1/azureasomanagedcontrolplane_types.go +++ b/api/v1beta1/azureasomanagedcontrolplane_types.go @@ -52,6 +52,19 @@ type AzureASOManagedControlPlaneStatus struct { // ControlPlaneEndpoint represents the endpoint for the cluster's API server. //+optional ControlPlaneEndpoint clusterv1beta1.APIEndpoint `json:"controlPlaneEndpoint"` + + // initialization provides observations of the AzureASOManagedControlPlane initialization process. + // NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial ControlPlane provisioning. + // +optional + Initialization *AzureASOManagedControlPlaneInitializationStatus `json:"initialization,omitempty"` +} + +// AzureASOManagedControlPlaneInitializationStatus provides observations of the AzureASOManagedControlPlane initialization process. +type AzureASOManagedControlPlaneInitializationStatus struct { + // controlPlaneInitialized is true when the control plane provider reports that the control plane is initialized. + // NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial Cluster provisioning. + // +optional + ControlPlaneInitialized *bool `json:"controlPlaneInitialized,omitempty"` } // +kubebuilder:object:root=true diff --git a/api/v1beta1/azureasomanagedmachinepool_types.go b/api/v1beta1/azureasomanagedmachinepool_types.go index 4b7a000d8d7..05c3d1de896 100644 --- a/api/v1beta1/azureasomanagedmachinepool_types.go +++ b/api/v1beta1/azureasomanagedmachinepool_types.go @@ -47,6 +47,19 @@ type AzureASOManagedMachinePoolStatus struct { //+optional Resources []ResourceStatus `json:"resources,omitempty"` + + // initialization provides observations of the AzureASOManagedMachinePool initialization process. + // NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial MachinePool provisioning. + // +optional + Initialization *AzureASOManagedMachinePoolInitializationStatus `json:"initialization,omitempty"` +} + +// AzureASOManagedMachinePoolInitializationStatus provides observations of the AzureASOManagedMachinePool initialization process. +type AzureASOManagedMachinePoolInitializationStatus struct { + // provisioned is true when the infrastructure provider reports that the MachinePool's infrastructure is fully provisioned. + // NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial MachinePool provisioning. + // +optional + Provisioned *bool `json:"provisioned,omitempty"` } // +kubebuilder:object:root=true diff --git a/api/v1beta1/azurecluster_types.go b/api/v1beta1/azurecluster_types.go index ecc4e046c11..74576cc2b57 100644 --- a/api/v1beta1/azurecluster_types.go +++ b/api/v1beta1/azurecluster_types.go @@ -79,6 +79,33 @@ type AzureClusterStatus struct { // next reconciliation loop. // +optional LongRunningOperationStates Futures `json:"longRunningOperationStates,omitempty"` + + // initialization provides observations of the AzureCluster initialization process. + // NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial Cluster provisioning. + // +optional + Initialization *AzureClusterInitializationStatus `json:"initialization,omitempty"` + + // v1beta2 groups all the fields that will be added or modified in AzureCluster's status with the v1beta2 version of the Cluster API contract. + // +optional + V1Beta2 *AzureClusterV1Beta2Status `json:"v1beta2,omitempty"` +} + +// AzureClusterInitializationStatus provides observations of the AzureCluster initialization process. +type AzureClusterInitializationStatus struct { + // provisioned is true when the infrastructure provider reports that the Cluster's infrastructure is fully provisioned. + // NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial Cluster provisioning. + // +optional + Provisioned *bool `json:"provisioned,omitempty"` +} + +// AzureClusterV1Beta2Status groups all the fields that will be added or modified in AzureCluster with the v1beta2 version of the Cluster API contract. +type AzureClusterV1Beta2Status struct { + // conditions represents the observations of an AzureCluster's current state. + // +optional + // +listType=map + // +listMapKey=type + // +kubebuilder:validation:MaxItems=32 + Conditions []metav1.Condition `json:"conditions,omitempty"` } // +kubebuilder:object:root=true @@ -123,6 +150,24 @@ func (c *AzureCluster) SetConditions(conditions clusterv1beta1.Conditions) { c.Status.Conditions = conditions } +// GetV1Beta2Conditions returns the v1beta2 conditions for an AzureCluster API object. +// Note: GetV1Beta2Conditions will be renamed to GetConditions in a later stage of the transition to the v1beta2 Cluster API contract. +func (c *AzureCluster) GetV1Beta2Conditions() []metav1.Condition { + if c.Status.V1Beta2 == nil { + return nil + } + return c.Status.V1Beta2.Conditions +} + +// SetV1Beta2Conditions sets the v1beta2 conditions on an AzureCluster object. +// Note: SetV1Beta2Conditions will be renamed to SetConditions in a later stage of the transition to the v1beta2 Cluster API contract. +func (c *AzureCluster) SetV1Beta2Conditions(conditions []metav1.Condition) { + if c.Status.V1Beta2 == nil { + c.Status.V1Beta2 = &AzureClusterV1Beta2Status{} + } + c.Status.V1Beta2.Conditions = conditions +} + // GetFutures returns the list of long running operation states for an AzureCluster API object. func (c *AzureCluster) GetFutures() Futures { return c.Status.LongRunningOperationStates diff --git a/api/v1beta1/azureclusteridentity_types.go b/api/v1beta1/azureclusteridentity_types.go index e2fa6c8d225..6a7a8dc7751 100644 --- a/api/v1beta1/azureclusteridentity_types.go +++ b/api/v1beta1/azureclusteridentity_types.go @@ -88,6 +88,20 @@ type AzureClusterIdentityStatus struct { // Conditions defines current service state of the AzureClusterIdentity. // +optional Conditions clusterv1beta1.Conditions `json:"conditions,omitempty"` + + // v1beta2 groups all the fields that will be added or modified in AzureClusterIdentity's status with the v1beta2 version of the Cluster API contract. + // +optional + V1Beta2 *AzureClusterIdentityV1Beta2Status `json:"v1beta2,omitempty"` +} + +// AzureClusterIdentityV1Beta2Status groups all the fields that will be added or modified in AzureClusterIdentity with the v1beta2 version of the Cluster API contract. +type AzureClusterIdentityV1Beta2Status struct { + // conditions represents the observations of an AzureClusterIdentity's current state. + // +optional + // +listType=map + // +listMapKey=type + // +kubebuilder:validation:MaxItems=32 + Conditions []metav1.Condition `json:"conditions,omitempty"` } // +kubebuilder:object:root=true @@ -125,6 +139,24 @@ func (c *AzureClusterIdentity) SetConditions(conditions clusterv1beta1.Condition c.Status.Conditions = conditions } +// GetV1Beta2Conditions returns the v1beta2 conditions for an AzureClusterIdentity API object. +// Note: GetV1Beta2Conditions will be renamed to GetConditions in a later stage of the transition to the v1beta2 Cluster API contract. +func (c *AzureClusterIdentity) GetV1Beta2Conditions() []metav1.Condition { + if c.Status.V1Beta2 == nil { + return nil + } + return c.Status.V1Beta2.Conditions +} + +// SetV1Beta2Conditions sets the v1beta2 conditions on an AzureClusterIdentity object. +// Note: SetV1Beta2Conditions will be renamed to SetConditions in a later stage of the transition to the v1beta2 Cluster API contract. +func (c *AzureClusterIdentity) SetV1Beta2Conditions(conditions []metav1.Condition) { + if c.Status.V1Beta2 == nil { + c.Status.V1Beta2 = &AzureClusterIdentityV1Beta2Status{} + } + c.Status.V1Beta2.Conditions = conditions +} + func init() { objectTypes = append(objectTypes, &AzureClusterIdentity{}, &AzureClusterIdentityList{}) } diff --git a/api/v1beta1/azuremachine_types.go b/api/v1beta1/azuremachine_types.go index a75f4ce47fc..d15ae5037f5 100644 --- a/api/v1beta1/azuremachine_types.go +++ b/api/v1beta1/azuremachine_types.go @@ -210,18 +210,8 @@ type AzureMachineStatus struct { // reconciling the Machine and will contain a succinct value suitable // for machine interpretation. // - // This field 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 Machine's spec or the configuration of - // the 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 controller, or the - // responsible controller itself being critically misconfigured. - // - // Any transient errors that occur during the reconciliation of Machines - // can be added as events to the Machine object and/or logged in the - // controller's output. + // Deprecated: This field is deprecated and will be removed in a future version. + // Use conditions to surface terminal errors instead. // +optional FailureReason *string `json:"failureReason,omitempty"` @@ -229,18 +219,8 @@ type AzureMachineStatus struct { // reconciling the Machine and will contain a more verbose string suitable // for logging and human consumption. // - // This field 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 Machine's spec or the configuration of - // the 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 controller, or the - // responsible controller itself being critically misconfigured. - // - // Any transient errors that occur during the reconciliation of Machines - // can be added as events to the Machine object and/or logged in the - // controller's output. + // Deprecated: This field is deprecated and will be removed in a future version. + // Use conditions to surface terminal errors instead. // +optional FailureMessage *string `json:"failureMessage,omitempty"` @@ -252,6 +232,33 @@ type AzureMachineStatus struct { // next reconciliation loop. // +optional LongRunningOperationStates Futures `json:"longRunningOperationStates,omitempty"` + + // initialization provides observations of the AzureMachine initialization process. + // NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial Machine provisioning. + // +optional + Initialization *AzureMachineInitializationStatus `json:"initialization,omitempty"` + + // v1beta2 groups all the fields that will be added or modified in AzureMachine's status with the v1beta2 version of the Cluster API contract. + // +optional + V1Beta2 *AzureMachineV1Beta2Status `json:"v1beta2,omitempty"` +} + +// AzureMachineInitializationStatus provides observations of the AzureMachine initialization process. +type AzureMachineInitializationStatus struct { + // provisioned is true when the infrastructure provider reports that the Machine's infrastructure is fully provisioned. + // NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial Machine provisioning. + // +optional + Provisioned *bool `json:"provisioned,omitempty"` +} + +// AzureMachineV1Beta2Status groups all the fields that will be added or modified in AzureMachine with the v1beta2 version of the Cluster API contract. +type AzureMachineV1Beta2Status struct { + // conditions represents the observations of an AzureMachine's current state. + // +optional + // +listType=map + // +listMapKey=type + // +kubebuilder:validation:MaxItems=32 + Conditions []metav1.Condition `json:"conditions,omitempty"` } // AdditionalCapabilities enables or disables a capability on the virtual machine. @@ -306,6 +313,24 @@ func (m *AzureMachine) SetConditions(conditions clusterv1beta1.Conditions) { m.Status.Conditions = conditions } +// GetV1Beta2Conditions returns the v1beta2 conditions for an AzureMachine API object. +// Note: GetV1Beta2Conditions will be renamed to GetConditions in a later stage of the transition to the v1beta2 Cluster API contract. +func (m *AzureMachine) GetV1Beta2Conditions() []metav1.Condition { + if m.Status.V1Beta2 == nil { + return nil + } + return m.Status.V1Beta2.Conditions +} + +// SetV1Beta2Conditions sets the v1beta2 conditions on an AzureMachine object. +// Note: SetV1Beta2Conditions will be renamed to SetConditions in a later stage of the transition to the v1beta2 Cluster API contract. +func (m *AzureMachine) SetV1Beta2Conditions(conditions []metav1.Condition) { + if m.Status.V1Beta2 == nil { + m.Status.V1Beta2 = &AzureMachineV1Beta2Status{} + } + m.Status.V1Beta2.Conditions = conditions +} + // GetFutures returns the list of long running operation states for an AzureMachine API object. func (m *AzureMachine) GetFutures() Futures { return m.Status.LongRunningOperationStates diff --git a/api/v1beta1/azuremanagedcluster_types.go b/api/v1beta1/azuremanagedcluster_types.go index bc669565e36..9a84556f494 100644 --- a/api/v1beta1/azuremanagedcluster_types.go +++ b/api/v1beta1/azuremanagedcluster_types.go @@ -36,6 +36,19 @@ type AzureManagedClusterStatus struct { // Ready is true when the provider resource is ready. // +optional Ready bool `json:"ready,omitempty"` + + // initialization provides observations of the AzureManagedCluster initialization process. + // NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial Cluster provisioning. + // +optional + Initialization *AzureManagedClusterInitializationStatus `json:"initialization,omitempty"` +} + +// AzureManagedClusterInitializationStatus provides observations of the AzureManagedCluster initialization process. +type AzureManagedClusterInitializationStatus struct { + // provisioned is true when the infrastructure provider reports that the Cluster's infrastructure is fully provisioned. + // NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial Cluster provisioning. + // +optional + Provisioned *bool `json:"provisioned,omitempty"` } // +kubebuilder:object:root=true diff --git a/api/v1beta1/azuremanagedcontrolplane_types.go b/api/v1beta1/azuremanagedcontrolplane_types.go index 6d0f824c087..2189460297e 100644 --- a/api/v1beta1/azuremanagedcontrolplane_types.go +++ b/api/v1beta1/azuremanagedcontrolplane_types.go @@ -438,6 +438,33 @@ type AzureManagedControlPlaneStatus struct { // Version defines the Kubernetes version for the control plane instance. // +optional Version string `json:"version"` + + // initialization provides observations of the AzureManagedControlPlane initialization process. + // NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial ControlPlane provisioning. + // +optional + Initialization *AzureManagedControlPlaneInitializationStatus `json:"initialization,omitempty"` + + // v1beta2 groups all the fields that will be added or modified in AzureManagedControlPlane's status with the v1beta2 version of the Cluster API contract. + // +optional + V1Beta2 *AzureManagedControlPlaneV1Beta2Status `json:"v1beta2,omitempty"` +} + +// AzureManagedControlPlaneInitializationStatus provides observations of the AzureManagedControlPlane initialization process. +type AzureManagedControlPlaneInitializationStatus struct { + // controlPlaneInitialized is true when the control plane provider reports that the control plane is initialized. + // NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial Cluster provisioning. + // +optional + ControlPlaneInitialized *bool `json:"controlPlaneInitialized,omitempty"` +} + +// AzureManagedControlPlaneV1Beta2Status groups all the fields that will be added or modified in AzureManagedControlPlane with the v1beta2 version of the Cluster API contract. +type AzureManagedControlPlaneV1Beta2Status struct { + // conditions represents the observations of an AzureManagedControlPlane's current state. + // +optional + // +listType=map + // +listMapKey=type + // +kubebuilder:validation:MaxItems=32 + Conditions []metav1.Condition `json:"conditions,omitempty"` } // OIDCIssuerProfileStatus is the OIDC issuer profile of the Managed Cluster. @@ -698,6 +725,24 @@ func (m *AzureManagedControlPlane) SetConditions(conditions clusterv1beta1.Condi m.Status.Conditions = conditions } +// GetV1Beta2Conditions returns the v1beta2 conditions for an AzureManagedControlPlane API object. +// Note: GetV1Beta2Conditions will be renamed to GetConditions in a later stage of the transition to the v1beta2 Cluster API contract. +func (m *AzureManagedControlPlane) GetV1Beta2Conditions() []metav1.Condition { + if m.Status.V1Beta2 == nil { + return nil + } + return m.Status.V1Beta2.Conditions +} + +// SetV1Beta2Conditions sets the v1beta2 conditions on an AzureManagedControlPlane object. +// Note: SetV1Beta2Conditions will be renamed to SetConditions in a later stage of the transition to the v1beta2 Cluster API contract. +func (m *AzureManagedControlPlane) SetV1Beta2Conditions(conditions []metav1.Condition) { + if m.Status.V1Beta2 == nil { + m.Status.V1Beta2 = &AzureManagedControlPlaneV1Beta2Status{} + } + m.Status.V1Beta2.Conditions = conditions +} + // GetFutures returns the list of long running operation states for an AzureManagedControlPlane API object. func (m *AzureManagedControlPlane) GetFutures() Futures { return m.Status.LongRunningOperationStates diff --git a/api/v1beta1/azuremanagedmachinepool_types.go b/api/v1beta1/azuremanagedmachinepool_types.go index ebd3a4701c8..5bcf20c8682 100644 --- a/api/v1beta1/azuremanagedmachinepool_types.go +++ b/api/v1beta1/azuremanagedmachinepool_types.go @@ -462,12 +462,18 @@ type AzureManagedMachinePoolStatus struct { // Any transient errors that occur during the reconciliation of Machines // can be added as events to the Machine object and/or logged in the // controller's output. + // + // Deprecated: This field is deprecated and will be removed in a future version. + // Use conditions to surface terminal errors instead. // +optional ErrorReason *string `json:"errorReason,omitempty"` // Any transient errors that occur during the reconciliation of Machines // can be added as events to the Machine object and/or logged in the // controller's output. + // + // Deprecated: This field is deprecated and will be removed in a future version. + // Use conditions to surface terminal errors instead. // +optional ErrorMessage *string `json:"errorMessage,omitempty"` @@ -479,6 +485,33 @@ type AzureManagedMachinePoolStatus struct { // next reconciliation loop. // +optional LongRunningOperationStates Futures `json:"longRunningOperationStates,omitempty"` + + // initialization provides observations of the AzureManagedMachinePool initialization process. + // NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial MachinePool provisioning. + // +optional + Initialization *AzureManagedMachinePoolInitializationStatus `json:"initialization,omitempty"` + + // v1beta2 groups all the fields that will be added or modified in AzureManagedMachinePool's status with the v1beta2 version of the Cluster API contract. + // +optional + V1Beta2 *AzureManagedMachinePoolV1Beta2Status `json:"v1beta2,omitempty"` +} + +// AzureManagedMachinePoolInitializationStatus provides observations of the AzureManagedMachinePool initialization process. +type AzureManagedMachinePoolInitializationStatus struct { + // provisioned is true when the infrastructure provider reports that the MachinePool's infrastructure is fully provisioned. + // NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial MachinePool provisioning. + // +optional + Provisioned *bool `json:"provisioned,omitempty"` +} + +// AzureManagedMachinePoolV1Beta2Status groups all the fields that will be added or modified in AzureManagedMachinePool with the v1beta2 version of the Cluster API contract. +type AzureManagedMachinePoolV1Beta2Status struct { + // conditions represents the observations of an AzureManagedMachinePool's current state. + // +optional + // +listType=map + // +listMapKey=type + // +kubebuilder:validation:MaxItems=32 + Conditions []metav1.Condition `json:"conditions,omitempty"` } // +kubebuilder:object:root=true @@ -522,6 +555,24 @@ func (m *AzureManagedMachinePool) SetConditions(conditions clusterv1beta1.Condit m.Status.Conditions = conditions } +// GetV1Beta2Conditions returns the v1beta2 conditions for an AzureManagedMachinePool API object. +// Note: GetV1Beta2Conditions will be renamed to GetConditions in a later stage of the transition to the v1beta2 Cluster API contract. +func (m *AzureManagedMachinePool) GetV1Beta2Conditions() []metav1.Condition { + if m.Status.V1Beta2 == nil { + return nil + } + return m.Status.V1Beta2.Conditions +} + +// SetV1Beta2Conditions sets the v1beta2 conditions on an AzureManagedMachinePool object. +// Note: SetV1Beta2Conditions will be renamed to SetConditions in a later stage of the transition to the v1beta2 Cluster API contract. +func (m *AzureManagedMachinePool) SetV1Beta2Conditions(conditions []metav1.Condition) { + if m.Status.V1Beta2 == nil { + m.Status.V1Beta2 = &AzureManagedMachinePoolV1Beta2Status{} + } + m.Status.V1Beta2.Conditions = conditions +} + // GetFutures returns the list of long running operation states for an AzureManagedMachinePool API object. func (m *AzureManagedMachinePool) GetFutures() Futures { return m.Status.LongRunningOperationStates diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go index 3ab3aa92d1f..16753ffb10c 100644 --- a/api/v1beta1/zz_generated.deepcopy.go +++ b/api/v1beta1/zz_generated.deepcopy.go @@ -374,6 +374,26 @@ func (in *AzureASOManagedCluster) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureASOManagedClusterInitializationStatus) DeepCopyInto(out *AzureASOManagedClusterInitializationStatus) { + *out = *in + if in.Provisioned != nil { + in, out := &in.Provisioned, &out.Provisioned + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureASOManagedClusterInitializationStatus. +func (in *AzureASOManagedClusterInitializationStatus) DeepCopy() *AzureASOManagedClusterInitializationStatus { + if in == nil { + return nil + } + out := new(AzureASOManagedClusterInitializationStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AzureASOManagedClusterList) DeepCopyInto(out *AzureASOManagedClusterList) { *out = *in @@ -431,6 +451,11 @@ func (in *AzureASOManagedClusterStatus) DeepCopyInto(out *AzureASOManagedCluster *out = make([]ResourceStatus, len(*in)) copy(*out, *in) } + if in.Initialization != nil { + in, out := &in.Initialization, &out.Initialization + *out = new(AzureASOManagedClusterInitializationStatus) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureASOManagedClusterStatus. @@ -582,6 +607,26 @@ func (in *AzureASOManagedControlPlane) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureASOManagedControlPlaneInitializationStatus) DeepCopyInto(out *AzureASOManagedControlPlaneInitializationStatus) { + *out = *in + if in.ControlPlaneInitialized != nil { + in, out := &in.ControlPlaneInitialized, &out.ControlPlaneInitialized + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureASOManagedControlPlaneInitializationStatus. +func (in *AzureASOManagedControlPlaneInitializationStatus) DeepCopy() *AzureASOManagedControlPlaneInitializationStatus { + if in == nil { + return nil + } + out := new(AzureASOManagedControlPlaneInitializationStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AzureASOManagedControlPlaneList) DeepCopyInto(out *AzureASOManagedControlPlaneList) { *out = *in @@ -655,6 +700,11 @@ func (in *AzureASOManagedControlPlaneStatus) DeepCopyInto(out *AzureASOManagedCo copy(*out, *in) } out.ControlPlaneEndpoint = in.ControlPlaneEndpoint + if in.Initialization != nil { + in, out := &in.Initialization, &out.Initialization + *out = new(AzureASOManagedControlPlaneInitializationStatus) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureASOManagedControlPlaneStatus. @@ -790,6 +840,26 @@ func (in *AzureASOManagedMachinePool) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureASOManagedMachinePoolInitializationStatus) DeepCopyInto(out *AzureASOManagedMachinePoolInitializationStatus) { + *out = *in + if in.Provisioned != nil { + in, out := &in.Provisioned, &out.Provisioned + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureASOManagedMachinePoolInitializationStatus. +func (in *AzureASOManagedMachinePoolInitializationStatus) DeepCopy() *AzureASOManagedMachinePoolInitializationStatus { + if in == nil { + return nil + } + out := new(AzureASOManagedMachinePoolInitializationStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AzureASOManagedMachinePoolList) DeepCopyInto(out *AzureASOManagedMachinePoolList) { *out = *in @@ -862,6 +932,11 @@ func (in *AzureASOManagedMachinePoolStatus) DeepCopyInto(out *AzureASOManagedMac *out = make([]ResourceStatus, len(*in)) copy(*out, *in) } + if in.Initialization != nil { + in, out := &in.Initialization, &out.Initialization + *out = new(AzureASOManagedMachinePoolInitializationStatus) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureASOManagedMachinePoolStatus. @@ -1169,6 +1244,11 @@ func (in *AzureClusterIdentityStatus) DeepCopyInto(out *AzureClusterIdentityStat (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.V1Beta2 != nil { + in, out := &in.V1Beta2, &out.V1Beta2 + *out = new(AzureClusterIdentityV1Beta2Status) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureClusterIdentityStatus. @@ -1181,6 +1261,48 @@ func (in *AzureClusterIdentityStatus) DeepCopy() *AzureClusterIdentityStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureClusterIdentityV1Beta2Status) DeepCopyInto(out *AzureClusterIdentityV1Beta2Status) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureClusterIdentityV1Beta2Status. +func (in *AzureClusterIdentityV1Beta2Status) DeepCopy() *AzureClusterIdentityV1Beta2Status { + if in == nil { + return nil + } + out := new(AzureClusterIdentityV1Beta2Status) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureClusterInitializationStatus) DeepCopyInto(out *AzureClusterInitializationStatus) { + *out = *in + if in.Provisioned != nil { + in, out := &in.Provisioned, &out.Provisioned + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureClusterInitializationStatus. +func (in *AzureClusterInitializationStatus) DeepCopy() *AzureClusterInitializationStatus { + if in == nil { + return nil + } + out := new(AzureClusterInitializationStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AzureClusterList) DeepCopyInto(out *AzureClusterList) { *out = *in @@ -1254,6 +1376,16 @@ func (in *AzureClusterStatus) DeepCopyInto(out *AzureClusterStatus) { *out = make(Futures, len(*in)) copy(*out, *in) } + if in.Initialization != nil { + in, out := &in.Initialization, &out.Initialization + *out = new(AzureClusterInitializationStatus) + (*in).DeepCopyInto(*out) + } + if in.V1Beta2 != nil { + in, out := &in.V1Beta2, &out.V1Beta2 + *out = new(AzureClusterV1Beta2Status) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureClusterStatus. @@ -1374,6 +1506,28 @@ func (in *AzureClusterTemplateSpec) DeepCopy() *AzureClusterTemplateSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureClusterV1Beta2Status) DeepCopyInto(out *AzureClusterV1Beta2Status) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureClusterV1Beta2Status. +func (in *AzureClusterV1Beta2Status) DeepCopy() *AzureClusterV1Beta2Status { + if in == nil { + return nil + } + out := new(AzureClusterV1Beta2Status) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AzureComputeGalleryImage) DeepCopyInto(out *AzureComputeGalleryImage) { *out = *in @@ -1456,6 +1610,26 @@ func (in *AzureMachine) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureMachineInitializationStatus) DeepCopyInto(out *AzureMachineInitializationStatus) { + *out = *in + if in.Provisioned != nil { + in, out := &in.Provisioned, &out.Provisioned + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachineInitializationStatus. +func (in *AzureMachineInitializationStatus) DeepCopy() *AzureMachineInitializationStatus { + if in == nil { + return nil + } + out := new(AzureMachineInitializationStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AzureMachineList) DeepCopyInto(out *AzureMachineList) { *out = *in @@ -1637,6 +1811,16 @@ func (in *AzureMachineStatus) DeepCopyInto(out *AzureMachineStatus) { *out = make(Futures, len(*in)) copy(*out, *in) } + if in.Initialization != nil { + in, out := &in.Initialization, &out.Initialization + *out = new(AzureMachineInitializationStatus) + (*in).DeepCopyInto(*out) + } + if in.V1Beta2 != nil { + in, out := &in.V1Beta2, &out.V1Beta2 + *out = new(AzureMachineV1Beta2Status) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachineStatus. @@ -1768,13 +1952,35 @@ func (in *AzureMachineTemplateStatus) DeepCopy() *AzureMachineTemplateStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureMachineV1Beta2Status) DeepCopyInto(out *AzureMachineV1Beta2Status) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachineV1Beta2Status. +func (in *AzureMachineV1Beta2Status) DeepCopy() *AzureMachineV1Beta2Status { + if in == nil { + return nil + } + out := new(AzureMachineV1Beta2Status) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AzureManagedCluster) DeepCopyInto(out *AzureManagedCluster) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) out.Spec = in.Spec - out.Status = in.Status + in.Status.DeepCopyInto(&out.Status) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedCluster. @@ -1795,6 +2001,26 @@ func (in *AzureManagedCluster) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureManagedClusterInitializationStatus) DeepCopyInto(out *AzureManagedClusterInitializationStatus) { + *out = *in + if in.Provisioned != nil { + in, out := &in.Provisioned, &out.Provisioned + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedClusterInitializationStatus. +func (in *AzureManagedClusterInitializationStatus) DeepCopy() *AzureManagedClusterInitializationStatus { + if in == nil { + return nil + } + out := new(AzureManagedClusterInitializationStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AzureManagedClusterList) DeepCopyInto(out *AzureManagedClusterList) { *out = *in @@ -1846,6 +2072,11 @@ func (in *AzureManagedClusterSpec) DeepCopy() *AzureManagedClusterSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AzureManagedClusterStatus) DeepCopyInto(out *AzureManagedClusterStatus) { *out = *in + if in.Initialization != nil { + in, out := &in.Initialization, &out.Initialization + *out = new(AzureManagedClusterInitializationStatus) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedClusterStatus. @@ -2142,6 +2373,26 @@ func (in *AzureManagedControlPlaneClassSpec) DeepCopy() *AzureManagedControlPlan return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureManagedControlPlaneInitializationStatus) DeepCopyInto(out *AzureManagedControlPlaneInitializationStatus) { + *out = *in + if in.ControlPlaneInitialized != nil { + in, out := &in.ControlPlaneInitialized, &out.ControlPlaneInitialized + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedControlPlaneInitializationStatus. +func (in *AzureManagedControlPlaneInitializationStatus) DeepCopy() *AzureManagedControlPlaneInitializationStatus { + if in == nil { + return nil + } + out := new(AzureManagedControlPlaneInitializationStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AzureManagedControlPlaneList) DeepCopyInto(out *AzureManagedControlPlaneList) { *out = *in @@ -2226,6 +2477,16 @@ func (in *AzureManagedControlPlaneStatus) DeepCopyInto(out *AzureManagedControlP *out = new(OIDCIssuerProfileStatus) (*in).DeepCopyInto(*out) } + if in.Initialization != nil { + in, out := &in.Initialization, &out.Initialization + *out = new(AzureManagedControlPlaneInitializationStatus) + (*in).DeepCopyInto(*out) + } + if in.V1Beta2 != nil { + in, out := &in.V1Beta2, &out.V1Beta2 + *out = new(AzureManagedControlPlaneV1Beta2Status) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedControlPlaneStatus. @@ -2359,6 +2620,28 @@ func (in *AzureManagedControlPlaneTemplateSpec) DeepCopy() *AzureManagedControlP return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureManagedControlPlaneV1Beta2Status) DeepCopyInto(out *AzureManagedControlPlaneV1Beta2Status) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedControlPlaneV1Beta2Status. +func (in *AzureManagedControlPlaneV1Beta2Status) DeepCopy() *AzureManagedControlPlaneV1Beta2Status { + if in == nil { + return nil + } + out := new(AzureManagedControlPlaneV1Beta2Status) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AzureManagedMachinePool) DeepCopyInto(out *AzureManagedMachinePool) { *out = *in @@ -2520,6 +2803,26 @@ func (in *AzureManagedMachinePoolClassSpec) DeepCopy() *AzureManagedMachinePoolC return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureManagedMachinePoolInitializationStatus) DeepCopyInto(out *AzureManagedMachinePoolInitializationStatus) { + *out = *in + if in.Provisioned != nil { + in, out := &in.Provisioned, &out.Provisioned + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedMachinePoolInitializationStatus. +func (in *AzureManagedMachinePoolInitializationStatus) DeepCopy() *AzureManagedMachinePoolInitializationStatus { + if in == nil { + return nil + } + out := new(AzureManagedMachinePoolInitializationStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AzureManagedMachinePoolList) DeepCopyInto(out *AzureManagedMachinePoolList) { *out = *in @@ -2598,6 +2901,16 @@ func (in *AzureManagedMachinePoolStatus) DeepCopyInto(out *AzureManagedMachinePo *out = make(Futures, len(*in)) copy(*out, *in) } + if in.Initialization != nil { + in, out := &in.Initialization, &out.Initialization + *out = new(AzureManagedMachinePoolInitializationStatus) + (*in).DeepCopyInto(*out) + } + if in.V1Beta2 != nil { + in, out := &in.V1Beta2, &out.V1Beta2 + *out = new(AzureManagedMachinePoolV1Beta2Status) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedMachinePoolStatus. @@ -2716,6 +3029,28 @@ func (in *AzureManagedMachinePoolTemplateSpec) DeepCopy() *AzureManagedMachinePo return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureManagedMachinePoolV1Beta2Status) DeepCopyInto(out *AzureManagedMachinePoolV1Beta2Status) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedMachinePoolV1Beta2Status. +func (in *AzureManagedMachinePoolV1Beta2Status) DeepCopy() *AzureManagedMachinePoolV1Beta2Status { + if in == nil { + return nil + } + out := new(AzureManagedMachinePoolV1Beta2Status) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AzureMarketplaceImage) DeepCopyInto(out *AzureMarketplaceImage) { *out = *in diff --git a/azure/scope/machine.go b/azure/scope/machine.go index 86f96a5fd83..5a1c0962c8b 100644 --- a/azure/scope/machine.go +++ b/azure/scope/machine.go @@ -602,12 +602,12 @@ func (m *MachineScope) SetNotReady() { // SetFailureMessage sets the AzureMachine status failure message. func (m *MachineScope) SetFailureMessage(v error) { - m.AzureMachine.Status.FailureMessage = ptr.To(v.Error()) + m.AzureMachine.Status.FailureMessage = ptr.To(v.Error()) //nolint:staticcheck // will be removed when failureReason/failureMessage are dropped } // SetFailureReason sets the AzureMachine status failure reason. func (m *MachineScope) SetFailureReason(v string) { - m.AzureMachine.Status.FailureReason = &v + m.AzureMachine.Status.FailureReason = &v //nolint:staticcheck // will be removed when failureReason/failureMessage are dropped } // SetConditionFalse sets the specified AzureMachine condition to false. diff --git a/azure/scope/machinepool.go b/azure/scope/machinepool.go index 2837b116245..d38e47770b1 100644 --- a/azure/scope/machinepool.go +++ b/azure/scope/machinepool.go @@ -639,12 +639,12 @@ func (m *MachinePoolScope) SetNotReady() { // SetFailureMessage sets the AzureMachinePool status failure message. func (m *MachinePoolScope) SetFailureMessage(v error) { - m.AzureMachinePool.Status.FailureMessage = ptr.To(v.Error()) + m.AzureMachinePool.Status.FailureMessage = ptr.To(v.Error()) //nolint:staticcheck // will be removed when failureReason/failureMessage are dropped } // SetFailureReason sets the AzureMachinePool status failure reason. func (m *MachinePoolScope) SetFailureReason(v string) { - m.AzureMachinePool.Status.FailureReason = &v + m.AzureMachinePool.Status.FailureReason = &v //nolint:staticcheck // will be removed when failureReason/failureMessage are dropped } // AdditionalTags merges AdditionalTags from the scope's AzureCluster and AzureMachinePool. If the same key is present in both, diff --git a/azure/scope/machinepoolmachine.go b/azure/scope/machinepoolmachine.go index 6fabff22ed1..746e411824b 100644 --- a/azure/scope/machinepoolmachine.go +++ b/azure/scope/machinepoolmachine.go @@ -272,12 +272,12 @@ func (s *MachinePoolMachineScope) IsReady() bool { // SetFailureMessage sets the AzureMachinePoolMachine status failure message. func (s *MachinePoolMachineScope) SetFailureMessage(v error) { - s.AzureMachinePoolMachine.Status.FailureMessage = ptr.To(v.Error()) + s.AzureMachinePoolMachine.Status.FailureMessage = ptr.To(v.Error()) //nolint:staticcheck // will be removed when failureReason/failureMessage are dropped } // SetFailureReason sets the AzureMachinePoolMachine status failure reason. func (s *MachinePoolMachineScope) SetFailureReason(v string) { - s.AzureMachinePoolMachine.Status.FailureReason = &v + s.AzureMachinePoolMachine.Status.FailureReason = &v //nolint:staticcheck // will be removed when failureReason/failureMessage are dropped } // ProviderID returns the AzureMachinePool ID by parsing Spec.FakeProviderID. diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedclusters.yaml index f59a1dcbcba..497576b8f78 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedclusters.yaml @@ -165,6 +165,17 @@ spec: description: AzureASOManagedClusterStatus defines the observed state of AzureASOManagedCluster. properties: + initialization: + description: |- + initialization provides observations of the AzureASOManagedCluster initialization process. + NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial Cluster provisioning. + properties: + provisioned: + description: |- + provisioned is true when the infrastructure provider reports that the Cluster's infrastructure is fully provisioned. + NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial Cluster provisioning. + type: boolean + type: object ready: description: |- Ready represents whether or not the cluster has been provisioned and is ready. It fulfills Cluster diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanes.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanes.yaml index 2adab5924f8..6097f09739e 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanes.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedcontrolplanes.yaml @@ -181,6 +181,17 @@ spec: format: int32 type: integer type: object + initialization: + description: |- + initialization provides observations of the AzureASOManagedControlPlane initialization process. + NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial ControlPlane provisioning. + properties: + controlPlaneInitialized: + description: |- + controlPlaneInitialized is true when the control plane provider reports that the control plane is initialized. + NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial Cluster provisioning. + type: boolean + type: object initialized: description: |- Initialized represents whether or not the API server has been provisioned. It fulfills Cluster API's diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedmachinepools.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedmachinepools.yaml index 5a8eed710a8..4c399d12dc5 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedmachinepools.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureasomanagedmachinepools.yaml @@ -155,6 +155,17 @@ spec: description: AzureASOManagedMachinePoolStatus defines the observed state of AzureASOManagedMachinePool. properties: + initialization: + description: |- + initialization provides observations of the AzureASOManagedMachinePool initialization process. + NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial MachinePool provisioning. + properties: + provisioned: + description: |- + provisioned is true when the infrastructure provider reports that the MachinePool's infrastructure is fully provisioned. + NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial MachinePool provisioning. + type: boolean + type: object ready: description: |- Ready represents whether or not the infrastructure is ready to be used. It fulfills Cluster API's diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusteridentities.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusteridentities.yaml index 11bdf91bcf8..140a497aadb 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusteridentities.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusteridentities.yaml @@ -239,6 +239,75 @@ spec: - type type: object type: array + v1beta2: + description: v1beta2 groups all the fields that will be added or modified + in AzureClusterIdentity's status with the v1beta2 version of the + Cluster API contract. + properties: + conditions: + description: conditions represents the observations of an AzureClusterIdentity's + current state. + items: + description: Condition contains details for one aspect of the + current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object type: object type: object served: true diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusters.yaml index 35aa2c50612..91b94d8f56c 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusters.yaml @@ -1452,6 +1452,17 @@ spec: See: https://learn.microsoft.com/azure/reliability/availability-zones-overview This list will be used by Cluster API to try and spread the machines across the failure domains. type: object + initialization: + description: |- + initialization provides observations of the AzureCluster initialization process. + NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial Cluster provisioning. + properties: + provisioned: + description: |- + provisioned is true when the infrastructure provider reports that the Cluster's infrastructure is fully provisioned. + NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial Cluster provisioning. + type: boolean + type: object longRunningOperationStates: description: |- LongRunningOperationStates saves the states for Azure long-running operations so they can be continued on the @@ -1492,6 +1503,75 @@ spec: ready: description: Ready is true when the provider resource is ready. type: boolean + v1beta2: + description: v1beta2 groups all the fields that will be added or modified + in AzureCluster's status with the v1beta2 version of the Cluster + API contract. + properties: + conditions: + description: conditions represents the observations of an AzureCluster's + current state. + items: + description: Condition contains details for one aspect of the + current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object type: object type: object served: true diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepoolmachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepoolmachines.yaml index e139585838f..cc2f00a11a6 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepoolmachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepoolmachines.yaml @@ -148,6 +148,9 @@ spec: Any transient errors that occur during the reconciliation of MachinePools can be added as events to the MachinePool object and/or logged in the controller's output. + + Deprecated: This field is deprecated and will be removed in a future version. + Use conditions to surface terminal errors instead. type: string failureReason: description: |- @@ -158,7 +161,21 @@ spec: Any transient errors that occur during the reconciliation of MachinePools can be added as events to the MachinePool object and/or logged in the controller's output. + + Deprecated: This field is deprecated and will be removed in a future version. + Use conditions to surface terminal errors instead. type: string + initialization: + description: |- + initialization provides observations of the AzureMachinePoolMachine initialization process. + NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial Machine provisioning. + properties: + provisioned: + description: |- + provisioned is true when the infrastructure provider reports that the Machine's infrastructure is fully provisioned. + NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial Machine provisioning. + type: boolean + type: object instanceName: description: InstanceName is the name of the Machine Instance within the VMSS @@ -256,6 +273,75 @@ spec: ready: description: Ready is true when the provider resource is ready. type: boolean + v1beta2: + description: v1beta2 groups all the fields that will be added or modified + in AzureMachinePoolMachine's status with the v1beta2 version of + the Cluster API contract. + properties: + conditions: + description: conditions represents the observations of an AzureMachinePoolMachine's + current state. + items: + description: Condition contains details for one aspect of the + current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object version: description: Version defines the Kubernetes version for the VM Instance type: string diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepools.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepools.yaml index 0fabc3a2e1b..1f781130d75 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepools.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepools.yaml @@ -880,6 +880,9 @@ spec: Any transient errors that occur during the reconciliation of MachinePools can be added as events to the MachinePool object and/or logged in the controller's output. + + Deprecated: This field is deprecated and will be removed in a future version. + Use conditions to surface terminal errors instead. type: string failureReason: description: |- @@ -899,6 +902,9 @@ spec: Any transient errors that occur during the reconciliation of MachinePools can be added as events to the MachinePool object and/or logged in the controller's output. + + Deprecated: This field is deprecated and will be removed in a future version. + Use conditions to surface terminal errors instead. type: string image: description: |- @@ -1076,6 +1082,17 @@ spec: description: InfrastructureMachineKind is the kind of the infrastructure resources behind MachinePool Machines. type: string + initialization: + description: |- + initialization provides observations of the AzureMachinePool initialization process. + NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial MachinePool provisioning. + properties: + provisioned: + description: |- + provisioned is true when the infrastructure provider reports that the MachinePool's infrastructure is fully provisioned. + NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial MachinePool provisioning. + type: boolean + type: object instances: description: Instances is the VM instance status for each VM in the VMSS @@ -1161,6 +1178,75 @@ spec: description: Replicas is the most recently observed number of replicas. format: int32 type: integer + v1beta2: + description: v1beta2 groups all the fields that will be added or modified + in AzureMachinePool's status with the v1beta2 version of the Cluster + API contract. + properties: + conditions: + description: conditions represents the observations of an AzureMachinePool's + current state. + items: + description: Condition contains details for one aspect of the + current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object version: description: Version is the Kubernetes version for the current VMSS model diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachines.yaml index a6e2f806590..3616bea02f4 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachines.yaml @@ -809,18 +809,8 @@ spec: reconciling the Machine and will contain a more verbose string suitable for logging and human consumption. - This field 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 Machine's spec or the configuration of - the 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 controller, or the - responsible controller itself being critically misconfigured. - - Any transient errors that occur during the reconciliation of Machines - can be added as events to the Machine object and/or logged in the - controller's output. + Deprecated: This field is deprecated and will be removed in a future version. + Use conditions to surface terminal errors instead. type: string failureReason: description: |- @@ -828,19 +818,20 @@ spec: reconciling the Machine and will contain a succinct value suitable for machine interpretation. - This field 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 Machine's spec or the configuration of - the 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 controller, or the - responsible controller itself being critically misconfigured. - - Any transient errors that occur during the reconciliation of Machines - can be added as events to the Machine object and/or logged in the - controller's output. + Deprecated: This field is deprecated and will be removed in a future version. + Use conditions to surface terminal errors instead. type: string + initialization: + description: |- + initialization provides observations of the AzureMachine initialization process. + NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial Machine provisioning. + properties: + provisioned: + description: |- + provisioned is true when the infrastructure provider reports that the Machine's infrastructure is fully provisioned. + NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial Machine provisioning. + type: boolean + type: object longRunningOperationStates: description: |- LongRunningOperationStates saves the states for Azure long-running operations so they can be continued on the @@ -881,6 +872,75 @@ spec: ready: description: Ready is true when the provider resource is ready. type: boolean + v1beta2: + description: v1beta2 groups all the fields that will be added or modified + in AzureMachine's status with the v1beta2 version of the Cluster + API contract. + properties: + conditions: + description: conditions represents the observations of an AzureMachine's + current state. + items: + description: Condition contains details for one aspect of the + current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object vmState: description: VMState is the provisioning state of the Azure virtual machine. diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedclusters.yaml index 8ebd036b496..bd194f91452 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedclusters.yaml @@ -80,6 +80,17 @@ spec: status: description: AzureManagedClusterStatus defines the observed state of AzureManagedCluster. properties: + initialization: + description: |- + initialization provides observations of the AzureManagedCluster initialization process. + NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial Cluster provisioning. + properties: + provisioned: + description: |- + provisioned is true when the infrastructure provider reports that the Cluster's infrastructure is fully provisioned. + NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial Cluster provisioning. + type: boolean + type: object ready: description: Ready is true when the provider resource is ready. type: boolean diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanes.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanes.yaml index aeb28ffdf17..1d473ca5adc 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanes.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanes.yaml @@ -972,6 +972,17 @@ spec: - type type: object type: array + initialization: + description: |- + initialization provides observations of the AzureManagedControlPlane initialization process. + NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial ControlPlane provisioning. + properties: + controlPlaneInitialized: + description: |- + controlPlaneInitialized is true when the control plane provider reports that the control plane is initialized. + NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial Cluster provisioning. + type: boolean + type: object initialized: description: |- Initialized is true when the control plane is available for initial contact. @@ -1026,6 +1037,75 @@ spec: ready: description: Ready is true when the provider resource is ready. type: boolean + v1beta2: + description: v1beta2 groups all the fields that will be added or modified + in AzureManagedControlPlane's status with the v1beta2 version of + the Cluster API contract. + properties: + conditions: + description: conditions represents the observations of an AzureManagedControlPlane's + current state. + items: + description: Condition contains details for one aspect of the + current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object version: description: Version defines the Kubernetes version for the control plane instance. diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepools.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepools.yaml index 9468624fca2..465c1fa55bc 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepools.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepools.yaml @@ -689,13 +689,30 @@ spec: Any transient errors that occur during the reconciliation of Machines can be added as events to the Machine object and/or logged in the controller's output. + + Deprecated: This field is deprecated and will be removed in a future version. + Use conditions to surface terminal errors instead. type: string errorReason: description: |- Any transient errors that occur during the reconciliation of Machines can be added as events to the Machine object and/or logged in the controller's output. + + Deprecated: This field is deprecated and will be removed in a future version. + Use conditions to surface terminal errors instead. type: string + initialization: + description: |- + initialization provides observations of the AzureManagedMachinePool initialization process. + NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial MachinePool provisioning. + properties: + provisioned: + description: |- + provisioned is true when the infrastructure provider reports that the MachinePool's infrastructure is fully provisioned. + NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial MachinePool provisioning. + type: boolean + type: object longRunningOperationStates: description: |- LongRunningOperationStates saves the states for Azure long-running operations so they can be continued on the @@ -740,6 +757,75 @@ spec: description: Replicas is the most recently observed number of replicas. format: int32 type: integer + v1beta2: + description: v1beta2 groups all the fields that will be added or modified + in AzureManagedMachinePool's status with the v1beta2 version of + the Cluster API contract. + properties: + conditions: + description: conditions represents the observations of an AzureManagedMachinePool's + current state. + items: + description: Condition contains details for one aspect of the + current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object type: object type: object served: true diff --git a/controllers/azuremachine_controller.go b/controllers/azuremachine_controller.go index f1d2b319e11..d8f6260d377 100644 --- a/controllers/azuremachine_controller.go +++ b/controllers/azuremachine_controller.go @@ -241,7 +241,7 @@ func (amr *AzureMachineReconciler) reconcileNormal(ctx context.Context, machineS log.Info("Reconciling AzureMachine") // If the AzureMachine is in an error state, return early. - if machineScope.AzureMachine.Status.FailureReason != nil || machineScope.AzureMachine.Status.FailureMessage != nil { + if machineScope.AzureMachine.Status.FailureReason != nil || machineScope.AzureMachine.Status.FailureMessage != nil { //nolint:staticcheck // will be removed when failureReason/failureMessage are dropped log.Info("Error state detected, skipping reconciliation") return reconcile.Result{}, nil } diff --git a/controllers/azuremachine_controller_test.go b/controllers/azuremachine_controller_test.go index ba7fa0590d2..2bf02f9c196 100644 --- a/controllers/azuremachine_controller_test.go +++ b/controllers/azuremachine_controller_test.go @@ -185,7 +185,7 @@ func TestAzureMachineReconcileNormal(t *testing.T) { }, "should skip reconciliation if error state is detected on azure machine": { azureMachineOptions: func(am *infrav1.AzureMachine) { - am.Status.FailureReason = ptr.To(azure.UpdateError) + am.Status.FailureReason = ptr.To(azure.UpdateError) //nolint:staticcheck // will be removed when failureReason/failureMessage are dropped }, createAzureMachineService: getFakeAzureMachineService, }, @@ -254,8 +254,8 @@ func TestAzureMachineReconcileNormal(t *testing.T) { g.Expect(machineScope.AzureMachine.Status.Ready).To(BeTrue()) } if tc.machineScopeFailureReason != "" { - g.Expect(machineScope.AzureMachine.Status.FailureReason).NotTo(BeNil()) - g.Expect(*machineScope.AzureMachine.Status.FailureReason).To(Equal(tc.machineScopeFailureReason)) + g.Expect(machineScope.AzureMachine.Status.FailureReason).NotTo(BeNil()) //nolint:staticcheck // will be removed when failureReason/failureMessage are dropped + g.Expect(*machineScope.AzureMachine.Status.FailureReason).To(Equal(tc.machineScopeFailureReason)) //nolint:staticcheck // will be removed when failureReason/failureMessage are dropped } if tc.expectedErr != "" { g.Expect(err).To(HaveOccurred()) diff --git a/exp/api/v1beta1/azuremachinepool_types.go b/exp/api/v1beta1/azuremachinepool_types.go index a3c24754826..7463fc0767d 100644 --- a/exp/api/v1beta1/azuremachinepool_types.go +++ b/exp/api/v1beta1/azuremachinepool_types.go @@ -284,6 +284,9 @@ type ( // Any transient errors that occur during the reconciliation of MachinePools // can be added as events to the MachinePool object and/or logged in the // controller's output. + // + // Deprecated: This field is deprecated and will be removed in a future version. + // Use conditions to surface terminal errors instead. // +optional FailureReason *string `json:"failureReason,omitempty"` @@ -303,6 +306,9 @@ type ( // Any transient errors that occur during the reconciliation of MachinePools // can be added as events to the MachinePool object and/or logged in the // controller's output. + // + // Deprecated: This field is deprecated and will be removed in a future version. + // Use conditions to surface terminal errors instead. // +optional FailureMessage *string `json:"failureMessage,omitempty"` @@ -318,6 +324,15 @@ type ( // InfrastructureMachineKind is the kind of the infrastructure resources behind MachinePool Machines. // +optional InfrastructureMachineKind string `json:"infrastructureMachineKind,omitempty"` + + // initialization provides observations of the AzureMachinePool initialization process. + // NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial MachinePool provisioning. + // +optional + Initialization *AzureMachinePoolInitializationStatus `json:"initialization,omitempty"` + + // v1beta2 groups all the fields that will be added or modified in AzureMachinePool's status with the v1beta2 version of the Cluster API contract. + // +optional + V1Beta2 *AzureMachinePoolV1Beta2Status `json:"v1beta2,omitempty"` } // AzureMachinePoolInstanceStatus provides status information for each instance in the VMSS. @@ -380,6 +395,24 @@ type ( } ) +// AzureMachinePoolInitializationStatus provides observations of the AzureMachinePool initialization process. +type AzureMachinePoolInitializationStatus struct { + // provisioned is true when the infrastructure provider reports that the MachinePool's infrastructure is fully provisioned. + // NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial MachinePool provisioning. + // +optional + Provisioned *bool `json:"provisioned,omitempty"` +} + +// AzureMachinePoolV1Beta2Status groups all the fields that will be added or modified in AzureMachinePool with the v1beta2 version of the Cluster API contract. +type AzureMachinePoolV1Beta2Status struct { + // conditions represents the observations of an AzureMachinePool's current state. + // +optional + // +listType=map + // +listMapKey=type + // +kubebuilder:validation:MaxItems=32 + Conditions []metav1.Condition `json:"conditions,omitempty"` +} + // GetConditions returns the list of conditions for an AzureMachinePool API object. func (amp *AzureMachinePool) GetConditions() clusterv1beta1.Conditions { return amp.Status.Conditions @@ -390,6 +423,24 @@ func (amp *AzureMachinePool) SetConditions(conditions clusterv1beta1.Conditions) amp.Status.Conditions = conditions } +// GetV1Beta2Conditions returns the v1beta2 conditions for an AzureMachinePool API object. +// Note: GetV1Beta2Conditions will be renamed to GetConditions in a later stage of the transition to the v1beta2 Cluster API contract. +func (amp *AzureMachinePool) GetV1Beta2Conditions() []metav1.Condition { + if amp.Status.V1Beta2 == nil { + return nil + } + return amp.Status.V1Beta2.Conditions +} + +// SetV1Beta2Conditions sets the v1beta2 conditions on an AzureMachinePool object. +// Note: SetV1Beta2Conditions will be renamed to SetConditions in a later stage of the transition to the v1beta2 Cluster API contract. +func (amp *AzureMachinePool) SetV1Beta2Conditions(conditions []metav1.Condition) { + if amp.Status.V1Beta2 == nil { + amp.Status.V1Beta2 = &AzureMachinePoolV1Beta2Status{} + } + amp.Status.V1Beta2.Conditions = conditions +} + // GetFutures returns the list of long running operation states for an AzureMachinePool API object. func (amp *AzureMachinePool) GetFutures() infrav1.Futures { return amp.Status.LongRunningOperationStates diff --git a/exp/api/v1beta1/azuremachinepoolmachine_types.go b/exp/api/v1beta1/azuremachinepoolmachine_types.go index c95f6c012ce..73ea842f1fe 100644 --- a/exp/api/v1beta1/azuremachinepoolmachine_types.go +++ b/exp/api/v1beta1/azuremachinepoolmachine_types.go @@ -69,6 +69,9 @@ type ( // Any transient errors that occur during the reconciliation of MachinePools // can be added as events to the MachinePool object and/or logged in the // controller's output. + // + // Deprecated: This field is deprecated and will be removed in a future version. + // Use conditions to surface terminal errors instead. // +optional FailureReason *string `json:"failureReason,omitempty"` @@ -79,6 +82,9 @@ type ( // Any transient errors that occur during the reconciliation of MachinePools // can be added as events to the MachinePool object and/or logged in the // controller's output. + // + // Deprecated: This field is deprecated and will be removed in a future version. + // Use conditions to surface terminal errors instead. // +optional FailureMessage *string `json:"failureMessage,omitempty"` @@ -100,6 +106,15 @@ type ( // Ready is true when the provider resource is ready. // +optional Ready bool `json:"ready"` + + // initialization provides observations of the AzureMachinePoolMachine initialization process. + // NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial Machine provisioning. + // +optional + Initialization *AzureMachinePoolMachineInitializationStatus `json:"initialization,omitempty"` + + // v1beta2 groups all the fields that will be added or modified in AzureMachinePoolMachine's status with the v1beta2 version of the Cluster API contract. + // +optional + V1Beta2 *AzureMachinePoolMachineV1Beta2Status `json:"v1beta2,omitempty"` } // +kubebuilder:object:root=true @@ -132,6 +147,24 @@ type ( } ) +// AzureMachinePoolMachineInitializationStatus provides observations of the AzureMachinePoolMachine initialization process. +type AzureMachinePoolMachineInitializationStatus struct { + // provisioned is true when the infrastructure provider reports that the Machine's infrastructure is fully provisioned. + // NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial Machine provisioning. + // +optional + Provisioned *bool `json:"provisioned,omitempty"` +} + +// AzureMachinePoolMachineV1Beta2Status groups all the fields that will be added or modified in AzureMachinePoolMachine with the v1beta2 version of the Cluster API contract. +type AzureMachinePoolMachineV1Beta2Status struct { + // conditions represents the observations of an AzureMachinePoolMachine's current state. + // +optional + // +listType=map + // +listMapKey=type + // +kubebuilder:validation:MaxItems=32 + Conditions []metav1.Condition `json:"conditions,omitempty"` +} + // GetConditions returns the list of conditions for an AzureMachinePool API object. func (ampm *AzureMachinePoolMachine) GetConditions() clusterv1beta1.Conditions { return ampm.Status.Conditions @@ -142,6 +175,24 @@ func (ampm *AzureMachinePoolMachine) SetConditions(conditions clusterv1beta1.Con ampm.Status.Conditions = conditions } +// GetV1Beta2Conditions returns the v1beta2 conditions for an AzureMachinePoolMachine API object. +// Note: GetV1Beta2Conditions will be renamed to GetConditions in a later stage of the transition to the v1beta2 Cluster API contract. +func (ampm *AzureMachinePoolMachine) GetV1Beta2Conditions() []metav1.Condition { + if ampm.Status.V1Beta2 == nil { + return nil + } + return ampm.Status.V1Beta2.Conditions +} + +// SetV1Beta2Conditions sets the v1beta2 conditions on an AzureMachinePoolMachine object. +// Note: SetV1Beta2Conditions will be renamed to SetConditions in a later stage of the transition to the v1beta2 Cluster API contract. +func (ampm *AzureMachinePoolMachine) SetV1Beta2Conditions(conditions []metav1.Condition) { + if ampm.Status.V1Beta2 == nil { + ampm.Status.V1Beta2 = &AzureMachinePoolMachineV1Beta2Status{} + } + ampm.Status.V1Beta2.Conditions = conditions +} + // GetFutures returns the list of long running operation states for an AzureMachinePoolMachine API object. func (ampm *AzureMachinePoolMachine) GetFutures() infrav1.Futures { return ampm.Status.LongRunningOperationStates diff --git a/exp/api/v1beta1/zz_generated.deepcopy.go b/exp/api/v1beta1/zz_generated.deepcopy.go index 2083b59c5b5..6525c36b4cd 100644 --- a/exp/api/v1beta1/zz_generated.deepcopy.go +++ b/exp/api/v1beta1/zz_generated.deepcopy.go @@ -21,7 +21,8 @@ limitations under the License. package v1beta1 import ( - "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" apiv1beta1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" @@ -75,6 +76,26 @@ func (in *AzureMachinePoolDeploymentStrategy) DeepCopy() *AzureMachinePoolDeploy return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureMachinePoolInitializationStatus) DeepCopyInto(out *AzureMachinePoolInitializationStatus) { + *out = *in + if in.Provisioned != nil { + in, out := &in.Provisioned, &out.Provisioned + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachinePoolInitializationStatus. +func (in *AzureMachinePoolInitializationStatus) DeepCopy() *AzureMachinePoolInitializationStatus { + if in == nil { + return nil + } + out := new(AzureMachinePoolInitializationStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AzureMachinePoolInstanceStatus) DeepCopyInto(out *AzureMachinePoolInstanceStatus) { *out = *in @@ -154,6 +175,26 @@ func (in *AzureMachinePoolMachine) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureMachinePoolMachineInitializationStatus) DeepCopyInto(out *AzureMachinePoolMachineInitializationStatus) { + *out = *in + if in.Provisioned != nil { + in, out := &in.Provisioned, &out.Provisioned + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachinePoolMachineInitializationStatus. +func (in *AzureMachinePoolMachineInitializationStatus) DeepCopy() *AzureMachinePoolMachineInitializationStatus { + if in == nil { + return nil + } + out := new(AzureMachinePoolMachineInitializationStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AzureMachinePoolMachineList) DeepCopyInto(out *AzureMachinePoolMachineList) { *out = *in @@ -206,7 +247,7 @@ func (in *AzureMachinePoolMachineStatus) DeepCopyInto(out *AzureMachinePoolMachi *out = *in if in.NodeRef != nil { in, out := &in.NodeRef, &out.NodeRef - *out = new(v1.ObjectReference) + *out = new(corev1.ObjectReference) **out = **in } if in.ProvisioningState != nil { @@ -236,6 +277,16 @@ func (in *AzureMachinePoolMachineStatus) DeepCopyInto(out *AzureMachinePoolMachi *out = make(apiv1beta1.Futures, len(*in)) copy(*out, *in) } + if in.Initialization != nil { + in, out := &in.Initialization, &out.Initialization + *out = new(AzureMachinePoolMachineInitializationStatus) + (*in).DeepCopyInto(*out) + } + if in.V1Beta2 != nil { + in, out := &in.V1Beta2, &out.V1Beta2 + *out = new(AzureMachinePoolMachineV1Beta2Status) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachinePoolMachineStatus. @@ -320,6 +371,28 @@ func (in *AzureMachinePoolMachineTemplate) DeepCopy() *AzureMachinePoolMachineTe return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureMachinePoolMachineV1Beta2Status) DeepCopyInto(out *AzureMachinePoolMachineV1Beta2Status) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachinePoolMachineV1Beta2Status. +func (in *AzureMachinePoolMachineV1Beta2Status) DeepCopy() *AzureMachinePoolMachineV1Beta2Status { + if in == nil { + return nil + } + out := new(AzureMachinePoolMachineV1Beta2Status) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AzureMachinePoolSpec) DeepCopyInto(out *AzureMachinePoolSpec) { *out = *in @@ -415,6 +488,16 @@ func (in *AzureMachinePoolStatus) DeepCopyInto(out *AzureMachinePoolStatus) { *out = make(apiv1beta1.Futures, len(*in)) copy(*out, *in) } + if in.Initialization != nil { + in, out := &in.Initialization, &out.Initialization + *out = new(AzureMachinePoolInitializationStatus) + (*in).DeepCopyInto(*out) + } + if in.V1Beta2 != nil { + in, out := &in.V1Beta2, &out.V1Beta2 + *out = new(AzureMachinePoolV1Beta2Status) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachinePoolStatus. @@ -427,6 +510,28 @@ func (in *AzureMachinePoolStatus) DeepCopy() *AzureMachinePoolStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureMachinePoolV1Beta2Status) DeepCopyInto(out *AzureMachinePoolV1Beta2Status) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachinePoolV1Beta2Status. +func (in *AzureMachinePoolV1Beta2Status) DeepCopy() *AzureMachinePoolV1Beta2Status { + if in == nil { + return nil + } + out := new(AzureMachinePoolV1Beta2Status) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MachineRollingUpdateDeployment) DeepCopyInto(out *MachineRollingUpdateDeployment) { *out = *in diff --git a/exp/controllers/azuremachinepool_controller.go b/exp/controllers/azuremachinepool_controller.go index 0386cd1efa5..3a099ab8dcc 100644 --- a/exp/controllers/azuremachinepool_controller.go +++ b/exp/controllers/azuremachinepool_controller.go @@ -267,7 +267,7 @@ func (ampr *AzureMachinePoolReconciler) reconcileNormal(ctx context.Context, mac log.Info("Reconciling AzureMachinePool") // If the AzureMachine is in an error state, return early. - if machinePoolScope.AzureMachinePool.Status.FailureReason != nil || machinePoolScope.AzureMachinePool.Status.FailureMessage != nil { + if machinePoolScope.AzureMachinePool.Status.FailureReason != nil || machinePoolScope.AzureMachinePool.Status.FailureMessage != nil { //nolint:staticcheck // will be removed when failureReason/failureMessage are dropped log.Info("Error state detected, skipping reconciliation") return reconcile.Result{}, nil } diff --git a/exp/controllers/azuremachinepoolmachine_controller.go b/exp/controllers/azuremachinepoolmachine_controller.go index 41a85855ba2..928429943cc 100644 --- a/exp/controllers/azuremachinepoolmachine_controller.go +++ b/exp/controllers/azuremachinepoolmachine_controller.go @@ -262,7 +262,7 @@ func (ampmr *AzureMachinePoolMachineController) reconcileNormal(ctx context.Cont log.Info("Reconciling AzureMachinePoolMachine") // If the AzureMachine is in an error state, return early. - if machineScope.AzureMachinePool.Status.FailureReason != nil || machineScope.AzureMachinePool.Status.FailureMessage != nil { + if machineScope.AzureMachinePool.Status.FailureReason != nil || machineScope.AzureMachinePool.Status.FailureMessage != nil { //nolint:staticcheck // will be removed when failureReason/failureMessage are dropped log.Info("Error state detected, skipping reconciliation") return reconcile.Result{}, nil } diff --git a/exp/controllers/azuremachinepoolmachine_controller_test.go b/exp/controllers/azuremachinepoolmachine_controller_test.go index 12648983e17..561bd654faf 100644 --- a/exp/controllers/azuremachinepoolmachine_controller_test.go +++ b/exp/controllers/azuremachinepoolmachine_controller_test.go @@ -75,8 +75,8 @@ func TestAzureMachinePoolMachineReconciler_Reconcile(t *testing.T) { Namespace: "default", }, ampm) g.Expect(err).NotTo(HaveOccurred()) - g.Expect(ampm.Status.FailureReason).To(BeNil()) - g.Expect(ampm.Status.FailureMessage).To(BeNil()) + g.Expect(ampm.Status.FailureReason).To(BeNil()) //nolint:staticcheck // will be removed when failureReason/failureMessage are dropped + g.Expect(ampm.Status.FailureMessage).To(BeNil()) //nolint:staticcheck // will be removed when failureReason/failureMessage are dropped }, }, {