loadbalancer

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0, Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SLBName     = "kubernetes"
	SLBNameIPv6 = "kubernetes-ipv6"

	// InternalSLBName is the name of the internal SLB created by cloudprovider when Services with type LoadBalancer are created. This may not exist
	// when the pod launches/Karpenter is created. We query it as an optimization to save cloudprovider work, as otherwise cloudprovider must edit
	// ever VM we deploy to include this LB.
	InternalSLBName = "kubernetes-internal"

	// SLBOutboundBackendPoolName is the AKS SLB outbound backend pool name
	SLBOutboundBackendPoolName = "aksOutboundBackendPool"
	// SLBOutboundBackendPoolNameIPv6 is the AKS SLB outbound backend pool name for IPv6 traffic
	SLBOutboundBackendPoolNameIPv6 = "aksOutboundBackendPool-ipv6"
	// SLBInboundBackendPoolName is the AKS SLB inbound backend pool name
	SLBInboundBackendPoolName = "kubernetes"
	// SLBInboundBackendPoolNameIPv6 is the AKS SLB inbound backend pool name for IPv6 traffic
	SLBInboundBackendPoolNameIPv6 = "kubernetes-ipv6"

	// LoadBalancersCacheTTL configures how freuqently we check for updates to the LBs.
	// Currently the choice of this value is entirely "how much work do we want to save cloudprovider".
	// The faster we do this, the faster we notice the creation of a kubernetes-internal LB and start
	// including it on new VMs, which saves CloudProvider needing to do that.
	LoadBalancersCacheTTL = 2 * time.Hour
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendAddressPools

type BackendAddressPools struct {
	IPv4PoolIDs []string
	IPv6PoolIDs []string // TODO: This is always empty currently
}

type LoadBalancersAPI

type LoadBalancersAPI interface {
	Get(ctx context.Context, resourceGroupName string, loadBalancerName string, options *armnetwork.LoadBalancersClientGetOptions) (armnetwork.LoadBalancersClientGetResponse, error)
	NewListPager(resourceGroupName string, options *armnetwork.LoadBalancersClientListOptions) *runtime.Pager[armnetwork.LoadBalancersClientListResponse]
}

type Provider

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

func NewProvider

func NewProvider(loadBalancersAPI LoadBalancersAPI, cache *cache.Cache, resourceGroup string) *Provider

NewProvider creates a new LoadBalancer provider

func (*Provider) LoadBalancerBackendPools

func (p *Provider) LoadBalancerBackendPools(ctx context.Context) (*BackendAddressPools, error)

LoadBalancerBackendPools returns a collection of IPv4 and IPv6 LoadBalancer backend pools. This collection is collected from Azure periodically but usually served from a cache to reduce Azure request load.

Jump to

Keyboard shortcuts

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