Add HostNetworking container option to API.
This allows a container to run within the same networking namespace as the host. This will be locked down by default using a flag on the master and nodes (similar to how privileged is handled today).
This commit is contained in:
@@ -288,6 +288,7 @@ type ContainerPort struct {
|
||||
// in a pod must have a unique name.
|
||||
Name string `json:"name,omitempty"`
|
||||
// Optional: If specified, this must be a valid port number, 0 < x < 65536.
|
||||
// If HostNetwork is specified, this must match ContainerPort.
|
||||
HostPort int `json:"hostPort,omitempty"`
|
||||
// Required: This must be a valid port number, 0 < x < 65536.
|
||||
ContainerPort int `json:"containerPort"`
|
||||
@@ -587,6 +588,10 @@ type PodSpec struct {
|
||||
// the the scheduler simply schedules this pod onto that host, assuming that it fits
|
||||
// resource requirements.
|
||||
Host string `json:"host,omitempty"`
|
||||
// Uses the host's network namespace. If this option is set, the ports that will be
|
||||
// used must be specified.
|
||||
// Optional: Default to false.
|
||||
HostNetwork bool `json:"hostNetwork,omitempty"`
|
||||
}
|
||||
|
||||
// PodStatus represents information about the status of a pod. Status may trail the actual
|
||||
|
Reference in New Issue
Block a user