Documentation ¶
Index ¶
- func GetClusterIPByFamily(ipFamily v1.IPFamily, service *localv1.Service) string
- func NewEBPFController(objs bpfObjects, bpfProgLink cebpflink.Link, ipFamily v1.IPFamily) ebpfController
- func RequestsOnlyLocalTraffic(service *localv1.Service) bool
- type BaseServiceInfo
- func (info *BaseServiceInfo) ClusterIP() net.IP
- func (info *BaseServiceInfo) ExternalIPStrings() []string
- func (info *BaseServiceInfo) HealthCheckNodePort() int
- func (info *BaseServiceInfo) HintsAnnotation() string
- func (info *BaseServiceInfo) InternalTrafficPolicy() *v1.ServiceInternalTrafficPolicyType
- func (info *BaseServiceInfo) LoadBalancerIPStrings() []string
- func (info *BaseServiceInfo) LoadBalancerSourceRanges() []string
- func (info *BaseServiceInfo) NodeLocalExternal() bool
- func (info *BaseServiceInfo) NodeLocalInternal() bool
- func (info *BaseServiceInfo) NodePort() int
- func (info *BaseServiceInfo) Port() int
- func (info *BaseServiceInfo) PortName() string
- func (info *BaseServiceInfo) Protocol() localv1.Protocol
- func (info *BaseServiceInfo) SessionAffinity() SessionAffinity
- func (info *BaseServiceInfo) String() string
- func (info *BaseServiceInfo) TargetPort() int
- func (info *BaseServiceInfo) TargetPortName() string
- type ServicePort
- type ServicePortName
- type SessionAffinity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClusterIPByFamily ¶
GetClusterIPByFamily returns a service clusterip by family
func NewEBPFController ¶
func RequestsOnlyLocalTraffic ¶
RequestsOnlyLocalTraffic checks if service requests OnlyLocal traffic.
Types ¶
type BaseServiceInfo ¶
type BaseServiceInfo struct {
// contains filtered or unexported fields
}
BaseServiceInfo contains base information that defines a service. This could be used directly by proxier while processing services, or can be used for constructing a more specific ServiceInfo struct defined by the proxier if needed.
func (*BaseServiceInfo) ClusterIP ¶
func (info *BaseServiceInfo) ClusterIP() net.IP
ClusterIP is part of ServicePort interface.
func (*BaseServiceInfo) ExternalIPStrings ¶
func (info *BaseServiceInfo) ExternalIPStrings() []string
ExternalIPStrings is part of ServicePort interface.
func (*BaseServiceInfo) HealthCheckNodePort ¶
func (info *BaseServiceInfo) HealthCheckNodePort() int
HealthCheckNodePort is part of ServicePort interface.
func (*BaseServiceInfo) HintsAnnotation ¶
func (info *BaseServiceInfo) HintsAnnotation() string
HintsAnnotation is part of ServicePort interface.
func (*BaseServiceInfo) InternalTrafficPolicy ¶
func (info *BaseServiceInfo) InternalTrafficPolicy() *v1.ServiceInternalTrafficPolicyType
InternalTrafficPolicy is part of ServicePort interface
func (*BaseServiceInfo) LoadBalancerIPStrings ¶
func (info *BaseServiceInfo) LoadBalancerIPStrings() []string
LoadBalancerIPStrings is part of ServicePort interface.
func (*BaseServiceInfo) LoadBalancerSourceRanges ¶
func (info *BaseServiceInfo) LoadBalancerSourceRanges() []string
LoadBalancerSourceRanges is part of ServicePort interface
func (*BaseServiceInfo) NodeLocalExternal ¶
func (info *BaseServiceInfo) NodeLocalExternal() bool
NodeLocalExternal is part of ServicePort interface.
func (*BaseServiceInfo) NodeLocalInternal ¶
func (info *BaseServiceInfo) NodeLocalInternal() bool
NodeLocalInternal is part of ServicePort interface
func (*BaseServiceInfo) NodePort ¶
func (info *BaseServiceInfo) NodePort() int
NodePort is part of the ServicePort interface.
func (*BaseServiceInfo) Port ¶
func (info *BaseServiceInfo) Port() int
Port is part of ServicePort interface.
func (*BaseServiceInfo) PortName ¶
func (info *BaseServiceInfo) PortName() string
PortName is part of ServicePort interface.
func (*BaseServiceInfo) Protocol ¶
func (info *BaseServiceInfo) Protocol() localv1.Protocol
Protocol is part of ServicePort interface.
func (*BaseServiceInfo) SessionAffinity ¶
func (info *BaseServiceInfo) SessionAffinity() SessionAffinity
SessionAffinity is part of the ServicePort interface.
func (*BaseServiceInfo) String ¶
func (info *BaseServiceInfo) String() string
String is part of ServicePort interface.
func (*BaseServiceInfo) TargetPort ¶
func (info *BaseServiceInfo) TargetPort() int
Port is part of ServicePort interface.
func (*BaseServiceInfo) TargetPortName ¶
func (info *BaseServiceInfo) TargetPortName() string
type ServicePort ¶
type ServicePort interface { // String returns service string. An example format can be: `IP:Port/Protocol`. String() string // GetClusterIP returns service cluster IP in net.IP format. ClusterIP() net.IP // GetPort returns service port if present. If return 0 means not present. Port() int // ExternalIPStrings returns service ExternalIPs as a string array. ExternalIPStrings() []string // LoadBalancerIPStrings returns service LoadBalancerIPs as a string array. LoadBalancerIPStrings() []string // GetProtocol returns service protocol. Protocol() localv1.Protocol // LoadBalancerSourceRanges returns service LoadBalancerSourceRanges if present empty array if not LoadBalancerSourceRanges() []string // GetHealthCheckNodePort returns service health check node port if present. If return 0, it means not present. HealthCheckNodePort() int // GetNodePort returns a service Node port if present. If return 0, it means not present. NodePort() int // NodeLocalExternal returns if a service has only node local endpoints for external traffic. NodeLocalExternal() bool // NodeLocalInternal returns if a service has only node local endpoints for internal traffic. NodeLocalInternal() bool // InternalTrafficPolicy returns service InternalTrafficPolicy InternalTrafficPolicy() *v1.ServiceInternalTrafficPolicyType // HintsAnnotation returns the value of the v1.AnnotationTopologyAwareHints annotation. HintsAnnotation() string }
ServicePort is an interface which abstracts information about a service.
type ServicePortName ¶
type ServicePortName struct { types.NamespacedName Port string Protocol localv1.Protocol }
ServicePortName carries a namespace + name + portname. This is the unique identifier for a load-balanced service.
func (ServicePortName) String ¶
func (spn ServicePortName) String() string
type SessionAffinity ¶
type SessionAffinity struct {
ClientIP *localv1.Service_ClientIP
}
SessionAffinity contains data about assinged session affinity