Fix convert deployment log error (#1378)

This commit is contained in:
Hang Yan
2021-05-01 10:37:06 +08:00
committed by GitHub
parent 395d99fb7d
commit 45634be192
2 changed files with 10 additions and 2 deletions
+9 -1
View File
@@ -369,7 +369,15 @@ func (k *Kubernetes) InitD(name string, service kobject.ServiceConfig, replicas
Type: appsv1.RollingUpdateDeploymentStrategyType,
RollingUpdate: update,
}
log.Debugf("Set deployment '%s' rolling update: MaxSurge: %s, MaxUnavailable: %s", name, update.MaxSurge.String(), update.MaxUnavailable.String())
ms := ""
if update.MaxSurge != nil {
ms = update.MaxSurge.String()
}
mu := ""
if update.MaxUnavailable != nil {
mu = update.MaxUnavailable.String()
}
log.Debugf("Set deployment '%s' rolling update: MaxSurge: %s, MaxUnavailable: %s", name, ms, mu)
}
return dc