kubernetes/pkg/controller/servicecidrs/servicecidrs_controller.go

const maxRetries

const controllerName

const ServiceCIDRProtectionFinalizer

const deletionGracePeriod

// NewController returns a new *Controller.
func NewController(
	ctx context.Context,
	serviceCIDRInformer networkinginformers.ServiceCIDRInformer,
	ipAddressInformer networkinginformers.IPAddressInformer,
	client clientset.Interface,
) *Controller {}

type Controller

// Run will not return until stopCh is closed.
func (c *Controller) Run(ctx context.Context, workers int) {}

func (c *Controller) addServiceCIDR(obj interface{}

func (c *Controller) updateServiceCIDR(oldObj, obj interface{}

// deleteServiceCIDR
func (c *Controller) deleteServiceCIDR(obj interface{}

// addIPAddress may block a ServiceCIDR deletion
func (c *Controller) addIPAddress(obj interface{}

// deleteIPAddress may unblock a ServiceCIDR deletion
func (c *Controller) deleteIPAddress(obj interface{}

// overlappingServiceCIDRs, given a ServiceCIDR return the ServiceCIDRs that contain or are contained,
// this is required because adding or removing a CIDR will require to recompute the
// state of each ServiceCIDR to check if can be unblocked on deletion.
func (c *Controller) overlappingServiceCIDRs(serviceCIDR *networkingapiv1beta1.ServiceCIDR) []string {}

// containingServiceCIDRs, given an IPAddress return the ServiceCIDRs that contains the IP,
// as it may block or be blocking the deletion of the ServiceCIDRs that contain it.
func (c *Controller) containingServiceCIDRs(ip *networkingapiv1beta1.IPAddress) []string {}

func (c *Controller) worker(ctx context.Context) {}

func (c *Controller) processNext(ctx context.Context) bool {}

func (c *Controller) sync(ctx context.Context, key string) error {}

// canDeleteCIDR checks that the ServiceCIDR can be safely deleted and not leave orphan IPAddresses
func (c *Controller) canDeleteCIDR(ctx context.Context, serviceCIDR *networkingapiv1beta1.ServiceCIDR) (bool, error) {}

func (c *Controller) addServiceCIDRFinalizerIfNeeded(ctx context.Context, cidr *networkingapiv1beta1.ServiceCIDR) error {}

func (c *Controller) removeServiceCIDRFinalizerIfNeeded(ctx context.Context, cidr *networkingapiv1beta1.ServiceCIDR) error {}

// Convert netutils.IPFamily to v1.IPFamily
// TODO: consolidate helpers
// copied from pkg/proxy/util/utils.go
func convertToV1IPFamily(ipFamily netutils.IPFamily) v1.IPFamily {}