kubernetesk8s.io/kubernetes/pkg/controlplane/controller/kubernetesservice Index | Files

package kubernetesservice

import "k8s.io/kubernetes/pkg/controlplane/controller/kubernetesservice"

Index

Types

type ClusterIP

type ClusterIP struct {
	ServiceClusterIPRange          net.IPNet
	SecondaryServiceClusterIPRange net.IPNet
	ServiceClusterIPInterval       time.Duration
}

type Config

type Controller

type Controller struct {
	Config
	RangeRegistries
	// contains filtered or unexported fields
}

Controller is the controller manager for the core bootstrap Kubernetes controller loops, which manage creating the "kubernetes" service and provide the IP repair check on service IPs

func New

func New(config Config, rangeRegistries RangeRegistries) (*Controller, error)

New returns a controller for watching the kubernetes service endpoints.

func (*Controller) CreateOrUpdateMasterServiceIfNeeded

func (c *Controller) CreateOrUpdateMasterServiceIfNeeded(serviceName string, serviceIP net.IP, servicePorts []corev1.ServicePort, serviceType corev1.ServiceType, reconcile bool) error

CreateOrUpdateMasterServiceIfNeeded will create the specified service if it doesn't already exist.

func (*Controller) RunKubernetesService

func (c *Controller) RunKubernetesService(ch chan struct{})

RunKubernetesService periodically updates the kubernetes service

func (*Controller) Start

func (c *Controller) Start()

Start begins the core controller loops that must exist for bootstrapping a cluster.

func (*Controller) Stop

func (c *Controller) Stop()

Stop cleans up this API Servers endpoint reconciliation leases so another master can take over more quickly.

func (*Controller) UpdateKubernetesService

func (c *Controller) UpdateKubernetesService(reconcile bool) error

UpdateKubernetesService attempts to update the default Kube service.

type KubernetesService

type KubernetesService struct {
	PublicIP net.IP

	EndpointReconciler reconcilers.EndpointReconciler
	EndpointInterval   time.Duration

	// ServiceIP indicates where the kubernetes service will live.  It may not be nil.
	ServiceIP                 net.IP
	ServicePort               int
	PublicServicePort         int
	KubernetesServiceNodePort int
}

type NodePort

type NodePort struct {
	ServiceNodePortInterval time.Duration
	ServiceNodePortRange    utilnet.PortRange
}

type RangeRegistries

type RangeRegistries struct {
	ServiceClusterIPRegistry          rangeallocation.RangeRegistry
	SecondaryServiceClusterIPRegistry rangeallocation.RangeRegistry
	ServiceNodePortRegistry           rangeallocation.RangeRegistry
}

Source Files

controller.go

Version
v1.28.0-alpha.4
Published
Jul 6, 2023
Platform
js/wasm
Imports
24 packages
Last checked
42 seconds ago

Tools for package owners.