Support deploy update_config (#1232)

This commit is contained in:
Hang Yan
2020-01-05 19:30:41 +08:00
committed by GitHub
parent 4d864a9aab
commit e7f05588bf
17 changed files with 602 additions and 538 deletions
+9
View File
@@ -411,6 +411,15 @@ func (k *Kubernetes) InitD(name string, service kobject.ServiceConfig, replicas
}
dc.Spec.Template.Labels = transformer.ConfigLabels(name)
update := service.GetKubernetesUpdateStrategy()
if update != nil {
dc.Spec.Strategy = extensions.DeploymentStrategy{
Type: extensions.RollingUpdateDeploymentStrategyType,
RollingUpdate: update,
}
log.Debugf("Set deployment '%s' rolling update: MaxSurge: %s, MaxUnavailable: %s", name, update.MaxSurge.String(), update.MaxUnavailable.String())
}
return dc
}