Debugging
This commit is contained in:
parent
54371bba6a
commit
111126c780
@ -2,7 +2,6 @@
|
||||
package kubernetes
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
@ -277,9 +276,6 @@ func (k *kubernetes) Create(s *runtime.Service, opts ...runtime.CreateOption) er
|
||||
|
||||
service := newService(s, options)
|
||||
|
||||
bytes, _ := json.Marshal(service)
|
||||
log.Debug(string(bytes))
|
||||
|
||||
// start the service
|
||||
return service.Start(k.client)
|
||||
}
|
||||
|
@ -98,6 +98,9 @@ func serviceResource(s *client.Service) *client.Resource {
|
||||
|
||||
// Start starts the Kubernetes service. It creates new kubernetes deployment and service API objects
|
||||
func (s *service) Start(k client.Client) error {
|
||||
bytes, _ := json.Marshal(s.kdeploy)
|
||||
log.Debug("kdeploy", string(bytes))
|
||||
|
||||
// create deployment first; if we fail, we dont create service
|
||||
if err := k.Create(deploymentResource(s.kdeploy)); err != nil {
|
||||
log.Debugf("Runtime failed to create deployment: %v", err)
|
||||
|
@ -267,8 +267,8 @@ func NewDeployment(name, version, typ string) *Deployment {
|
||||
Name: name,
|
||||
Image: DefaultImage,
|
||||
Env: []EnvVar{env},
|
||||
Command: []string{"go", "run", "mainx.go"},
|
||||
Ports: []ContainerPort{{
|
||||
Command: []string{"go", "run", "main.go"},
|
||||
Ports: []ContainerPort{
|
||||
Name: "service-port",
|
||||
ContainerPort: 8080,
|
||||
}},
|
||||
|
Loading…
Reference in New Issue
Block a user