Skip to content

Commit

Permalink
Merge pull request #6 from timfeirg/master
Browse files Browse the repository at this point in the history
make ExtraHosts global to specs
  • Loading branch information
timfeirg authored Nov 27, 2017
2 parents ae990d2 + 61361bd commit 356750c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion commands/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions commands/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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)
}

Expand Down
1 change: 1 addition & 0 deletions types/specs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 356750c

Please sign in to comment.