Documentation ¶
Index ¶
- Constants
- Variables
- func NewHostPathProvisioner() controller.Provisioner
- 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
- func StartStorageProvisioner(lk LocalkubeServer) func() error
- 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) NewEtcd(clientURLStrs, peerURLStrs []string, name, dataDirectory string) (*EtcdServer, error)
- func (lk LocalkubeServer) NewKubeletServer() Server
- func (lk LocalkubeServer) NewProxyServer() Server
- func (lk LocalkubeServer) NewSchedulerServer() Server
- func (lk LocalkubeServer) NewStorageProvisionerServer() Server
- func (lk LocalkubeServer) SetExtraConfigForComponent(component string, config interface{})
- type Server
- type Servers
- type SimpleServer
Constants ¶
const (
EtcdName = "etcd"
)
Variables ¶
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"} )
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) 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) 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.