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 ¶
- func FilterIncorrectCIDRVersion(ipStrings []string, isIPv6Mode bool) ([]string, []string)
- func FilterIncorrectIPVersion(ipStrings []string, isIPv6Mode bool) ([]string, []string)
- func IPPart(s string) string
- func LogAndEmitIncorrectIPVersionEvent(recorder record.EventRecorder, ...)
- func NeedsHealthCheck(service *v1.Service) bool
- func PortPart(s string) (int, error)
- func RequestsOnlyLocalTraffic(service *v1.Service) bool
- func ShouldSkipService(svcName types.NamespacedName, service *v1.Service) bool
- type Resolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 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 LogAndEmitIncorrectIPVersionEvent ¶
func LogAndEmitIncorrectIPVersionEvent(recorder record.EventRecorder, fieldName, fieldValue, svcNamespace, svcName string, svcUID types.UID)
LogAndEmitIncorrectIPVersionEvent logs and emits incorrect IP version event.
func NeedsHealthCheck ¶
NeedsHealthCheck checks if service needs health check.
func RequestsOnlyLocalTraffic ¶
RequestsOnlyLocalTraffic checks if service requests OnlyLocal traffic.
func ShouldSkipService ¶
func ShouldSkipService(svcName types.NamespacedName, service *v1.Service) bool
ShouldSkipService checks if a given service should skip proxying