controllers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package controllers implements controllers to handle allocations using in-cluster resources.

Index

Constants

View Source
const (
	// ReleaseAddressFinalizer is used to release an IP address before cleaning up the claim.
	ReleaseAddressFinalizer = "ipam.cluster.x-k8s.io/ReleaseAddress"

	// ProtectAddressFinalizer is used to prevent deletion of an IPAddress object while its claim is not deleted.
	ProtectAddressFinalizer = "ipam.cluster.x-k8s.io/ProtectAddress"
)
View Source
const (

	// ProtectPoolFinalizer is used to prevent deletion of a Pool object while its addresses have not been deleted.
	ProtectPoolFinalizer = "ipam.cluster.x-k8s.io/ProtectPool"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GlobalInClusterIPPoolReconciler

type GlobalInClusterIPPoolReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

GlobalInClusterIPPoolReconciler reconciles a GlobalInClusterIPPool object.

func (*GlobalInClusterIPPoolReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*GlobalInClusterIPPoolReconciler) SetupWithManager

func (r *GlobalInClusterIPPoolReconciler) SetupWithManager(_ context.Context, mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type IPAddressClaimHandler

type IPAddressClaimHandler struct {
	client.Client
	// contains filtered or unexported fields
}

IPAddressClaimHandler reconciles a InClusterIPPool object.

func (*IPAddressClaimHandler) EnsureAddress

func (h *IPAddressClaimHandler) EnsureAddress(ctx context.Context, address *ipamv1.IPAddress) (*ctrl.Result, error)

EnsureAddress ensures that the IPAddress contains a valid address.

func (*IPAddressClaimHandler) FetchPool

FetchPool fetches the (Global)InClusterIPPool.

func (*IPAddressClaimHandler) ReleaseAddress

func (h *IPAddressClaimHandler) ReleaseAddress(_ context.Context) (*ctrl.Result, error)

ReleaseAddress releases the ip address.

type InClusterIPPoolReconciler

type InClusterIPPoolReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

InClusterIPPoolReconciler reconciles a InClusterIPPool object.

func (*InClusterIPPoolReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*InClusterIPPoolReconciler) SetupWithManager

func (r *InClusterIPPoolReconciler) SetupWithManager(_ context.Context, mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type InClusterProviderAdapter

type InClusterProviderAdapter struct {
	Client           client.Client
	WatchFilterValue string
}

InClusterProviderAdapter is used as middle layer for provider integration.

func (*InClusterProviderAdapter) ClaimHandlerFor

ClaimHandlerFor returns a claim handler for a specific claim.

func (*InClusterProviderAdapter) SetupWithManager

func (i *InClusterProviderAdapter) SetupWithManager(_ context.Context, b *ctrl.Builder) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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