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,
|
RollingStyle: v1alpha1.PartitionRollingStyle,
|
||||||
RollingUpdate: rollingUpdate,
|
RollingUpdate: rollingUpdate,
|
||||||
}
|
}
|
||||||
|
v1alpha1.SetDefaultDeploymentStrategy(&strategy)
|
||||||
|
|
||||||
d := rc.object.DeepCopy()
|
d := rc.object.DeepCopy()
|
||||||
patchData := patch.NewDeploymentPatch()
|
patchData := patch.NewDeploymentPatch()
|
||||||
|
|
|
||||||
|
|
@ -285,6 +285,7 @@ func (h *WorkloadHandler) handleDeployment(newObj, oldObj *apps.Deployment) (boo
|
||||||
modified = true
|
modified = true
|
||||||
strategy.Paused = true
|
strategy.Paused = true
|
||||||
}
|
}
|
||||||
|
appsv1alpha1.SetDefaultDeploymentStrategy(&strategy)
|
||||||
setDeploymentStrategyAnnotation(strategy, newObj)
|
setDeploymentStrategyAnnotation(strategy, newObj)
|
||||||
default:
|
default:
|
||||||
// Do not allow to modify strategy as Recreate during rolling
|
// Do not allow to modify strategy as Recreate during rolling
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue