localkube

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2017 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EtcdName = "etcd"
)

Variables

View Source
var (
	// EtcdClientURLs have listeners created and handle etcd API traffic
	KubeEtcdClientURLs = []string{"http://0.0.0.0:2379"}

	// EtcdPeerURLs don't have listeners created for them, they are used to pass Etcd validation
	KubeEtcdPeerURLs = []string{"http://0.0.0.0:2380"}
)
View Source
var (
	MasqueradeBit = int32(14)
	OOMScoreAdj   = int32(qos.KubeProxyOOMScoreAdj)
)

Functions

func NewHostPathProvisioner added in v0.17.0

func NewHostPathProvisioner() controller.Provisioner

func StartAPIServer

func StartAPIServer(lk LocalkubeServer) func() error

func StartControllerManagerServer

func StartControllerManagerServer(lk LocalkubeServer) func() error

func StartKubeletServer

func StartKubeletServer(lk LocalkubeServer) func() error

func StartProxyServer

func StartProxyServer(lk LocalkubeServer) func() error

func StartSchedulerServer

func StartSchedulerServer(lk LocalkubeServer) func() error

func StartStorageProvisioner added in v0.17.0

func StartStorageProvisioner(lk LocalkubeServer) func() error

Types

type EtcdServer

type EtcdServer struct {
	*etcdserver.EtcdServer
	// contains filtered or unexported fields
}

Etcd is a Server which manages an Etcd cluster

func (EtcdServer) Name

func (EtcdServer) Name() string

Name returns the servers unique name

func (*EtcdServer) Start

func (e *EtcdServer) Start()

Starts starts the etcd server and listening for client connections

func (*EtcdServer) Stop

func (e *EtcdServer) Stop()

Stop closes all connections and stops the Etcd server

type LocalkubeServer

type LocalkubeServer struct {
	// Inherits Servers
	Servers

	// Options
	Containerized            bool
	EnableDNS                bool
	DNSDomain                string
	DNSIP                    net.IP
	LocalkubeDirectory       string
	ServiceClusterIPRange    net.IPNet
	APIServerAddress         net.IP
	APIServerPort            int
	APIServerInsecureAddress net.IP
	APIServerInsecurePort    int
	APIServerName            string
	ShouldGenerateCerts      bool
	ShowVersion              bool
	ShowHostIP               bool
	RuntimeConfig            config.ConfigurationMap
	NodeIP                   net.IP
	ContainerRuntime         string
	NetworkPlugin            string
	FeatureGates             string
	ExtraConfig              util.ExtraOptionSlice
}

LocalkubeServer provides a fully functional Kubernetes cluster running entirely through goroutines

func (*LocalkubeServer) AddServer

func (lk *LocalkubeServer) AddServer(server Server)

func (LocalkubeServer) GenerateCerts

func (lk LocalkubeServer) GenerateCerts() error

func (LocalkubeServer) GetAPIServerInsecureURL

func (lk LocalkubeServer) GetAPIServerInsecureURL() string

func (LocalkubeServer) GetAPIServerSecureURL

func (lk LocalkubeServer) GetAPIServerSecureURL() string

func (LocalkubeServer) GetCAPrivateKeyCertPath added in v0.6.0

func (lk LocalkubeServer) GetCAPrivateKeyCertPath() string

func (LocalkubeServer) GetCAPublicKeyCertPath added in v0.6.0

func (lk LocalkubeServer) GetCAPublicKeyCertPath() string

func (LocalkubeServer) GetCertificateDirectory

func (lk LocalkubeServer) GetCertificateDirectory() string

func (LocalkubeServer) GetDNSDataDirectory

func (lk LocalkubeServer) GetDNSDataDirectory() string

func (LocalkubeServer) GetEtcdDataDirectory

func (lk LocalkubeServer) GetEtcdDataDirectory() string

func (LocalkubeServer) GetHostIP

func (lk LocalkubeServer) GetHostIP() (net.IP, error)

Get the host's public IP address

func (LocalkubeServer) GetPrivateKeyCertPath

func (lk LocalkubeServer) GetPrivateKeyCertPath() string

func (LocalkubeServer) GetPublicKeyCertPath

func (lk LocalkubeServer) GetPublicKeyCertPath() string

func (LocalkubeServer) NewAPIServer

func (lk LocalkubeServer) NewAPIServer() Server

func (LocalkubeServer) NewControllerManagerServer

func (lk LocalkubeServer) NewControllerManagerServer() Server

func (LocalkubeServer) NewEtcd

func (lk LocalkubeServer) NewEtcd(clientURLStrs, peerURLStrs []string, name, dataDirectory string) (*EtcdServer, error)

NewEtcd creates a new default etcd Server using 'dataDir' for persistence. Panics if could not be configured.

func (LocalkubeServer) NewKubeletServer

func (lk LocalkubeServer) NewKubeletServer() Server

func (LocalkubeServer) NewProxyServer

func (lk LocalkubeServer) NewProxyServer() Server

func (LocalkubeServer) NewSchedulerServer

func (lk LocalkubeServer) NewSchedulerServer() Server

func (LocalkubeServer) NewStorageProvisionerServer added in v0.17.0

func (lk LocalkubeServer) NewStorageProvisionerServer() Server

func (LocalkubeServer) SetExtraConfigForComponent added in v0.11.0

func (lk LocalkubeServer) SetExtraConfigForComponent(component string, config interface{})

type Server

type Server interface {
	// Start immediately starts the component.
	Start()

	// Stop begins the process of stopping the component.
	Stop()

	// Name returns a unique identifier for the component.
	Name() string
}

Server represents a component that Kubernetes depends on. It allows for the management of the lifecycle of the component.

type Servers

type Servers []Server

Servers allows operations to be performed on many servers at once. Uses slice to preserve ordering.

func (Servers) Get

func (servers Servers) Get(name string) (Server, error)

Get returns a server matching name, returns nil if server doesn't exit.

func (Servers) Start

func (servers Servers) Start(serverName string) error

Start is a helper method to start the Server specified, returns error if server doesn't exist.

func (Servers) StartAll

func (servers Servers) StartAll()

StartAll starts all services, starting from 0th item and ascending.

func (Servers) Stop

func (servers Servers) Stop(serverName string) error

Stop is a helper method to start the Server specified, returns error if server doesn't exist.

func (Servers) StopAll

func (servers Servers) StopAll()

StopAll stops all services, starting with the last item.

type SimpleServer

type SimpleServer struct {
	ComponentName string
	Interval      time.Duration
	// contains filtered or unexported fields
}

SimpleServer provides a minimal implementation of Server.

func NewSimpleServer

func NewSimpleServer(componentName string, msInterval int32, serverRoutine func() error) *SimpleServer

func (SimpleServer) Name

func (s SimpleServer) Name() string

Name returns the name of the service.

func (*SimpleServer) Start

func (s *SimpleServer) Start()

Start calls startup function.

func (*SimpleServer) Stop

func (s *SimpleServer) Stop()

Stop calls shutdown function.

Jump to

Keyboard shortcuts

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