kubernetes

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2015 License: Apache-2.0 Imports: 55 Imported by: 0

Documentation

Overview

Package kubernetes provides objects for starting the Kubernetes master and node code.

Index

Constants

View Source
const (
	KubeAPIPrefix        = "/api"
	KubeAPIPrefixV1Beta3 = "/api/v1beta3"
	KubeAPIPrefixV1      = "/api/v1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MasterConfig

type MasterConfig struct {
	Options    configapi.KubernetesMasterConfig
	KubeClient *kclient.Client

	Master            *master.Config
	ControllerManager *cmapp.CMServer
	CloudProvider     cloudprovider.Interface
}

MasterConfig defines the required values to start a Kubernetes master

func BuildKubernetesMasterConfig

func BuildKubernetesMasterConfig(options configapi.MasterConfig, requestContextMapper kapi.RequestContextMapper, kubeClient *kclient.Client) (*MasterConfig, error)

func (*MasterConfig) InstallAPI

func (c *MasterConfig) InstallAPI(container *restful.Container) []string

InstallAPI starts a Kubernetes master and registers the supported REST APIs into the provided mux, then returns an array of strings indicating what endpoints were started (these are format strings that will expect to be sent a single string value).

func (*MasterConfig) RunEndpointController

func (c *MasterConfig) RunEndpointController()

RunEndpointController starts the Kubernetes replication controller sync loop

func (*MasterConfig) RunNamespaceController

func (c *MasterConfig) RunNamespaceController()

RunNamespaceController starts the Kubernetes Namespace Manager

func (*MasterConfig) RunNodeController

func (c *MasterConfig) RunNodeController()

RunNodeController starts the node controller

func (*MasterConfig) RunPersistentVolumeClaimBinder

func (c *MasterConfig) RunPersistentVolumeClaimBinder()

RunPersistentVolumeClaimBinder starts the Kubernetes Persistent Volume Claim Binder

func (*MasterConfig) RunPersistentVolumeClaimRecycler

func (c *MasterConfig) RunPersistentVolumeClaimRecycler(recyclerImageName string)

func (*MasterConfig) RunReplicationController

func (c *MasterConfig) RunReplicationController(client *client.Client)

RunReplicationController starts the Kubernetes replication controller sync loop

func (*MasterConfig) RunResourceQuotaManager

func (c *MasterConfig) RunResourceQuotaManager()

RunResourceQuotaManager starts the resource quota manager

func (*MasterConfig) RunScheduler

func (c *MasterConfig) RunScheduler()

RunScheduler starts the Kubernetes scheduler

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
	// Client to connect to the master.
	Client *client.Client
	// DockerClient is a client to connect to Docker
	DockerClient dockertools.DockerInterface

	// KubeletServer contains the KubeletServer configuration
	KubeletServer *kapp.KubeletServer
	// KubeletConfig is the configuration for the kubelet, fully initialized
	KubeletConfig *kapp.KubeletConfig
}

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

func BuildKubernetesNodeConfig

func BuildKubernetesNodeConfig(options configapi.NodeConfig) (*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) 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) RunKubelet

func (c *NodeConfig) RunKubelet()

RunKubelet starts the Kubelet.

func (*NodeConfig) RunProxy

func (c *NodeConfig) RunProxy()

RunProxy starts the proxy

type ProxyConfig

type ProxyConfig struct {
	ClientConfig *kclient.Config
}

func (*ProxyConfig) InstallAPI

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

Jump to

Keyboard shortcuts

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