package service
import "k8s.io/kubernetes/pkg/api/service"
Index ¶
- func ClearExternalTrafficPolicy(service *api.Service)
- func GetLoadBalancerSourceRanges(service *api.Service) (netsets.IPNet, error)
- func GetServiceHealthCheckNodePort(service *api.Service) int32
- func IsAllowAll(ipnets netsets.IPNet) bool
- func NeedsHealthCheck(service *api.Service) bool
- func RequestsOnlyLocalTraffic(service *api.Service) bool
- func SetServiceHealthCheckNodePort(service *api.Service, hcNodePort int32)
Functions ¶
func ClearExternalTrafficPolicy ¶
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 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 ¶
RequestsOnlyLocalTraffic checks if service requests OnlyLocal traffic.
func SetServiceHealthCheckNodePort ¶
SetServiceHealthCheckNodePort sets the given health check node port on service. It does not check whether this service needs healthCheckNodePort.
Source Files ¶
util.go
- Version
- v1.7.13-beta.0
- Published
- Dec 29, 2017
- Platform
- js/wasm
- Imports
- 6 packages
- Last checked
- 1 second ago –
Tools for package owners.