diff --git a/commands/deploy.go b/commands/deploy.go index e08a0f0..02f652c 100644 --- a/commands/deploy.go +++ b/commands/deploy.go @@ -127,7 +127,6 @@ func generateDeployOpts(data []byte, pod, node, entry, image, network string, cp Healcheck: healthCheck, Hook: hook, RestartPolicy: entrypoint.RestartPolicy, - ExtraHosts: entrypoint.ExtraHosts, }, Podname: pod, Nodename: node, @@ -141,6 +140,7 @@ func generateDeployOpts(data []byte, pod, node, entry, image, network string, cp Volumes: specs.Volumes, Meta: specs.Meta, Dns: specs.DNS, + ExtraHosts: specs.ExtraHosts, Nodelabels: nodeLabels, } return opts diff --git a/commands/resource.go b/commands/resource.go index 2515228..f960da6 100644 --- a/commands/resource.go +++ b/commands/resource.go @@ -9,7 +9,7 @@ import ( log "github.com/Sirupsen/logrus" pb "github.com/projecteru2/core/rpc/gen" - coretypes "github.com/projecteru2/core/types" + corescheduler "github.com/projecteru2/core/scheduler" "golang.org/x/net/context" cli "gopkg.in/urfave/cli.v2" ) @@ -95,7 +95,7 @@ func addPod(c *cli.Context) error { favor := c.String("favor") desc := c.String("desc") - if favor != coretypes.MEMORY_PRIOR && favor != coretypes.CPU_PRIOR { + if favor != corescheduler.MEMORY_PRIOR && favor != corescheduler.CPU_PRIOR { return fmt.Errorf("favor must be MEM/CPU, got %s", favor) } diff --git a/types/specs.go b/types/specs.go index 7fa65be..9eef2f0 100644 --- a/types/specs.go +++ b/types/specs.go @@ -12,6 +12,7 @@ type Specs struct { Volumes []string `yaml:"volumes,omitempty,flow"` Meta map[string]string `yaml:"meta,omitempty,flow"` DNS []string `yaml:"dns,omitempty,flow"` + ExtraHosts []string `yaml:"dns,omitempty,flow"` } type Container struct {