Skip to content

Commit

Permalink
set default advanced deployment strategy (#176)
Browse files Browse the repository at this point in the history
Signed-off-by: mingzhou.swx <[email protected]>
Co-authored-by: mingzhou.swx <[email protected]>
  • Loading branch information
veophi and mingzhou.swx authored Dec 19, 2023
1 parent e19a89c commit 8620408
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions pkg/webhook/workload/mutating/workload_update_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8620408

Please sign in to comment.