localkube

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2016 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DNSName = "dns"

	DNSServiceName      = "kube-dns"
	DNSServiceNamespace = "kube-system"
)
View Source
const (
	EtcdName = "etcd"
)
View Source
const (
	HostnameOverride = "127.0.0.1"
)

Variables

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

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

Functions

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

Types

type DNSServer

type DNSServer struct {
	// contains filtered or unexported fields
}

func (DNSServer) Name

func (DNSServer) Name() string

Name returns the servers unique name

func (*DNSServer) Start

func (dns *DNSServer) Start()

func (*DNSServer) Stop

func (dns *DNSServer) Stop()

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
	ShouldGenerateCerts      bool
	ShowVersion              bool
}

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

func (lk LocalkubeServer) NewDNSServer(rootDomain, clusterIP, kubeAPIServer string) (*DNSServer, error)

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

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.

Directories

Path Synopsis
kube2sky is a bridge between Kubernetes and SkyDNS.
kube2sky is a bridge between Kubernetes and SkyDNS.

Jump to

Keyboard shortcuts

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