diff --git a/pkg/controller/batchrelease/control/partitionstyle/deployment/control.go b/pkg/controller/batchrelease/control/partitionstyle/deployment/control.go index e67ab33f..b5b6704e 100644 --- a/pkg/controller/batchrelease/control/partitionstyle/deployment/control.go +++ b/pkg/controller/batchrelease/control/partitionstyle/deployment/control.go @@ -95,6 +95,7 @@ func (rc *realController) Initialize(release *v1beta1.BatchRelease) error { RollingStyle: v1alpha1.PartitionRollingStyle, RollingUpdate: rollingUpdate, } + v1alpha1.SetDefaultDeploymentStrategy(&strategy) d := rc.object.DeepCopy() patchData := patch.NewDeploymentPatch() diff --git a/pkg/webhook/workload/mutating/workload_update_handler.go b/pkg/webhook/workload/mutating/workload_update_handler.go index 98bedf89..60a443de 100644 --- a/pkg/webhook/workload/mutating/workload_update_handler.go +++ b/pkg/webhook/workload/mutating/workload_update_handler.go @@ -285,6 +285,7 @@ func (h *WorkloadHandler) handleDeployment(newObj, oldObj *apps.Deployment) (boo modified = true strategy.Paused = true } + appsv1alpha1.SetDefaultDeploymentStrategy(&strategy) setDeploymentStrategyAnnotation(strategy, newObj) default: // Do not allow to modify strategy as Recreate during rolling