// Spec to control the desired behavior of rolling update.
typeRollingUpdateDeploymentSpecstruct{
typeRollingUpdateDeploymentStrategystruct{
// The maximum number of pods that can be unavailable during the update.
// Value can be an absolute number (ex: 5) or a percentage of total pods at the start of update (ex: 10%).
// Absolute number is calculated from percentage by rounding up.
...
...
@@ -246,7 +248,7 @@ To begin with, we will support 2 types of deployment:
This results in a slower deployment, but there is no downtime. At all times
during the deployment, there are a few pods available (old or new). The number
of available pods and when is a pod considered "available" can be configured
using RollingUpdateDeploymentSpec.
using RollingUpdateDeploymentStrategy.
In future, we want to support more deployment types.
...
...
@@ -254,7 +256,7 @@ In future, we want to support more deployment types.
Apart from the above, we want to add support for the following:
* Running the deployment process in a pod: In future, we can run the deployment process in a pod. Then users can define their own custom deployments and we can run it using the image name.
* More DeploymentTypes: https://github.com/openshift/origin/blob/master/examples/deployment/README.md#deployment-types lists most commonly used ones.
* More DeploymentStrategyTypes: https://github.com/openshift/origin/blob/master/examples/deployment/README.md#deployment-types lists most commonly used ones.
* Triggers: Deployment will have a trigger field to identify what triggered the deployment. Options are: Manual/UserTriggered, Autoscaler, NewImage.
* Automatic rollback on error: We want to support automatic rollback on error or timeout.
@@ -227,9 +227,9 @@ func ValidateDeploymentStrategy(strategy *experimental.DeploymentStrategy, field
returnallErrs
}
switchstrategy.Type{
caseexperimental.DeploymentRecreate:
allErrs=append(allErrs,errs.NewFieldForbidden("rollingUpdate","rollingUpdate should be nil when strategy type is "+experimental.DeploymentRecreate))
caseexperimental.DeploymentRollingUpdate:
caseexperimental.RecreateDeploymentStrategyType:
allErrs=append(allErrs,errs.NewFieldForbidden("rollingUpdate","rollingUpdate should be nil when strategy type is "+experimental.RecreateDeploymentStrategyType))