Skip to content

Commit 76328ed

Browse files
authored
Merge pull request #11317 from chrischdi/pr-deprecate-failure-message-reason
🌱 api: deprecate FailureMessage and FailureReason
2 parents 5d54746 + 9a7d894 commit 76328ed

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
@@ -463,6 +463,9 @@ type MachineStatus struct {
463463
// Any transient errors that occur during the reconciliation of Machines
464464
// can be added as events to the Machine object and/or logged in the
465465
// controller's output.
466+
//
467+
// 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.
468+
//
466469
// +optional
467470
FailureReason *capierrors.MachineStatusError `json:"failureReason,omitempty"`
468471

@@ -482,6 +485,9 @@ type MachineStatus struct {
482485
// Any transient errors that occur during the reconciliation of Machines
483486
// can be added as events to the Machine object and/or logged in the
484487
// controller's output.
488+
//
489+
// 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.
490+
//
485491
// +optional
486492
FailureMessage *string `json:"failureMessage,omitempty"`
487493

api/v1beta1/machineset_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,13 @@ type MachineSetStatus struct {
256256
// Any transient errors that occur during the reconciliation of Machines
257257
// can be added as events to the MachineSet object and/or logged in the
258258
// controller's output.
259+
//
260+
// 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.
261+
//
259262
// +optional
260263
FailureReason *capierrors.MachineSetStatusError `json:"failureReason,omitempty"`
264+
// 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.
265+
//
261266
// +optional
262267
FailureMessage *string `json:"failureMessage,omitempty"`
263268
// 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)