Documentation ¶
Index ¶
- Constants
- func BuildTargetHealthPodConditionType(tgb *elbv2api.TargetGroupBinding) corev1.PodConditionType
- func IndexFuncServiceRefName(obj client.Object) []string
- func NewCachedTargetsManager(elbv2Client services.ELBV2, logger logr.Logger) *cachedTargetsManager
- func NewDefaultNetworkingManager(k8sClient client.Client, podENIResolver networking.PodENIInfoResolver, ...) *defaultNetworkingManager
- func NewDefaultResourceManager(k8sClient client.Client, elbv2Client services.ELBV2, ec2Client services.EC2, ...) *defaultResourceManager
- func UniqueIDForTargetDescription(target elbv2sdk.TargetDescription) string
- type NetworkingManager
- type ResourceManager
- type TargetInfo
- type TargetsManager
Constants ¶
const ( // Prefix for TargetHealth pod condition type. TargetHealthPodConditionTypePrefix = "target-health.elbv2.k8s.aws" // Legacy Prefix for TargetHealth pod condition type(used by AWS ALB Ingress Controller) TargetHealthPodConditionTypePrefixLegacy = "target-health.alb.ingress.k8s.aws" // Index Key for "ServiceReference" index. IndexKeyServiceRefName = "spec.serviceRef.name" )
Variables ¶
This section is empty.
Functions ¶
func BuildTargetHealthPodConditionType ¶
func BuildTargetHealthPodConditionType(tgb *elbv2api.TargetGroupBinding) corev1.PodConditionType
BuildTargetHealthPodConditionType constructs the condition type for TargetHealth pod condition.
func IndexFuncServiceRefName ¶
IndexFuncServiceRefName is IndexFunc for "ServiceReference" index.
func NewCachedTargetsManager ¶
NewCachedTargetsManager constructs new cachedTargetsManager
func NewDefaultNetworkingManager ¶
func NewDefaultNetworkingManager(k8sClient client.Client, podENIResolver networking.PodENIInfoResolver, nodeENIResolver networking.NodeENIInfoResolver, sgManager networking.SecurityGroupManager, sgReconciler networking.SecurityGroupReconciler, vpcID string, clusterName string, logger logr.Logger, disabledRestrictedSGRulesFlag bool) *defaultNetworkingManager
NewDefaultNetworkingManager constructs defaultNetworkingManager.
func NewDefaultResourceManager ¶
func NewDefaultResourceManager(k8sClient client.Client, elbv2Client services.ELBV2, ec2Client services.EC2, podInfoRepo k8s.PodInfoRepo, sgManager networking.SecurityGroupManager, sgReconciler networking.SecurityGroupReconciler, vpcInfoProvider networking.VPCInfoProvider, vpcID string, clusterName string, failOpenEnabled bool, endpointSliceEnabled bool, disabledRestrictedSGRulesFlag bool, eventRecorder record.EventRecorder, logger logr.Logger) *defaultResourceManager
NewDefaultResourceManager constructs new defaultResourceManager.
func UniqueIDForTargetDescription ¶
func UniqueIDForTargetDescription(target elbv2sdk.TargetDescription) string
UniqueIDForTargetDescription generates a unique ID to differentiate targets.
Types ¶
type NetworkingManager ¶
type NetworkingManager interface { // ReconcileForPodEndpoints reconcile network settings for TargetGroupBindings with podEndpoints. ReconcileForPodEndpoints(ctx context.Context, tgb *elbv2api.TargetGroupBinding, endpoints []backend.PodEndpoint) error // ReconcileForNodePortEndpoints reconcile network settings for TargetGroupBindings with nodePortEndpoints. ReconcileForNodePortEndpoints(ctx context.Context, tgb *elbv2api.TargetGroupBinding, endpoints []backend.NodePortEndpoint) error // Cleanup reconcile network settings for TargetGroupBindings with zero endpoints. Cleanup(ctx context.Context, tgb *elbv2api.TargetGroupBinding) error }
NetworkingManager manages the networking for targetGroupBindings.
type ResourceManager ¶
type ResourceManager interface { Reconcile(ctx context.Context, tgb *elbv2api.TargetGroupBinding) error Cleanup(ctx context.Context, tgb *elbv2api.TargetGroupBinding) error }
ResourceManager manages the TargetGroupBinding resource.
type TargetInfo ¶
type TargetInfo struct { // The target's description Target elbv2sdk.TargetDescription // The target's health information. // If absent, the target's health information is unknown. TargetHealth *elbv2sdk.TargetHealth }
TargetInfo contains information about a TargetGroup target.
func (*TargetInfo) IsDraining ¶
func (t *TargetInfo) IsDraining() bool
IsDraining returns whether target is in draining state.
func (*TargetInfo) IsHealthy ¶
func (t *TargetInfo) IsHealthy() bool
IsHealthy returns whether target is healthy.
func (*TargetInfo) IsInitial ¶
func (t *TargetInfo) IsInitial() bool
IsInitial returns whether target is in initial state.
func (*TargetInfo) IsNotRegistered ¶
func (t *TargetInfo) IsNotRegistered() bool
IsNotRegistered returns whether target is not registered.
type TargetsManager ¶
type TargetsManager interface { // Register Targets into TargetGroup. RegisterTargets(ctx context.Context, tgARN string, targets []elbv2sdk.TargetDescription) error // Deregister Targets from TargetGroup. DeregisterTargets(ctx context.Context, tgARN string, targets []elbv2sdk.TargetDescription) error // List Targets from TargetGroup. ListTargets(ctx context.Context, tgARN string) ([]TargetInfo, error) }
TargetsManager is an abstraction around ELBV2's targets API.