set default advanced deployment strategy (#176)
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com> Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
This commit is contained in:
parent
e19a89c16e
commit
862040870d
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue