kubernetes: github.com/erimatnor/kubernetes/pkg/kubelet/network Index | Files | Directories

package network

import "github.com/erimatnor/kubernetes/pkg/kubelet/network"

Index

Package Files

plugins.go testing.go

Constants

const DefaultPluginName = "kubernetes.io/no-op"

func NewFakeHost Uses

func NewFakeHost(kubeClient client.Interface) *fakeNetworkHost

func UnescapePluginName Uses

func UnescapePluginName(in string) string

type Host Uses

type Host interface {
    // Get the pod structure by its name, namespace
    GetPodByName(namespace, name string) (*api.Pod, bool)

    // GetKubeClient returns a client interface
    GetKubeClient() client.Interface
}

Host is an interface that plugins can use to access the kubelet.

type NetworkPlugin Uses

type NetworkPlugin interface {
    // Init initializes the plugin.  This will be called exactly once
    // before any other methods are called.
    Init(host Host) error

    // Name returns the plugin's name. This will be used when searching
    // for a plugin by name, e.g.
    Name() string

    // SetUpPod is the method called after the infra container of
    // the pod has been created but before the other containers of the
    // pod are launched.
    SetUpPod(namespace string, name string, podInfraContainerID kubeletTypes.DockerID) error

    // TearDownPod is the method called before a pod's infra container will be deleted
    TearDownPod(namespace string, name string, podInfraContainerID kubeletTypes.DockerID) error
}

Plugin is an interface to network plugins for the kubelet

func InitNetworkPlugin Uses

func InitNetworkPlugin(plugins []NetworkPlugin, networkPluginName string, host Host) (NetworkPlugin, error)

InitNetworkPlugin inits the plugin that matches networkPluginName. Plugins must have unique names.

Directories

PathSynopsis
execPackage exec scans and loads networking plugins that are installed under /usr/libexec/kubernetes/kubelet-plugins/net/exec/ The layout convention for a plugin is: plugin-name/ (plugins have to be directories first) plugin-name/plugin-name (executable that will be called out, see Vendoring Note for more nuances) plugin-name/<other-files> where, 'executable' has the following requirements: - should ...

Package network imports 8 packages (graph). Updated 2017-05-11. Refresh now. Tools for package owners.