Documentation ¶
Index ¶
- Constants
- func GetLoadBalancerSourceRanges(service *v1.Service) (utilnet.IPNetSet, error)
- func GetServiceHealthCheckPathPort(service *v1.Service) (string, int32)
- func HasLBFinalizer(service *v1.Service) bool
- func IsAllowAll(ipnets utilnet.IPNetSet) bool
- func LoadBalancerStatusEqual(l, r *v1.LoadBalancerStatus) bool
- func NeedsHealthCheck(service *v1.Service) bool
- func PatchService(c corev1.CoreV1Interface, oldSvc, newSvc *v1.Service) (*v1.Service, error)
- func RequestsOnlyLocalTraffic(service *v1.Service) bool
Constants ¶
const ( // LoadBalancerCleanupFinalizer is the finalizer added to load balancer // services to ensure the Service resource is not fully deleted until // the correlating load balancer resources are deleted. LoadBalancerCleanupFinalizer = "service.kubernetes.io/load-balancer-cleanup" )
Variables ¶
This section is empty.
Functions ¶
func GetLoadBalancerSourceRanges ¶
GetLoadBalancerSourceRanges first try to parse and verify LoadBalancerSourceRanges field from a service. If the field is not specified, turn to parse and verify the AnnotationLoadBalancerSourceRangesKey annotation from a service, extracting the source ranges to allow, and if not present returns a default (allow-all) value.
func GetServiceHealthCheckPathPort ¶
GetServiceHealthCheckPathPort returns the path and nodePort programmed into the Cloud LB Health Check
func HasLBFinalizer ¶
HasLBFinalizer checks if service contains LoadBalancerCleanupFinalizer.
func IsAllowAll ¶
IsAllowAll checks whether the utilnet.IPNet allows traffic from 0.0.0.0/0
func LoadBalancerStatusEqual ¶ added in v0.17.0
func LoadBalancerStatusEqual(l, r *v1.LoadBalancerStatus) bool
LoadBalancerStatusEqual checks if load balancer status are equal
func NeedsHealthCheck ¶
NeedsHealthCheck checks if service needs health check.
func PatchService ¶ added in v0.18.0
PatchService patches the given service's Status or ObjectMeta based on the original and updated ones. Change to spec will be ignored.
func RequestsOnlyLocalTraffic ¶
RequestsOnlyLocalTraffic checks if service requests OnlyLocal traffic.
Types ¶
This section is empty.