Debugging

This commit is contained in:
Ben Toogood 2020-02-06 10:54:11 +00:00
parent c7d922fac2
commit c28737e88e
2 changed files with 4 additions and 2 deletions

View File

@ -2,6 +2,7 @@
package kubernetes package kubernetes
import ( import (
"encoding/json"
"errors" "errors"
"fmt" "fmt"
"strings" "strings"
@ -276,6 +277,9 @@ func (k *kubernetes) Create(s *runtime.Service, opts ...runtime.CreateOption) er
service := newService(s, options) service := newService(s, options)
bytes, _ := json.Marshal(service)
log.Debug(string(bytes))
// start the service // start the service
return service.Start(k.client) return service.Start(k.client)
} }

View File

@ -38,7 +38,6 @@ func newService(s *runtime.Service, c runtime.CreateOptions) *service {
for _, c := range kdeploy.Spec.Template.PodSpec.Containers { for _, c := range kdeploy.Spec.Template.PodSpec.Containers {
c.Image = s.Source c.Image = s.Source
c.Command = []string{name} c.Command = []string{name}
log.Debugf("Setting name to %v", c.Command)
} }
} }
@ -70,7 +69,6 @@ func newService(s *runtime.Service, c runtime.CreateOptions) *service {
} }
// specify the command to exec // specify the command to exec
log.Debug("c.Command: ", c.Command)
if len(c.Command) > 0 { if len(c.Command) > 0 {
kdeploy.Spec.Template.PodSpec.Containers[0].Command = c.Command kdeploy.Spec.Template.PodSpec.Containers[0].Command = c.Command
} }