lbipam

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultLBClassLBIPAM   = "lbipam"
	DefaulLBClasstNodeIPAM = "nodeipam"
)

Variables

View Source
var Cell = cell.Module(
	"lbipam",
	"LB-IPAM",

	cell.Provide(
		newLBIPAMCell,
		func(c lbipamConfig) Config { return c },
	),

	cell.Invoke(func(*LBIPAM) {}),

	metrics.Metric(newMetrics),

	cell.Config(lbipamConfig{
		EnableLBIPAM: true,
	}),
	cell.Config(SharedConfig{
		DefaultLBServiceIPAM: DefaultLBClassLBIPAM,
	}),
)

Functions

func NewServiceStore

func NewServiceStore() serviceStore

Types

type AddressFamily

type AddressFamily string
const (
	IPv4Family AddressFamily = "IPv4"
	IPv6Family AddressFamily = "IPv6"
)

type Config added in v1.14.19

type Config interface {
	IsEnabled() bool
}

type LBIPAM

type LBIPAM struct {
	// contains filtered or unexported fields
}

LBIPAM is the loadbalancer IP address manager, controller which allocates and assigns IP addresses to LoadBalancer services from the configured set of LoadBalancerIPPools in the cluster.

func (*LBIPAM) Run

func (ipam *LBIPAM) Run(ctx context.Context, health cell.Health)

type LBRange

type LBRange struct {
	// contains filtered or unexported fields
}

func NewLBRange added in v1.13.0

func NewLBRange(from, to netip.Addr, pool *cilium_api_v2alpha1.CiliumLoadBalancerIPPool) (*LBRange, error)

func (*LBRange) Disabled

func (lr *LBRange) Disabled() bool

func (*LBRange) Equal

func (lr *LBRange) Equal(other *LBRange) bool

func (*LBRange) EqualCIDR

func (lr *LBRange) EqualCIDR(from, to netip.Addr) bool

func (*LBRange) String

func (lr *LBRange) String() string

type ServiceView

type ServiceView struct {
	Key    resource.Key
	Labels slim_labels.Set

	Generation int64
	Status     *slim_core_v1.ServiceStatus

	SharingKey            string
	SharingCrossNamespace []string
	// These required to determine if a service conflicts with another for sharing an ip
	ExternalTrafficPolicy slim_core_v1.ServiceExternalTrafficPolicy
	Ports                 []slim_core_v1.ServicePort
	Namespace             string
	Selector              map[string]string

	// The specific IPs requested by the service
	RequestedIPs []netip.Addr
	// The IP families requested by the service
	RequestedFamilies struct {
		IPv4 bool
		IPv6 bool
	}
	// The IPs we have allocated for this IP
	AllocatedIPs []ServiceViewIP
}

ServiceView is the LB IPAM's view of the service, the minimal amount of info we need about it.

type ServiceViewIP

type ServiceViewIP struct {
	IP     netip.Addr
	Origin *LBRange
}

ServiceViewIP is the IP and from which range it was allocated

type SharedConfig added in v1.17.0

type SharedConfig struct {
	// DefaultLBServiceIPAM indicate the default LoadBalancer Service IPAM
	DefaultLBServiceIPAM string
}

SharedConfig contains the configuration that is shared between this module and others. It is a temporary solution meant to avoid polluting this module with a direct dependency on global operator configurations.

func (SharedConfig) Flags added in v1.17.0

func (sc SharedConfig) Flags(flags *pflag.FlagSet)

Jump to

Keyboard shortcuts

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