Skip to content

Commit 9a7d894

Browse files
committed
api: deprecate FailureMessage and FailureReason
1 parent 7ac4c86 commit 9a7d894

18 files changed

+93
-10
lines changed

.golangci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,14 @@ issues:
241241
- linters:
242242
- staticcheck
243243
text: "SA1019: ((deployment|m|md).Spec.RevisionHistoryLimit|clusterv1.RevisionHistoryAnnotation|c.RolloutUndo) is deprecated"
244-
# Deprecations for MHC MaxUnhealthy, UnhealthyRange
244+
# Deprecations for MHC MaxUnhealthy, UnhealthyRange
245245
- linters:
246246
- staticcheck
247247
text: "SA1019: (mhc|m)(.Spec.MaxUnhealthy|.Spec.UnhealthyRange) is deprecated"
248+
# Deprecations for FailureMessage and FailureReason
249+
- linters:
250+
- staticcheck
251+
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."
248252
# Specific exclude rules for deprecated packages that are still part of the codebase. These
249253
# should be removed as the referenced deprecated packages are removed from the project.
250254
- linters:

api/v1beta1/cluster_types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,11 +440,17 @@ type ClusterStatus struct {
440440
// FailureReason indicates that there is a fatal problem reconciling the
441441
// state, and will be set to a token value suitable for
442442
// programmatic interpretation.
443+
//
444+
// 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.
445+
//
443446
// +optional
444447
FailureReason *capierrors.ClusterStatusError `json:"failureReason,omitempty"`
445448

446449
// FailureMessage indicates that there is a fatal problem reconciling the
447450
// state, and will be set to a descriptive error message.
451+
//
452+
// 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.
453+
//
448454
// +optional
449455
FailureMessage *string `json:"failureMessage,omitempty"`
450456

api/v1beta1/machine_types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,9 @@ type MachineStatus struct {
465465
// Any transient errors that occur during the reconciliation of Machines
466466
// can be added as events to the Machine object and/or logged in the
467467
// controller's output.
468+
//
469+
// 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.
470+
//
468471
// +optional
469472
FailureReason *capierrors.MachineStatusError `json:"failureReason,omitempty"`
470473

@@ -484,6 +487,9 @@ type MachineStatus struct {
484487
// Any transient errors that occur during the reconciliation of Machines
485488
// can be added as events to the Machine object and/or logged in the
486489
// controller's output.
490+
//
491+
// 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.
492+
//
487493
// +optional
488494
FailureMessage *string `json:"failureMessage,omitempty"`
489495

api/v1beta1/machineset_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,13 @@ type MachineSetStatus struct {
181181
// Any transient errors that occur during the reconciliation of Machines
182182
// can be added as events to the MachineSet object and/or logged in the
183183
// controller's output.
184+
//
185+
// 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.
186+
//
184187
// +optional
185188
FailureReason *capierrors.MachineSetStatusError `json:"failureReason,omitempty"`
189+
// 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.
190+
//
186191
// +optional
187192
FailureMessage *string `json:"failureMessage,omitempty"`
188193
// Conditions defines current service state of the MachineSet.

api/v1beta1/zz_generated.openapi.go

Lines changed: 8 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,10 +427,16 @@ type KubeadmConfigStatus struct {
427427
DataSecretName *string `json:"dataSecretName,omitempty"`
428428

429429
// FailureReason will be set on non-retryable errors
430+
//
431+
// 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.
432+
//
430433
// +optional
431434
FailureReason string `json:"failureReason,omitempty"`
432435

433436
// FailureMessage will be set on non-retryable errors
437+
//
438+
// 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.
439+
//
434440
// +optional
435441
FailureMessage string `json:"failureMessage,omitempty"`
436442

bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/cluster.x-k8s.io_clusters.yaml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/cluster.x-k8s.io_machinepools.yaml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/cluster.x-k8s.io_machines.yaml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)