 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package master contains code for setting up and running a Kubernetes cluster master.
Index ¶
- Constants
- func DefaultAPIResourceConfigSource() *genericapiserver.ResourceConfig
- func NewMasterCountEndpointReconciler(masterCount int, endpointClient coreclient.EndpointsGetter) *masterCountEndpointReconciler
- type Config
- type Controller
- func (c *Controller) CreateNamespaceIfNeeded(ns string) error
- func (c *Controller) CreateOrUpdateMasterServiceIfNeeded(serviceName string, serviceIP net.IP, servicePorts []api.ServicePort, ...) error
- func (c *Controller) PostStartHook(hookContext genericapiserver.PostStartHookContext) error
- func (c *Controller) RunKubernetesNamespaces(ch chan struct{})
- func (c *Controller) RunKubernetesService(ch chan struct{})
- func (c *Controller) Start()
- func (c *Controller) UpdateKubernetesService(reconcile bool) error
 
- type EndpointReconciler
- type EndpointReconcilerConfig
- type Master
- type RESTOptionsGetter
- type RESTStorageProvider
Constants ¶
const ( // DefaultEndpointReconcilerInterval is the default amount of time for how often the endpoints for // the kubernetes Service are reconciled. DefaultEndpointReconcilerInterval = 10 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func DefaultAPIResourceConfigSource ¶ added in v1.3.0
func DefaultAPIResourceConfigSource() *genericapiserver.ResourceConfig
func NewMasterCountEndpointReconciler ¶ added in v1.3.0
func NewMasterCountEndpointReconciler(masterCount int, endpointClient coreclient.EndpointsGetter) *masterCountEndpointReconciler
NewMasterCountEndpointReconciler creates a new EndpointReconciler that reconciles based on a specified expected number of masters.
Types ¶
type Config ¶
type Config struct {
	GenericConfig *genericapiserver.Config
	StorageFactory           genericapiserver.StorageFactory
	EnableWatchCache         bool
	EnableCoreControllers    bool
	EndpointReconcilerConfig EndpointReconcilerConfig
	DeleteCollectionWorkers  int
	EventTTL                 time.Duration
	KubeletClientConfig      kubeletclient.KubeletClientConfig
	// genericapiserver.RESTStorageProviders provides RESTStorage building methods keyed by groupName
	RESTStorageProviders map[string]genericapiserver.RESTStorageProvider
	// Used to start and monitor tunneling
	Tunneler          genericapiserver.Tunneler
	EnableUISupport   bool
	EnableLogsSupport bool
	ProxyTransport    http.RoundTripper
}
    func (*Config) Complete ¶ added in v1.5.0
func (c *Config) Complete() completedConfig
Complete fills in any fields not set that are required to have valid data. It's mutating the receiver.
func (*Config) NewBootstrapController ¶ added in v1.5.0
func (c *Config) NewBootstrapController(legacyRESTStorage corerest.LegacyRESTStorage) *Controller
NewBootstrapController returns a controller for watching the core capabilities of the master
func (*Config) SkipComplete ¶ added in v1.5.0
func (c *Config) SkipComplete() completedConfig
SkipComplete provides a way to construct a server instance without config completion.
type Controller ¶ added in v0.17.0
type Controller struct {
	NamespaceRegistry namespace.Registry
	ServiceRegistry   service.Registry
	ServiceClusterIPRegistry rangeallocation.RangeRegistry
	ServiceClusterIPInterval time.Duration
	ServiceClusterIPRange    *net.IPNet
	ServiceNodePortRegistry rangeallocation.RangeRegistry
	ServiceNodePortInterval time.Duration
	ServiceNodePortRange    utilnet.PortRange
	EndpointReconciler EndpointReconciler
	EndpointInterval   time.Duration
	SystemNamespaces         []string
	SystemNamespacesInterval time.Duration
	PublicIP net.IP
	ServiceIP                 net.IP
	ServicePort               int
	ExtraServicePorts         []api.ServicePort
	ExtraEndpointPorts        []api.EndpointPort
	PublicServicePort         int
	KubernetesServiceNodePort int
	// contains filtered or unexported fields
}
    Controller is the controller manager for the core bootstrap Kubernetes controller loops, which manage creating the "kubernetes" service, the "default" and "kube-system" namespace, and provide the IP repair check on service IPs
func (*Controller) CreateNamespaceIfNeeded ¶ added in v0.17.0
func (c *Controller) CreateNamespaceIfNeeded(ns string) error
CreateNamespaceIfNeeded will create a namespace if it doesn't already exist
func (*Controller) CreateOrUpdateMasterServiceIfNeeded ¶ added in v1.2.0
func (c *Controller) CreateOrUpdateMasterServiceIfNeeded(serviceName string, serviceIP net.IP, servicePorts []api.ServicePort, serviceType api.ServiceType, reconcile bool) error
CreateMasterServiceIfNeeded will create the specified service if it doesn't already exist.
func (*Controller) PostStartHook ¶ added in v1.5.0
func (c *Controller) PostStartHook(hookContext genericapiserver.PostStartHookContext) error
func (*Controller) RunKubernetesNamespaces ¶ added in v1.3.0
func (c *Controller) RunKubernetesNamespaces(ch chan struct{})
RunKubernetesNamespaces periodically makes sure that all internal namespaces exist
func (*Controller) RunKubernetesService ¶ added in v0.17.0
func (c *Controller) RunKubernetesService(ch chan struct{})
RunKubernetesService periodically updates the kubernetes service
func (*Controller) Start ¶ added in v0.17.0
func (c *Controller) Start()
Start begins the core controller loops that must exist for bootstrapping a cluster.
func (*Controller) UpdateKubernetesService ¶ added in v0.17.0
func (c *Controller) UpdateKubernetesService(reconcile bool) error
UpdateKubernetesService attempts to update the default Kube service.
type EndpointReconciler ¶ added in v1.3.0
type EndpointReconciler interface {
	// ReconcileEndpoints sets the endpoints for the given apiserver service (ro or rw).
	// ReconcileEndpoints expects that the endpoints objects it manages will all be
	// managed only by ReconcileEndpoints; therefore, to understand this, you need only
	// understand the requirements.
	//
	// Requirements:
	//  * All apiservers MUST use the same ports for their {rw, ro} services.
	//  * All apiservers MUST use ReconcileEndpoints and only ReconcileEndpoints to manage the
	//      endpoints for their {rw, ro} services.
	//  * ReconcileEndpoints is called periodically from all apiservers.
	ReconcileEndpoints(serviceName string, ip net.IP, endpointPorts []api.EndpointPort, reconcilePorts bool) error
}
    EndpointReconciler knows how to reconcile the endpoints for the apiserver service.
type EndpointReconcilerConfig ¶ added in v1.4.0
type EndpointReconcilerConfig struct {
	Reconciler EndpointReconciler
	Interval   time.Duration
}
    EndpointReconcilerConfig holds the endpoint reconciler and endpoint reconciliation interval to be used by the master.
type Master ¶
type Master struct {
	GenericAPIServer *genericapiserver.GenericAPIServer
	// contains filtered or unexported fields
}
    Master contains state for a Kubernetes cluster master/api server.
func (*Master) InstallAPIs ¶ added in v1.2.0
func (m *Master) InstallAPIs(c *Config, restOptionsGetter genericapiserver.RESTOptionsGetter)
func (*Master) InstallGeneralEndpoints ¶
TODO this needs to be refactored so we have a way to add general health checks to genericapiserver TODO profiling should be generic
func (*Master) InstallLegacyAPI ¶ added in v1.5.0
func (m *Master) InstallLegacyAPI(c *Config, restOptionsGetter genericapiserver.RESTOptionsGetter, legacyRESTStorageProvider corerest.LegacyRESTStorageProvider)
type RESTOptionsGetter ¶ added in v1.4.0
type RESTOptionsGetter func(resource unversioned.GroupResource) generic.RESTOptions
type RESTStorageProvider ¶ added in v1.4.0
type RESTStorageProvider interface {
	NewRESTStorage(apiResourceConfigSource genericapiserver.APIResourceConfigSource, restOptionsGetter RESTOptionsGetter) (groupInfo genericapiserver.APIGroupInfo, enabled bool)
}
    
       Directories
      ¶
      Directories
      ¶
    
    | Path | Synopsis | 
|---|---|
| Package ports defines ports used by various pieces of the kubernetes infrastructure. | Package ports defines ports used by various pieces of the kubernetes infrastructure. |