kubernetesservice

package
v1.31.0-beta.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config 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 Controller

type Controller struct {
	Config
	// 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, client kubernetes.Interface, serviceInformer v1informers.ServiceInformer) *Controller

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) Run

func (c *Controller) Run(ch <-chan struct{})

Run periodically updates the kubernetes service

func (*Controller) Start

func (c *Controller) Start(stopCh <-chan struct{})

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL