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
+10
View File
@@ -232,6 +232,16 @@ func (o *OpenShift) initDeploymentConfig(name string, service kobject.ServiceCon
},
},
}
update := service.GetOCUpdateStrategy()
if update != nil {
dc.Spec.Strategy = deployapi.DeploymentStrategy{
Type: deployapi.DeploymentStrategyTypeRolling,
RollingParams: update,
}
log.Debugf("Set deployment '%s' rolling update: MaxSurge: %s, MaxUnavailable: %s", name, update.MaxSurge.String(), update.MaxUnavailable.String())
}
return dc
}