cleanup debug logs & remove duplicated output (#1348)

* cleanup debug logs

* avoid duplicate error messages

and this makes main.go use os and fmt package instead of log to avoid
touching global state
This commit is contained in:
namusyaka
2020-11-04 22:50:18 +08:00
committed by GitHub
parent 8b06045c70
commit 951b46e3c2
3 changed files with 8 additions and 11 deletions
-3
View File
@@ -139,8 +139,6 @@ func (k *Kubernetes) InitPodSpecWithConfigMap(name string, image string, service
var volumeMounts []api.VolumeMount
var volumes []api.Volume
log.Debugf("Configs in InitPodSpecWithConfigMap: %+v", service.Configs)
for _, value := range service.Configs {
cmVolName := FormatFileName(value.Source)
target := value.Target
@@ -598,7 +596,6 @@ func (k *Kubernetes) ConfigServicePorts(name string, service kobject.ServiceConf
seenPorts := make(map[int]struct{}, len(service.Port))
var servicePort api.ServicePort
log.Debugf("Ports in ConfigServicePorts: %+v", service.Port)
for _, port := range service.Port {
if port.HostPort == 0 {
port.HostPort = port.ContainerPort