node

package
v3.6.122-1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2017 License: Apache-2.0 Imports: 71 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetFakeCadvisorInterfaceForIntegrationTest

func SetFakeCadvisorInterfaceForIntegrationTest()

SetFakeCadvisorInterfaceForIntegrationTest sets a fake cadvisor implementation to allow the node to run in integration tests

func SetFakeContainerManagerInterfaceForIntegrationTest

func SetFakeContainerManagerInterfaceForIntegrationTest()

SetFakeContainerManagerInterfaceForIntegrationTest sets a fake container manager implementation to allow the node to run in integration tests

Types

type NodeConfig

type NodeConfig struct {
	// BindAddress is the address to bind to
	BindAddress string
	// VolumeDir is the directory that volumes will be stored under
	VolumeDir string
	// AllowDisabledDocker if true, will make the Kubelet ignore errors from Docker
	AllowDisabledDocker bool
	// Containerized is true if we are expected to be running inside of a container
	Containerized bool

	// Client to connect to the master.
	Client kclientset.Interface
	// External kube client
	ExternalKubeClientset kclientsetexternal.Interface
	// Internal kubernetes shared informer factory.
	InternalKubeInformers kinternalinformers.SharedInformerFactory
	// DockerClient is a client to connect to Docker
	DockerClient dockertools.DockerInterface
	// KubeletServer contains the KubeletServer configuration
	KubeletServer *kubeletoptions.KubeletServer
	// KubeletDeps are the injected code dependencies for the kubelet, fully initialized
	KubeletDeps *kubelet.KubeletDeps
	// ProxyConfig is the configuration for the kube-proxy, fully initialized
	ProxyConfig *proxyoptions.ProxyServerConfig
	// IPTablesSyncPeriod is how often iptable rules are refreshed
	IPTablesSyncPeriod string
	// EnableUnidling indicates whether or not the unidling hybrid proxy should be used
	EnableUnidling bool

	// DNSConfig controls the DNS configuration.
	DNSServer *dns.Server

	// SDNPlugin is an optional SDN plugin
	SDNPlugin *sdnplugin.OsdnNode
	// SDNProxy is an optional service endpoints filterer
	SDNProxy *sdnplugin.OsdnProxy
}

NodeConfig represents the required parameters to start the OpenShift node through Kubernetes. All fields are required.

func BuildKubernetesNodeConfig

func BuildKubernetesNodeConfig(options configapi.NodeConfig, enableProxy, enableDNS bool) (*NodeConfig, error)

func (*NodeConfig) EnsureDocker

func (c *NodeConfig) EnsureDocker(docker *dockerutil.Helper)

EnsureDocker attempts to connect to the Docker daemon defined by the helper, and if it is unable to it will print a warning.

func (*NodeConfig) EnsureKubeletAccess

func (c *NodeConfig) EnsureKubeletAccess()

EnsureKubeletAccess performs a number of test operations that the Kubelet requires to properly function. All errors here are fatal.

func (*NodeConfig) EnsureLocalQuota

func (c *NodeConfig) EnsureLocalQuota(nodeConfig configapi.NodeConfig)

EnsureLocalQuota checks if the node config specifies a local storage perFSGroup quota, and if so will test that the volumeDirectory is on a filesystem suitable for quota enforcement. If checks pass the k8s emptyDir volume plugin will be replaced with a wrapper version which adds quota functionality.

func (*NodeConfig) EnsureVolumeDir

func (c *NodeConfig) EnsureVolumeDir()

EnsureVolumeDir attempts to convert the provided volume directory argument to an absolute path and create the directory if it does not exist. Will exit if an error is encountered.

func (*NodeConfig) HandleDockerError

func (c *NodeConfig) HandleDockerError(message string)

HandleDockerError handles an an error from the docker daemon

func (*NodeConfig) RunDNS

func (c *NodeConfig) RunDNS()

RunDNS starts the DNS server as soon as services are loaded.

func (*NodeConfig) RunKubelet

func (c *NodeConfig) RunKubelet()

RunKubelet starts the Kubelet.

func (*NodeConfig) RunPlugin

func (c *NodeConfig) RunPlugin()

RunPlugin starts the local SDN plugin, if enabled in configuration.

func (*NodeConfig) RunProxy

func (c *NodeConfig) RunProxy()

RunProxy starts the proxy

type ProxyConfig

type ProxyConfig struct {
	ClientConfig *restclient.Config
}

func (*ProxyConfig) InstallAPI

func (c *ProxyConfig) InstallAPI(container *restful.Container) ([]string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL