Documentation ¶
Overview ¶
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
// Copyright 2020 Antrea Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License.
Modifies:
- Remove imports: "errors", "strconv", "k8s.io/apimachinery/pkg/util/rand", "k8s.io/apimachinery/pkg/util/sets", "k8s.io/kubernetes/pkg/apis/core/v1/helper"
- Remove consts: "IPv4ZeroCIDR", "IPv6ZeroCIDR"
- Remove vars: "ErrAddressNotAllowed", "ErrNoAddresses"
- Remove functions: "isValidEndpoint", "BuildPortsToEndpointsMap", "IsZeroCIDR", "IsProxyableIP", "isProxyableIP", "IsProxyableHostname", "IsLocalIP", "GetNodeAddresses".
Index ¶
- Variables
- func ExternalPolicyLocal(service *v1.Service) bool
- func ExternallyAccessible(service *v1.Service) bool
- func FilterIncorrectCIDRVersion(ipStrings []string, isIPv6Mode bool) ([]string, []string)
- func FilterIncorrectIPVersion(ipStrings []string, isIPv6Mode bool) ([]string, []string)
- func GetClusterIPByFamily(ipFamily v1.IPFamily, service *v1.Service) string
- func IPPart(s string) string
- func InternalPolicyLocal(service *v1.Service) bool
- func LogAndEmitIncorrectIPVersionEvent(recorder record.EventRecorder, ...)
- func MapCIDRsByIPFamily(cidrStrings []string) map[v1.IPFamily][]string
- func MapIPsByIPFamily(ipStrings []string) map[v1.IPFamily][]string
- func NeedsHealthCheck(service *v1.Service) bool
- func OtherIPFamily(ipFamily v1.IPFamily) v1.IPFamily
- func PortPart(s string) (int, error)
- func ShouldSkipService(service *v1.Service, skipServices sets.Set[string], ...) bool
- type Resolver
Constants ¶
This section is empty.
Variables ¶
var ( // ErrAddressNotAllowed indicates the address is not allowed ErrAddressNotAllowed = errors.New("address not allowed") // ErrNoAddresses indicates there are no addresses for the hostname ErrNoAddresses = errors.New("No addresses for hostname") )
Functions ¶
func ExternalPolicyLocal ¶ added in v1.11.0
ExternalPolicyLocal checks if service has ETP = Local.
func ExternallyAccessible ¶ added in v1.12.3
func FilterIncorrectCIDRVersion ¶
FilterIncorrectCIDRVersion filters out the incorrect IP version case from a slice of CIDR strings.
func FilterIncorrectIPVersion ¶
FilterIncorrectIPVersion filters out the incorrect IP version case from a slice of IP strings.
func GetClusterIPByFamily ¶
GetClusterIPByFamily returns a service clusterip by family
func IPPart ¶
IPPart returns just the IP part of an IP or IP:port or endpoint string. If the IP part is an IPv6 address enclosed in brackets (e.g. "[fd00:1::5]:9999"), then the brackets are stripped as well.
func InternalPolicyLocal ¶ added in v1.11.0
InternalPolicyLocal checks if service has ITP = Local.
func LogAndEmitIncorrectIPVersionEvent ¶
func LogAndEmitIncorrectIPVersionEvent(recorder record.EventRecorder, fieldName, fieldValue, svcNamespace, svcName string, svcUID types.UID)
LogAndEmitIncorrectIPVersionEvent logs and emits incorrect IP version event.
func MapCIDRsByIPFamily ¶
MapCIDRsByIPFamily maps a slice of IPs to their respective IP families (v4 or v6)
func MapIPsByIPFamily ¶
MapIPsByIPFamily maps a slice of IPs to their respective IP families (v4 or v6)
func NeedsHealthCheck ¶
NeedsHealthCheck checks if service needs health check.
func OtherIPFamily ¶
OtherIPFamily returns the other ip family