Skip to content

Commit

Permalink
set default advanced deployment strategy
Browse files Browse the repository at this point in the history
Signed-off-by: mingzhou.swx <[email protected]>
  • Loading branch information
mingzhou.swx committed Sep 25, 2023
1 parent 57f9853 commit 6fcc8a1
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 @@ -94,6 +94,7 @@ func (rc *realController) Initialize(release *v1alpha1.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 @@ -284,6 +284,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 6fcc8a1

Please sign in to comment.