kubernetesk8s.io/kubernetes/pkg/api/v1/service Index | Files

package service

import "k8s.io/kubernetes/pkg/api/v1/service"

Index

Functions

func ClearExternalTrafficPolicy

func ClearExternalTrafficPolicy(service *v1.Service)

ClearExternalTrafficPolicy resets the ExternalTrafficPolicy field.

func GetLoadBalancerSourceRanges

func GetLoadBalancerSourceRanges(service *v1.Service) (netsets.IPNet, error)

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

func GetServiceHealthCheckNodePort(service *v1.Service) int32

GetServiceHealthCheckNodePort Return health check node port for service, if one exists

func GetServiceHealthCheckPathPort

func GetServiceHealthCheckPathPort(service *v1.Service) (string, int32)

GetServiceHealthCheckPathPort Return the path and nodePort programmed into the Cloud LB Health Check

func IsAllowAll

func IsAllowAll(ipnets netsets.IPNet) bool

IsAllowAll checks whether the netsets.IPNet allows traffic from 0.0.0.0/0

func NeedsHealthCheck

func NeedsHealthCheck(service *v1.Service) bool

NeedsHealthCheck Check if service needs health check.

func RequestsOnlyLocalTraffic

func RequestsOnlyLocalTraffic(service *v1.Service) bool

RequestsOnlyLocalTraffic checks if service requests OnlyLocal traffic.

func SetServiceHealthCheckNodePort

func SetServiceHealthCheckNodePort(service *v1.Service, hcNodePort int32)

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.11
Published
Nov 22, 2017
Platform
js/wasm
Imports
6 packages
Last checked
5 minutes ago

Tools for package owners.