Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions api/v1beta1/azureasomanagedcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
13 changes: 13 additions & 0 deletions api/v1beta1/azureasomanagedcontrolplane_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions api/v1beta1/azureasomanagedmachinepool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
45 changes: 45 additions & 0 deletions api/v1beta1/azurecluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
32 changes: 32 additions & 0 deletions api/v1beta1/azureclusteridentity_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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{})
}
73 changes: 49 additions & 24 deletions api/v1beta1/azuremachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,37 +210,17 @@ 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"`

// ErrorMessage will be set in the event that there is a terminal problem
// 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"`

Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions api/v1beta1/azuremanagedcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
45 changes: 45 additions & 0 deletions api/v1beta1/azuremanagedcontrolplane_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
Loading
Loading