From 42297c1488dcc8954116ca4aeff097ce3002707a Mon Sep 17 00:00:00 2001 From: fabriziopandini Date: Mon, 25 Nov 2024 17:55:53 +0100 Subject: [PATCH] Deprecate MD.Spec.ProgressDeadlineSeconds --- .golangci.yml | 6 +++++- api/v1beta1/machinedeployment_types.go | 3 +++ api/v1beta1/zz_generated.openapi.go | 2 +- config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml | 2 ++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index aff303989312..5dedb3868452 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -244,7 +244,11 @@ issues: - linters: - staticcheck text: "SA1019: ((deployment|m|md).Spec.RevisionHistoryLimit|clusterv1.RevisionHistoryAnnotation|c.RolloutUndo) is deprecated" - # Deprecations for MHC MaxUnhealthy, UnhealthyRange + # Deprecations for MD revision management + - linters: + - staticcheck + text: "SA1019: (m|md).Spec.ProgressDeadlineSeconds 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/issues/11470 for more details." + # Deprecations for MHC MaxUnhealthy, UnhealthyRange - linters: - staticcheck text: "SA1019: (mhc|m)(.Spec.MaxUnhealthy|.Spec.UnhealthyRange) is deprecated" diff --git a/api/v1beta1/machinedeployment_types.go b/api/v1beta1/machinedeployment_types.go index a6a0031c0e21..aa6b8eefa8f6 100644 --- a/api/v1beta1/machinedeployment_types.go +++ b/api/v1beta1/machinedeployment_types.go @@ -308,6 +308,9 @@ type MachineDeploymentSpec struct { // process failed deployments and a condition with a ProgressDeadlineExceeded // reason will be surfaced in the deployment status. Note that progress will // not be estimated during the time a deployment is paused. Defaults to 600s. + // + // Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/issues/11470 for more details. + // // +optional ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty"` } diff --git a/api/v1beta1/zz_generated.openapi.go b/api/v1beta1/zz_generated.openapi.go index 23f3ecfd8d9c..95dc99ffe68e 100644 --- a/api/v1beta1/zz_generated.openapi.go +++ b/api/v1beta1/zz_generated.openapi.go @@ -2242,7 +2242,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_MachineDeploymentSpec(ref common.R }, "progressDeadlineSeconds": { SchemaProps: spec.SchemaProps{ - Description: "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.", + Description: "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.\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/issues/11470 for more details.", Type: []string{"integer"}, Format: "int32", }, diff --git a/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml b/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml index 62aadc4b7192..d03f9797a397 100644 --- a/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml +++ b/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml @@ -1136,6 +1136,8 @@ spec: process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s. + + Deprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/issues/11470 for more details. format: int32 type: integer replicas: