diff --git a/.golangci.yml b/.golangci.yml index afe04e8ffa64..171c3b210762 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -241,10 +241,14 @@ issues: - linters: - staticcheck text: "SA1019: ((deployment|m|md).Spec.RevisionHistoryLimit|clusterv1.RevisionHistoryAnnotation|c.RolloutUndo) is deprecated" - # Deprecations for MHC MaxUnhealthy, UnhealthyRange + # Deprecations for MHC MaxUnhealthy, UnhealthyRange - linters: - staticcheck text: "SA1019: (mhc|m)(.Spec.MaxUnhealthy|.Spec.UnhealthyRange) is deprecated" + # Deprecations for FailureMessage and FailureReason + - linters: + - staticcheck + text: "SA1019: .*\\.Status\\.(FailureMessage|FailureReason) is deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details." # Specific exclude rules for deprecated packages that are still part of the codebase. These # should be removed as the referenced deprecated packages are removed from the project. - linters: diff --git a/api/v1beta1/cluster_types.go b/api/v1beta1/cluster_types.go index d51fecb2924d..7732d07d949e 100644 --- a/api/v1beta1/cluster_types.go +++ b/api/v1beta1/cluster_types.go @@ -440,11 +440,17 @@ type ClusterStatus struct { // FailureReason indicates that there is a fatal problem reconciling the // state, and will be set to a token value suitable for // programmatic interpretation. + // + // Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + // // +optional FailureReason *capierrors.ClusterStatusError `json:"failureReason,omitempty"` // FailureMessage indicates that there is a fatal problem reconciling the // state, and will be set to a descriptive error message. + // + // Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + // // +optional FailureMessage *string `json:"failureMessage,omitempty"` diff --git a/api/v1beta1/machine_types.go b/api/v1beta1/machine_types.go index 2a75ad2a82e3..60d0e33b5492 100644 --- a/api/v1beta1/machine_types.go +++ b/api/v1beta1/machine_types.go @@ -465,6 +465,9 @@ type MachineStatus 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 is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + // // +optional FailureReason *capierrors.MachineStatusError `json:"failureReason,omitempty"` @@ -484,6 +487,9 @@ type MachineStatus 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 is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + // // +optional FailureMessage *string `json:"failureMessage,omitempty"` diff --git a/api/v1beta1/machineset_types.go b/api/v1beta1/machineset_types.go index e7dc0afd4767..8c15f70ab34a 100644 --- a/api/v1beta1/machineset_types.go +++ b/api/v1beta1/machineset_types.go @@ -181,8 +181,13 @@ type MachineSetStatus struct { // Any transient errors that occur during the reconciliation of Machines // can be added as events to the MachineSet object and/or logged in the // controller's output. + // + // Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + // // +optional FailureReason *capierrors.MachineSetStatusError `json:"failureReason,omitempty"` + // Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + // // +optional FailureMessage *string `json:"failureMessage,omitempty"` // Conditions defines current service state of the MachineSet. diff --git a/api/v1beta1/zz_generated.openapi.go b/api/v1beta1/zz_generated.openapi.go index 354cbbf9873d..a7345be50029 100644 --- a/api/v1beta1/zz_generated.openapi.go +++ b/api/v1beta1/zz_generated.openapi.go @@ -975,14 +975,14 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_ClusterStatus(ref common.Reference }, "failureReason": { SchemaProps: spec.SchemaProps{ - Description: "FailureReason indicates that there is a fatal problem reconciling the state, and will be set to a token value suitable for programmatic interpretation.", + Description: "FailureReason indicates that there is a fatal problem reconciling the state, and will be set to a token value suitable for programmatic interpretation.\n\nDeprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.", Type: []string{"string"}, Format: "", }, }, "failureMessage": { SchemaProps: spec.SchemaProps{ - Description: "FailureMessage indicates that there is a fatal problem reconciling the state, and will be set to a descriptive error message.", + Description: "FailureMessage indicates that there is a fatal problem reconciling the state, and will be set to a descriptive error message.\n\nDeprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.", Type: []string{"string"}, Format: "", }, @@ -3550,15 +3550,16 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineSetStatus(ref common.Refere }, "failureReason": { SchemaProps: spec.SchemaProps{ - Description: "In the event that there is a terminal problem reconciling the replicas, both FailureReason and FailureMessage will be set. FailureReason will be populated with a succinct value suitable for machine interpretation, while FailureMessage will contain a more verbose string suitable for logging and human consumption.\n\nThese fields should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is fundamentally wrong with the MachineTemplate's spec or the configuration of the machine controller, and that manual intervention is required. Examples of terminal errors would be invalid combinations of settings in the spec, values that are unsupported by the machine controller, or the responsible machine controller itself being critically misconfigured.\n\nAny transient errors that occur during the reconciliation of Machines can be added as events to the MachineSet object and/or logged in the controller's output.", + Description: "In the event that there is a terminal problem reconciling the replicas, both FailureReason and FailureMessage will be set. FailureReason will be populated with a succinct value suitable for machine interpretation, while FailureMessage will contain a more verbose string suitable for logging and human consumption.\n\nThese fields should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is fundamentally wrong with the MachineTemplate's spec or the configuration of the machine controller, and that manual intervention is required. Examples of terminal errors would be invalid combinations of settings in the spec, values that are unsupported by the machine controller, or the responsible machine controller itself being critically misconfigured.\n\nAny transient errors that occur during the reconciliation of Machines can be added as events to the MachineSet object and/or logged in the controller's output.\n\nDeprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.", Type: []string{"string"}, Format: "", }, }, "failureMessage": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.", + Type: []string{"string"}, + Format: "", }, }, "conditions": { @@ -3773,14 +3774,14 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineStatus(ref common.Reference }, "failureReason": { SchemaProps: spec.SchemaProps{ - Description: "FailureReason will be set in the event that there is a terminal problem reconciling the Machine and will contain a succinct value suitable for machine interpretation.\n\nThis 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.\n\nAny 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.", + Description: "FailureReason will be set in the event that there is a terminal problem reconciling the Machine and will contain a succinct value suitable for machine interpretation.\n\nThis 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.\n\nAny 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.\n\nDeprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.", Type: []string{"string"}, Format: "", }, }, "failureMessage": { SchemaProps: spec.SchemaProps{ - Description: "FailureMessage 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.\n\nThis 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.\n\nAny 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.", + Description: "FailureMessage 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.\n\nThis 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.\n\nAny 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.\n\nDeprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.", Type: []string{"string"}, Format: "", }, diff --git a/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go b/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go index fae7c85c7b5e..a49dadfa3a19 100644 --- a/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go +++ b/bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go @@ -427,10 +427,16 @@ type KubeadmConfigStatus struct { DataSecretName *string `json:"dataSecretName,omitempty"` // FailureReason will be set on non-retryable errors + // + // Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + // // +optional FailureReason string `json:"failureReason,omitempty"` // FailureMessage will be set on non-retryable errors + // + // Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + // // +optional FailureMessage string `json:"failureMessage,omitempty"` diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml index 68b64ff3176a..6690e64689be 100644 --- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml +++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml @@ -3751,10 +3751,16 @@ spec: the bootstrap data script. type: string failureMessage: - description: FailureMessage will be set on non-retryable errors + description: |- + FailureMessage will be set on non-retryable errors + + Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. type: string failureReason: - description: FailureReason will be set on non-retryable errors + description: |- + FailureReason will be set on non-retryable errors + + Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. type: string observedGeneration: description: ObservedGeneration is the latest generation observed diff --git a/config/crd/bases/cluster.x-k8s.io_clusters.yaml b/config/crd/bases/cluster.x-k8s.io_clusters.yaml index f8cc44b0464d..6f2877c5cc69 100644 --- a/config/crd/bases/cluster.x-k8s.io_clusters.yaml +++ b/config/crd/bases/cluster.x-k8s.io_clusters.yaml @@ -1767,12 +1767,16 @@ spec: description: |- FailureMessage indicates that there is a fatal problem reconciling the state, and will be set to a descriptive error message. + + Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. type: string failureReason: description: |- FailureReason indicates that there is a fatal problem reconciling the state, and will be set to a token value suitable for programmatic interpretation. + + Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. type: string infrastructureReady: description: InfrastructureReady is the state of the infrastructure diff --git a/config/crd/bases/cluster.x-k8s.io_machinepools.yaml b/config/crd/bases/cluster.x-k8s.io_machinepools.yaml index 97a2dfcd3e0b..608c36d43519 100644 --- a/config/crd/bases/cluster.x-k8s.io_machinepools.yaml +++ b/config/crd/bases/cluster.x-k8s.io_machinepools.yaml @@ -1368,11 +1368,15 @@ spec: description: |- FailureMessage indicates that there is a problem reconciling the state, and will be set to a descriptive error message. + + Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. type: string failureReason: description: |- FailureReason indicates that there is a problem reconciling the state, and will be set to a token value suitable for programmatic interpretation. + + Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. type: string infrastructureReady: description: InfrastructureReady is the state of the infrastructure diff --git a/config/crd/bases/cluster.x-k8s.io_machines.yaml b/config/crd/bases/cluster.x-k8s.io_machines.yaml index 7424c228641f..37dd970a37d3 100644 --- a/config/crd/bases/cluster.x-k8s.io_machines.yaml +++ b/config/crd/bases/cluster.x-k8s.io_machines.yaml @@ -1186,6 +1186,8 @@ 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 is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. type: string failureReason: description: |- @@ -1205,6 +1207,8 @@ 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 is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. type: string infrastructureReady: description: InfrastructureReady is the state of the infrastructure diff --git a/config/crd/bases/cluster.x-k8s.io_machinesets.yaml b/config/crd/bases/cluster.x-k8s.io_machinesets.yaml index baf357672fcb..4bcc3fc500b5 100644 --- a/config/crd/bases/cluster.x-k8s.io_machinesets.yaml +++ b/config/crd/bases/cluster.x-k8s.io_machinesets.yaml @@ -1337,6 +1337,9 @@ spec: type: object type: array failureMessage: + description: 'Deprecated: This field is deprecated and is going to + be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md + for more details.' type: string failureReason: description: |- @@ -1358,6 +1361,8 @@ spec: Any transient errors that occur during the reconciliation of Machines can be added as events to the MachineSet object and/or logged in the controller's output. + + Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. type: string fullyLabeledReplicas: description: The number of replicas that have labels matching the diff --git a/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go index 46f587036a1f..9fe0ab8079ea 100644 --- a/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go +++ b/controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_types.go @@ -290,11 +290,17 @@ type KubeadmControlPlaneStatus struct { // FailureReason indicates that there is a terminal problem reconciling the // state, and will be set to a token value suitable for // programmatic interpretation. + // + // Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + // // +optional FailureReason errors.KubeadmControlPlaneStatusError `json:"failureReason,omitempty"` // ErrorMessage indicates that there is a terminal problem reconciling the // state, and will be set to a descriptive error message. + // + // Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + // // +optional FailureMessage *string `json:"failureMessage,omitempty"` diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml index f47d7da87394..613e6bfd85f1 100644 --- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml +++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml @@ -4456,12 +4456,16 @@ spec: description: |- ErrorMessage indicates that there is a terminal problem reconciling the state, and will be set to a descriptive error message. + + Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. type: string failureReason: description: |- FailureReason indicates that there is a terminal problem reconciling the state, and will be set to a token value suitable for programmatic interpretation. + + Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. type: string initialized: description: |- diff --git a/exp/api/v1beta1/machinepool_types.go b/exp/api/v1beta1/machinepool_types.go index 263771918d94..46d063d9e880 100644 --- a/exp/api/v1beta1/machinepool_types.go +++ b/exp/api/v1beta1/machinepool_types.go @@ -94,11 +94,17 @@ type MachinePoolStatus struct { // FailureReason indicates that there is a problem reconciling the state, and // will be set to a token value suitable for programmatic interpretation. + // + // Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + // // +optional FailureReason *capierrors.MachinePoolStatusFailure `json:"failureReason,omitempty"` // FailureMessage indicates that there is a problem reconciling the state, // and will be set to a descriptive error message. + // + // Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. + // // +optional FailureMessage *string `json:"failureMessage,omitempty"` diff --git a/internal/contract/bootstrap.go b/internal/contract/bootstrap.go index 0aa39500c388..45a2a026ef0a 100644 --- a/internal/contract/bootstrap.go +++ b/internal/contract/bootstrap.go @@ -52,6 +52,8 @@ func (b *BootstrapContract) DataSecretName() *String { } // FailureReason provides access to the status.failureReason field in an bootstrap object. Note that this field is optional. +// +// Deprecated: This function is deprecated and is going to be removed. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. func (b *BootstrapContract) FailureReason() *String { return &String{ path: []string{"status", "failureReason"}, @@ -59,6 +61,8 @@ func (b *BootstrapContract) FailureReason() *String { } // FailureMessage provides access to the status.failureMessage field in an bootstrap object. Note that this field is optional. +// +// Deprecated: This function is deprecated and is going to be removed. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. func (b *BootstrapContract) FailureMessage() *String { return &String{ path: []string{"status", "failureMessage"}, diff --git a/internal/contract/controlplane.go b/internal/contract/controlplane.go index 53e0a911cb7c..9b54a7a76ff1 100644 --- a/internal/contract/controlplane.go +++ b/internal/contract/controlplane.go @@ -127,6 +127,8 @@ func (c *ControlPlaneContract) Selector() *String { } // FailureReason provides access to the status.failureReason field in an ControlPlane object. Note that this field is optional. +// +// Deprecated: This function is deprecated and is going to be removed. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. func (c *ControlPlaneContract) FailureReason() *String { return &String{ path: []string{"status", "failureReason"}, @@ -134,6 +136,8 @@ func (c *ControlPlaneContract) FailureReason() *String { } // FailureMessage provides access to the status.failureMessage field in an ControlPlane object. Note that this field is optional. +// +// Deprecated: This function is deprecated and is going to be removed. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. func (c *ControlPlaneContract) FailureMessage() *String { return &String{ path: []string{"status", "failureMessage"}, diff --git a/internal/contract/infrastructure_cluster.go b/internal/contract/infrastructure_cluster.go index d295c70d7f60..a1bcea2815ea 100644 --- a/internal/contract/infrastructure_cluster.go +++ b/internal/contract/infrastructure_cluster.go @@ -73,6 +73,8 @@ func (c *InfrastructureClusterContract) Ready() *Bool { } // FailureReason provides access to the status.failureReason field in an InfrastructureCluster object. Note that this field is optional. +// +// Deprecated: This function is deprecated and is going to be removed. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. func (c *InfrastructureClusterContract) FailureReason() *String { return &String{ path: []string{"status", "failureReason"}, @@ -80,6 +82,8 @@ func (c *InfrastructureClusterContract) FailureReason() *String { } // FailureMessage provides access to the status.failureMessage field in an InfrastructureCluster object. Note that this field is optional. +// +// Deprecated: This function is deprecated and is going to be removed. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. func (c *InfrastructureClusterContract) FailureMessage() *String { return &String{ path: []string{"status", "failureMessage"}, diff --git a/internal/contract/infrastructure_machine.go b/internal/contract/infrastructure_machine.go index 12bf956d8e30..f2f2bdba5040 100644 --- a/internal/contract/infrastructure_machine.go +++ b/internal/contract/infrastructure_machine.go @@ -55,6 +55,8 @@ func (m *InfrastructureMachineContract) ReadyConditionType() string { } // FailureReason provides access to the status.failureReason field in an InfrastructureMachine object. Note that this field is optional. +// +// Deprecated: This function is deprecated and is going to be removed. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. func (m *InfrastructureMachineContract) FailureReason() *String { return &String{ path: []string{"status", "failureReason"}, @@ -62,6 +64,8 @@ func (m *InfrastructureMachineContract) FailureReason() *String { } // FailureMessage provides access to the status.failureMessage field in an InfrastructureMachine object. Note that this field is optional. +// +// Deprecated: This function is deprecated and is going to be removed. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details. func (m *InfrastructureMachineContract) FailureMessage() *String { return &String{ path: []string{"status", "failureMessage"},