Documentation ¶
Index ¶
- Constants
- Variables
- func StartAPIServer(lk LocalkubeServer) func() error
- func StartControllerManagerServer(lk LocalkubeServer) func() error
- func StartKubeletServer(lk LocalkubeServer) func() error
- func StartProxyServer(lk LocalkubeServer) func() error
- func StartSchedulerServer(lk LocalkubeServer) func() error
- type DNSServer
- type EtcdServer
- type LocalkubeServer
- func (lk *LocalkubeServer) AddServer(server Server)
- func (lk LocalkubeServer) GenerateCerts() error
- func (lk LocalkubeServer) GetAPIServerInsecureURL() string
- func (lk LocalkubeServer) GetAPIServerSecureURL() string
- func (lk LocalkubeServer) GetCAPrivateKeyCertPath() string
- func (lk LocalkubeServer) GetCAPublicKeyCertPath() string
- func (lk LocalkubeServer) GetCertificateDirectory() string
- func (lk LocalkubeServer) GetDNSDataDirectory() string
- func (lk LocalkubeServer) GetEtcdDataDirectory() string
- func (lk LocalkubeServer) GetHostIP() (net.IP, error)
- func (lk LocalkubeServer) GetPrivateKeyCertPath() string
- func (lk LocalkubeServer) GetPublicKeyCertPath() string
- func (lk LocalkubeServer) NewAPIServer() Server
- func (lk LocalkubeServer) NewControllerManagerServer() Server
- func (lk LocalkubeServer) NewDNSServer(rootDomain, clusterIP, kubeAPIServer string) (*DNSServer, error)
- func (lk LocalkubeServer) NewEtcd(clientURLStrs, peerURLStrs []string, name, dataDirectory string) (*EtcdServer, error)
- func (lk LocalkubeServer) NewKubeletServer() Server
- func (lk LocalkubeServer) NewProxyServer() Server
- func (lk LocalkubeServer) NewSchedulerServer() Server
- type Server
- type Servers
- type SimpleServer
Constants ¶
const ( DNSName = "dns" DNSServiceName = "kube-dns" DNSServiceNamespace = "kube-system" )
const (
EtcdName = "etcd"
)
Variables ¶
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"} )
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 EtcdServer ¶
type EtcdServer struct { *etcdserver.EtcdServer // contains filtered or unexported fields }
Etcd is a Server which manages an Etcd cluster
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) 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) 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) 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.
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.