ipvssink

package module
v0.0.0-...-501ccff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2023 License: Apache-2.0 Imports: 30 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ClusterIPService    = "ClusterIP"
	NodePortService     = "NodePort"
	LoadBalancerService = "LoadBalancer"
)
View Source
const (
	// FlagPersistent specify IPVS service session affinity
	FlagPersistent = 0x1
	// FlagHashed specify IPVS service hash flag
	FlagHashed = 0x2
)
View Source
const (

	// KubeFireWallChain is the kubernetes firewall chain.
	KubeFireWallChain util.Chain = "KUBE-FIREWALL"

	// KubeMarkMasqChain is the mark-for-masquerade chain
	KubeMarkMasqChain util.Chain = "KUBE-MARK-MASQ"

	// KubeNodePortChain is the kubernetes node port chain
	KubeNodePortChain util.Chain = "KUBE-NODE-PORT"

	// KubeMarkDropChain is the mark-for-drop chain
	KubeMarkDropChain util.Chain = "KUBE-MARK-DROP"

	// KubeForwardChain is the kubernetes forward chain
	KubeForwardChain util.Chain = "KUBE-FORWARD"

	// KubeLoadBalancerChain is the kubernetes chain for loadbalancer type service
	KubeLoadBalancerChain util.Chain = "KUBE-LOAD-BALANCER"
)

Variables

This section is empty.

Functions

func NewProxier

func NewProxier(ipFamily v1.IPFamily,
	dummy netlink.Link,
	ipsetInterface util.Interface,
	iptInterface util.IPTableInterface,
	nodeIPs []string,
	schedulingMethod, masqueradeMark string,
	masqueradeAll bool,
	weight int32) *proxier

Types

type Backend

type Backend struct {
	localsink.Config
	// contains filtered or unexported fields
}

func New

func New() *Backend

func (*Backend) AddIP

func (s *Backend) AddIP(svc *localv1.Service, ip string, ipKind serviceevents.IPKind)

func (*Backend) AddIPPort

func (s *Backend) AddIPPort(svc *localv1.Service, ip string, IPKind serviceevents.IPKind, port *localv1.PortMapping)

func (*Backend) BindFlags

func (s *Backend) BindFlags(flags *pflag.FlagSet)

func (*Backend) DeleteEndpoint

func (s *Backend) DeleteEndpoint(namespace, serviceName, key string)

func (*Backend) DeleteIP

func (s *Backend) DeleteIP(svc *localv1.Service, ip string, ipKind serviceevents.IPKind)

func (*Backend) DeleteIPPort

func (s *Backend) DeleteIPPort(svc *localv1.Service, ip string, IPKind serviceevents.IPKind, port *localv1.PortMapping)

func (*Backend) DeleteService

func (s *Backend) DeleteService(namespace, name string)

func (*Backend) DisableSessionAffinity

func (s *Backend) DisableSessionAffinity(svc *localv1.Service)

func (*Backend) DisableTrafficPolicy

func (s *Backend) DisableTrafficPolicy(svc *localv1.Service, policyKind serviceevents.TrafficPolicyKind)

func (*Backend) EnableSessionAffinity

func (s *Backend) EnableSessionAffinity(svc *localv1.Service, sessionAffinity serviceevents.SessionAffinity)

func (*Backend) EnableTrafficPolicy

func (s *Backend) EnableTrafficPolicy(svc *localv1.Service, policyKind serviceevents.TrafficPolicyKind)

func (*Backend) Reset

func (s *Backend) Reset()

func (*Backend) ServeProxyMode

func (s *Backend) ServeProxyMode(errCh chan error)

func (*Backend) SetEndpoint

func (s *Backend) SetEndpoint(namespace, serviceName, key string, endpoint *localv1.Endpoint)

func (*Backend) SetService

func (s *Backend) SetService(svc *localv1.Service)

SetService ------------------------------------------------------ Service

func (*Backend) SetUpHttpListen

func (s *Backend) SetUpHttpListen() error

func (*Backend) Setup

func (s *Backend) Setup()

func (*Backend) Sink

func (s *Backend) Sink() localsink.Sink

func (*Backend) Sync

func (s *Backend) Sync()

func (*Backend) WaitRequest

func (s *Backend) WaitRequest() (nodeName string, err error)

WaitRequest see localsink.Sink#WaitRequest

type BaseServicePortInfo

type BaseServicePortInfo struct {
	// contains filtered or unexported fields
}

func NewBaseServicePortInfo

func NewBaseServicePortInfo(svc *localv1.Service, port *localv1.PortMapping,
	serviceIP, serviceType,
	schedulingMethod string,
	weight int32) *BaseServicePortInfo

func (*BaseServicePortInfo) GetVirtualServer

func (b *BaseServicePortInfo) GetVirtualServer() ipvsLB

func (*BaseServicePortInfo) Port

func (b *BaseServicePortInfo) Port() int32

func (*BaseServicePortInfo) Protocol

func (b *BaseServicePortInfo) Protocol() localv1.Protocol

func (*BaseServicePortInfo) ResetSessionAffinity

func (b *BaseServicePortInfo) ResetSessionAffinity()

func (*BaseServicePortInfo) ServiceIP

func (b *BaseServicePortInfo) ServiceIP() string

func (*BaseServicePortInfo) SetSessionAffinity

func (b *BaseServicePortInfo) SetSessionAffinity(sa serviceevents.SessionAffinity)

func (*BaseServicePortInfo) TargetPort

func (b *BaseServicePortInfo) TargetPort() int32

func (*BaseServicePortInfo) TargetPortName

func (b *BaseServicePortInfo) TargetPortName() string

type IPSet

type IPSet struct {
	ipsetutil.IPSet
	// contains filtered or unexported fields
}

type Operation

type Operation int32
const (
	AddService     Operation = 0
	DeleteService  Operation = 1
	AddEndPoint    Operation = 2
	DeleteEndPoint Operation = 3
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL