package service
import "k8s.io/kubernetes/pkg/api/v1/service"
Index ¶
- func GetLoadBalancerSourceRanges(service *v1.Service) (netsets.IPNet, error)
- 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
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 IsAllowAll ¶
IsAllowAll checks whether the netsets.IPNet allows traffic from 0.0.0.0/0
func NeedsHealthCheck ¶
NeedsHealthCheck checks if service needs health check.
func RequestsOnlyLocalTraffic ¶
RequestsOnlyLocalTraffic checks if service requests OnlyLocal traffic.
Source Files ¶
util.go
- Version
- v1.9.1
- Published
- Jan 3, 2018
- Platform
- js/wasm
- Imports
- 4 packages
- Last checked
- 4 minutes ago –
Tools for package owners.