Documentation ¶
Index ¶
Constants ¶
const ( APIServerName = "apiserver" APIServerHost = "0.0.0.0" APIServerPort = 8080 )
const ( DNSName = "dns" DNSServiceName = "kube-dns" DNSServiceNamespace = "kube-system" )
const ( // Stopped indicates the server is not running. Stopped Status = "Stopped" // Started indicates the server is running. Started = "Started" // NotImplemented is returned when Status cannot be determined. NotImplemented = "NotImplemented" )
const (
ControllerManagerName = "controller-manager"
)
const (
EtcdName = "etcd"
)
const (
KubeletName = "kubelet"
)
const (
ProxyName = "proxy"
)
const (
SchedulerName = "scheduler"
)
Variables ¶
var ( APIServerURL string ServiceIPRange = "10.1.30.0/24" APIServerStop chan struct{} )
var ( DNSEtcdURLs = []string{"http://localhost:9090"} DNSEtcdDataDirectory = "/var/dns/data" )
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"} // EtcdDataDirectory is where all state is stored. Can be changed with env var ETCD_DATA_DIRECTORY KubeEtcdDataDirectory = "/var/etcd/data" )
var ( WeaveProxySock = "unix:///var/run/weave/weave.sock" KubeletStop chan struct{} )
var ( MasqueradeBit = 14 ProxyStop chan struct{} )
var (
CMStop chan struct{}
)
var (
SchedulerStop chan struct{}
)
Functions ¶
func StartAPIServer ¶
func StartAPIServer()
func StartControllerManagerServer ¶
func StartControllerManagerServer()
func StartKubeletServer ¶
func StartKubeletServer(clusterDomain, clusterDNS string) func()
func StartProxyServer ¶
func StartProxyServer()
func StartSchedulerServer ¶
func StartSchedulerServer()
Types ¶
type DNSServer ¶
type DNSServer struct {
// contains filtered or unexported fields
}
func NewDNSServer ¶
type EtcdServer ¶
type EtcdServer struct { *etcdserver.EtcdServer // contains filtered or unexported fields }
Etcd is a Server which manages an Etcd cluster
func NewEtcd ¶
func 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 (*EtcdServer) Start ¶
func (e *EtcdServer) Start()
Starts starts the etcd server and listening for client connections
func (EtcdServer) Status ¶
func (EtcdServer) Status() Status
Status is currently not support by Etcd
func (*EtcdServer) Stop ¶
func (e *EtcdServer) Stop()
Stop closes all connections and stops the Etcd server
type LocalKube ¶
type LocalKube struct {
Servers
}
LocalKube provides a fully functional Kubernetes cluster running entirely through goroutines
type Server ¶
type Server interface { // Start immediately starts the component. Start() // Stop begins the process of stopping the components. Stop() // Name returns a unique identifier for the component. Name() string // Status provides the state of the server. Status() Status }
Server represents a component that Kubernetes depends on. It allows for the management of the lifecycle of the component.
func NewAPIServer ¶
func NewAPIServer() Server
func NewControllerManagerServer ¶
func NewControllerManagerServer() Server
func NewKubeletServer ¶
func NewProxyServer ¶
func NewProxyServer() Server
func NewSchedulerServer ¶
func NewSchedulerServer() Server
type Servers ¶
type Servers []Server
Servers allows operations to be performed on many servers at once. Uses slice to preserve ordering.
func (Servers) Start ¶
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) Status ¶
Status returns a map with the Server name as the key and it's Status as the value.
type SimpleServer ¶
type SimpleServer struct { ComponentName string StartupFn func() ShutdownFn func() StatusFn func() Status }
SimpleServer provides a minimal implementation of Server.
func (SimpleServer) Name ¶
func (s SimpleServer) Name() string
Name returns the name of the service.
func (SimpleServer) NoShutdown ¶
func (s SimpleServer) NoShutdown() *SimpleServer
NoShutdown sets the ShutdownFn to print an error when the server gets shutdown. It returns itself to be chainable.
func (*SimpleServer) Status ¶
func (s *SimpleServer) Status() Status
Status calls the status function and returns the the Server's status.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
kube2sky is a bridge between Kubernetes and SkyDNS.
|
kube2sky is a bridge between Kubernetes and SkyDNS. |
pkg
|
|
localkubectl
Package localkubectl allows the lifecycle of the localkube container to be controlled
|
Package localkubectl allows the lifecycle of the localkube container to be controlled |