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