Documentation ¶
Index ¶
- func ClearExternalTrafficPolicy(service *v1.Service)
- func GetLoadBalancerSourceRanges(service *v1.Service) (netsets.IPNet, error)
- func GetServiceHealthCheckNodePort(service *v1.Service) int32
- func GetServiceHealthCheckPathPort(service *v1.Service) (string, int32)
- func IsAllowAll(ipnets netsets.IPNet) bool
- func NeedsHealthCheck(service *v1.Service) bool
- func RequestsOnlyLocalTraffic(service *v1.Service) bool
- func SetServiceHealthCheckNodePort(service *v1.Service, hcNodePort int32)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearExternalTrafficPolicy ¶ added in v1.7.0
ClearExternalTrafficPolicy resets the ExternalTrafficPolicy field.
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 GetServiceHealthCheckNodePort ¶
GetServiceHealthCheckNodePort Return health check node port for service, if one exists
func GetServiceHealthCheckPathPort ¶
GetServiceHealthCheckPathPort Return the path and nodePort programmed into the Cloud LB Health Check
func IsAllowAll ¶
IsAllowAll checks whether the netsets.IPNet allows traffic from 0.0.0.0/0
func NeedsHealthCheck ¶
NeedsHealthCheck Check if service needs health check.
func RequestsOnlyLocalTraffic ¶ added in v1.7.0
RequestsOnlyLocalTraffic checks if service requests OnlyLocal traffic.
func SetServiceHealthCheckNodePort ¶ added in v1.7.0
SetServiceHealthCheckNodePort sets the given health check node port on service. It does not check whether this service needs healthCheckNodePort.
Types ¶
This section is empty.