kubernetes

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2015 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	KubeAPIPrefix        = "/api"
	KubeAPIPrefixV1Beta1 = "/api/v1beta1"
	KubeAPIPrefixV1Beta2 = "/api/v1beta2"
)
View Source
const NodePort = 10250

NodePort is the default Kubelet port for serving information about the node.

View Source
const NodeScheme = "http"

NodeScheme is the default scheme for serving information about the node.

Variables

This section is empty.

Functions

This section is empty.

Types

type MasterConfig

type MasterConfig struct {
	MasterHost string
	MasterPort int
	NodeHosts  []string
	PortalNet  *net.IPNet

	EtcdHelper tools.EtcdHelper
	KubeClient *kclient.Client

	Authorizer       authorizer.Authorizer
	AdmissionControl admission.Interface
}

MasterConfig defines the required values to start a Kubernetes master

func (*MasterConfig) EnsurePortalFlags

func (c *MasterConfig) EnsurePortalFlags()

TODO: Longer term we should read this from some config store, rather than a flag.

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) RunMinionController added in v0.2.1

func (c *MasterConfig) RunMinionController()

func (*MasterConfig) RunReplicationController

func (c *MasterConfig) RunReplicationController()

RunReplicationController starts the Kubernetes replication controller sync loop

func (*MasterConfig) RunScheduler

func (c *MasterConfig) RunScheduler()

RunScheduler starts the Kubernetes scheduler

type NodeConfig

type NodeConfig struct {
	// The address to bind to
	BindHost string
	// The name of this node that will be used to identify the node in the master.
	// This value must match the value provided to the master on startup.
	NodeHost string
	// The host that the master can be reached at (not in use yet)
	MasterHost string
	// The directory that volumes will be stored under
	VolumeDir string

	// The image used as the Kubelet network namespace and volume container.
	NetworkContainerImage string

	// A client to connect to etcd
	EtcdClient *etcd.Client
	// A client to connect to Docker
	DockerClient *docker.Client
}

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

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) RunKubelet

func (c *NodeConfig) RunKubelet()

RunKubelet starts the Kubelet.

func (*NodeConfig) RunProxy

func (c *NodeConfig) RunProxy()

RunProxy starts the proxy

Jump to

Keyboard shortcuts

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