Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExtraHosts made global rather than entrypoint-wise #16

Merged
merged 1 commit into from
Nov 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cluster/calcium/create_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ func (c *calcium) makeContainerOptions(index int, quota types.CPUMap, opts *type
NetworkMode: engineNetworkMode,
RestartPolicy: enginecontainer.RestartPolicy{Name: restartPolicy, MaximumRetryCount: maximumRetryCount},
CapAdd: engineslice.StrSlice(capAdd),
ExtraHosts: entry.ExtraHosts,
ExtraHosts: opts.ExtraHosts,
Privileged: entry.Privileged,
Resources: resource,
}
Expand Down
325 changes: 163 additions & 162 deletions rpc/gen/core.pb.go

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions rpc/gen/core.proto
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ message EntrypointOptions {
HealthCheckOptions healcheck = 7;
HookOptions hook = 8;
string restart_policy = 9;
repeated string extra_hosts = 10;
}

message DeployOptions {
Expand All @@ -236,14 +235,15 @@ message DeployOptions {
int32 count = 9;
repeated string env = 10;
repeated string dns = 11;
repeated string volumes = 12;
map<string, string> networks = 13;
string networkmode = 14;
string user = 15;
bool debug = 16;
bool openStdin = 17;
map<string, string> meta = 18;
map<string, string> nodelabels = 19;
repeated string extra_hosts = 12;
repeated string volumes = 13;
map<string, string> networks = 14;
string networkmode = 15;
string user = 16;
bool debug = 17;
bool openStdin = 18;
map<string, string> meta = 19;
map<string, string> nodelabels = 20;
}

message RemoveImageOptions {
Expand Down
1,088 changes: 247 additions & 841 deletions rpc/gen/core_pb2.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion rpc/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ func toCoreDeployOptions(d *pb.DeployOptions) (*types.DeployOptions, error) {
HealthCheck: healthcheck,
Hook: hook,
RestartPolicy: entrypoint.RestartPolicy,
ExtraHosts: entrypoint.ExtraHosts,
}
return &types.DeployOptions{
Name: d.Name,
Expand All @@ -146,6 +145,7 @@ func toCoreDeployOptions(d *pb.DeployOptions) (*types.DeployOptions, error) {
Count: int(d.Count),
Env: d.Env,
DNS: d.Dns,
ExtraHosts: d.ExtraHosts,
Volumes: d.Volumes,
Networks: d.Networks,
NetworkMode: d.Networkmode,
Expand Down
1 change: 1 addition & 0 deletions types/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type DeployOptions struct {
Count int // How many containers needed, e.g. 4
Env []string // Env for container
DNS []string // DNS for container
ExtraHosts []string // Extra hosts for container
Volumes []string // Volumes for container
Networks map[string]string // Network names and specified IPs
NetworkMode string // Network mode
Expand Down
1 change: 0 additions & 1 deletion types/specs.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ type Entrypoint struct {
HealthCheck *HealthCheck `yaml:"healthcheck,omitempty,flow"`
Hook *Hook `yaml:"hook,omitempty,flow"`
RestartPolicy string `yaml:"restart,omitempty"`
ExtraHosts []string `yaml:"hosts,omitempty,flow"`
}

// single bind
Expand Down