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
+1 -1
View File
@@ -23,7 +23,7 @@ require (
github.com/fatih/structs v1.1.0 github.com/fatih/structs v1.1.0
github.com/fsouza/go-dockerclient v1.6.5 github.com/fsouza/go-dockerclient v1.6.5
github.com/google/go-cmp v0.4.0 github.com/google/go-cmp v0.4.0
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
github.com/imdario/mergo v0.3.10 // indirect github.com/imdario/mergo v0.3.10 // indirect
github.com/joho/godotenv v1.3.0 github.com/joho/godotenv v1.3.0
github.com/moby/sys/mount v0.1.1 // indirect github.com/moby/sys/mount v0.1.1 // indirect
+9 -1
View File
@@ -369,7 +369,15 @@ func (k *Kubernetes) InitD(name string, service kobject.ServiceConfig, replicas
Type: appsv1.RollingUpdateDeploymentStrategyType, Type: appsv1.RollingUpdateDeploymentStrategyType,
RollingUpdate: update, 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 return dc