Skip to content

Commit bf195d9

Browse files
committed
Remove MD spec.progressDeadlineSeconds
Signed-off-by: Stefan Büringer buringerst@vmware.com
1 parent 72b19b1 commit bf195d9

17 files changed

+63
-87
lines changed

.golangci.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,6 @@ linters:
245245
- linters:
246246
- staticcheck
247247
text: 'SA1019: ((deployment|m|md).Spec.RevisionHistoryLimit|clusterv1.RevisionHistoryAnnotation|c.RolloutUndo) is deprecated'
248-
# Deprecations for MD revision management
249-
- linters:
250-
- staticcheck
251-
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.'
252248
# Deprecations for MHC MaxUnhealthy, UnhealthyRange
253249
- linters:
254250
- staticcheck

api/v1beta1/conversion.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,11 @@ func Convert_v1beta2_Topology_To_v1beta1_Topology(in *clusterv1.Topology, out *T
327327
return nil
328328
}
329329

330+
func Convert_v1beta1_MachineDeploymentSpec_To_v1beta2_MachineDeploymentSpec(in *MachineDeploymentSpec, out *clusterv1.MachineDeploymentSpec, s apimachineryconversion.Scope) error {
331+
// NOTE: v1beta2 MachineDeploymentSpec does not have ProgressDeadlineSeconds anymore. But it's fine to just lose this field it was never used.
332+
return autoConvert_v1beta1_MachineDeploymentSpec_To_v1beta2_MachineDeploymentSpec(in, out, s)
333+
}
334+
330335
func Convert_v1beta2_MachineDeploymentStatus_To_v1beta1_MachineDeploymentStatus(in *clusterv1.MachineDeploymentStatus, out *MachineDeploymentStatus, s apimachineryconversion.Scope) error {
331336
if err := autoConvert_v1beta2_MachineDeploymentStatus_To_v1beta1_MachineDeploymentStatus(in, out, s); err != nil {
332337
return err

api/v1beta1/conversion_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ func spokeMachineSetStatus(in *MachineSetStatus, c fuzz.Continue) {
290290
func MachineDeploymentFuzzFuncs(_ runtimeserializer.CodecFactory) []interface{} {
291291
return []interface{}{
292292
hubMachineDeploymentStatus,
293+
spokeMachineDeploymentSpec,
293294
spokeMachineDeploymentStatus,
294295
}
295296
}
@@ -305,6 +306,13 @@ func hubMachineDeploymentStatus(in *clusterv1.MachineDeploymentStatus, c fuzz.Co
305306
}
306307
}
307308

309+
func spokeMachineDeploymentSpec(in *MachineDeploymentSpec, c fuzz.Continue) {
310+
c.FuzzNoCustom(in)
311+
312+
// Drop ProgressDeadlineSeconds as we intentionally don't preserve it.
313+
in.ProgressDeadlineSeconds = nil
314+
}
315+
308316
func spokeMachineDeploymentStatus(in *MachineDeploymentStatus, c fuzz.Continue) {
309317
c.FuzzNoCustom(in)
310318
// Drop empty structs with only omit empty fields.

api/v1beta1/zz_generated.conversion.go

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

api/v1beta2/machinedeployment_types.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -312,17 +312,6 @@ type MachineDeploymentSpec struct {
312312
// paused indicates that the deployment is paused.
313313
// +optional
314314
Paused bool `json:"paused,omitempty"`
315-
316-
// progressDeadlineSeconds is the maximum time in seconds for a deployment to make progress before it
317-
// is considered to be failed. The deployment controller will continue to
318-
// process failed deployments and a condition with a ProgressDeadlineExceeded
319-
// reason will be surfaced in the deployment status. Note that progress will
320-
// not be estimated during the time a deployment is paused. Defaults to 600s.
321-
//
322-
// 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.
323-
//
324-
// +optional
325-
ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty"`
326315
}
327316

328317
// ANCHOR_END: MachineDeploymentSpec

api/v1beta2/zz_generated.deepcopy.go

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

api/v1beta2/zz_generated.openapi.go

Lines changed: 0 additions & 7 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_machinedeployments.yaml

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

internal/apis/core/v1alpha3/conversion.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,11 @@ func Convert_v1beta2_MachineSetSpec_To_v1alpha3_MachineSetSpec(in *clusterv1.Mac
503503
return autoConvert_v1beta2_MachineSetSpec_To_v1alpha3_MachineSetSpec(in, out, s)
504504
}
505505

506+
func Convert_v1alpha3_MachineDeploymentSpec_To_v1beta2_MachineDeploymentSpec(in *MachineDeploymentSpec, out *clusterv1.MachineDeploymentSpec, s apimachineryconversion.Scope) error {
507+
// NOTE: v1beta2 MachineDeploymentSpec does not have ProgressDeadlineSeconds anymore. But it's fine to just lose this field it was never used.
508+
return autoConvert_v1alpha3_MachineDeploymentSpec_To_v1beta2_MachineDeploymentSpec(in, out, s)
509+
}
510+
506511
func Convert_v1alpha3_MachineDeploymentStatus_To_v1beta2_MachineDeploymentStatus(in *MachineDeploymentStatus, out *clusterv1.MachineDeploymentStatus, s apimachineryconversion.Scope) error {
507512
return autoConvert_v1alpha3_MachineDeploymentStatus_To_v1beta2_MachineDeploymentStatus(in, out, s)
508513
}

internal/apis/core/v1alpha3/conversion_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ func hubMachineSetStatus(in *clusterv1.MachineSetStatus, c fuzz.Continue) {
122122
func MachineDeploymentFuzzFunc(_ runtimeserializer.CodecFactory) []interface{} {
123123
return []interface{}{
124124
hubMachineDeploymentStatus,
125+
spokeMachineDeploymentSpec,
125126
spokeObjectMeta,
126127
spokeBootstrap,
127128
}
@@ -138,6 +139,13 @@ func hubMachineDeploymentStatus(in *clusterv1.MachineDeploymentStatus, c fuzz.Co
138139
}
139140
}
140141

142+
func spokeMachineDeploymentSpec(in *MachineDeploymentSpec, c fuzz.Continue) {
143+
c.FuzzNoCustom(in)
144+
145+
// Drop ProgressDeadlineSeconds as we intentionally don't preserve it.
146+
in.ProgressDeadlineSeconds = nil
147+
}
148+
141149
func spokeObjectMeta(in *ObjectMeta, c fuzz.Continue) {
142150
c.FuzzNoCustom(in)
143151

internal/apis/core/v1alpha3/zz_generated.conversion.go

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

internal/apis/core/v1alpha4/conversion.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,11 @@ func Convert_v1alpha4_ClusterStatus_To_v1beta2_ClusterStatus(in *ClusterStatus,
643643
return autoConvert_v1alpha4_ClusterStatus_To_v1beta2_ClusterStatus(in, out, s)
644644
}
645645

646+
func Convert_v1alpha4_MachineDeploymentSpec_To_v1beta2_MachineDeploymentSpec(in *MachineDeploymentSpec, out *clusterv1.MachineDeploymentSpec, s apimachineryconversion.Scope) error {
647+
// NOTE: v1beta2 MachineDeploymentSpec does not have ProgressDeadlineSeconds anymore. But it's fine to just lose this field it was never used.
648+
return autoConvert_v1alpha4_MachineDeploymentSpec_To_v1beta2_MachineDeploymentSpec(in, out, s)
649+
}
650+
646651
func Convert_v1alpha4_MachineDeploymentStatus_To_v1beta2_MachineDeploymentStatus(in *MachineDeploymentStatus, out *clusterv1.MachineDeploymentStatus, s apimachineryconversion.Scope) error {
647652
return autoConvert_v1alpha4_MachineDeploymentStatus_To_v1beta2_MachineDeploymentStatus(in, out, s)
648653
}

internal/apis/core/v1alpha4/conversion_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ func hubMachineSetStatus(in *clusterv1.MachineSetStatus, c fuzz.Continue) {
208208
func MachineDeploymentFuzzFuncs(_ runtimeserializer.CodecFactory) []interface{} {
209209
return []interface{}{
210210
hubMachineDeploymentStatus,
211+
spokeMachineDeploymentSpec,
211212
}
212213
}
213214

@@ -222,6 +223,13 @@ func hubMachineDeploymentStatus(in *clusterv1.MachineDeploymentStatus, c fuzz.Co
222223
}
223224
}
224225

226+
func spokeMachineDeploymentSpec(in *MachineDeploymentSpec, c fuzz.Continue) {
227+
c.FuzzNoCustom(in)
228+
229+
// Drop ProgressDeadlineSeconds as we intentionally don't preserve it.
230+
in.ProgressDeadlineSeconds = nil
231+
}
232+
225233
func MachineHealthCheckFuzzFunc(_ runtimeserializer.CodecFactory) []interface{} {
226234
return []interface{}{
227235
hubMachineHealthCheckStatus,

internal/apis/core/v1alpha4/zz_generated.conversion.go

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

0 commit comments

Comments
 (0)