kubelet/runtime: add method to return pod network namespace path

Some runtimes (eg, Hypernetes) don't create network namespaces for pods,
so network plugins must correctly handle any error returned from the
runtime.
This commit is contained in:
Dan Williams
2016-05-02 19:49:02 -05:00
parent 55e6eb2ce3
commit 9b85d20c73
5 changed files with 28 additions and 17 deletions

View File

@@ -97,6 +97,12 @@ type Runtime interface {
RemoveImage(image ImageSpec) error
// Returns Image statistics.
ImageStats() (*ImageStats, error)
// Returns the filesystem path of the pod's network namespace; if the
// runtime does not handle namespace creation itself, or cannot return
// the network namespace path, it should return an error.
// TODO: Change ContainerID to a Pod ID since the namespace is shared
// by all containers in the pod.
GetNetNS(containerID ContainerID) (string, error)
// TODO(vmarmol): Unify pod and containerID args.
// GetContainerLogs returns logs of a specific container. By
// default, it returns a snapshot of the container log. Set 'follow' to true to