Documentation ¶
Index ¶
- func CleanupLeftovers() bool
- func NewDualStackProxier(sysctl utilsysctl.Interface, syncPeriod time.Duration, ...) (proxy.Provider, error)
- type Proxier
- func (proxier *Proxier) OnEndpointSliceAdd(endpointSlice *discovery.EndpointSlice)
- func (proxier *Proxier) OnEndpointSliceDelete(endpointSlice *discovery.EndpointSlice)
- func (proxier *Proxier) OnEndpointSliceUpdate(_, endpointSlice *discovery.EndpointSlice)
- func (proxier *Proxier) OnEndpointSlicesSynced()
- func (proxier *Proxier) OnNodeAdd(node *v1.Node)
- func (proxier *Proxier) OnNodeDelete(node *v1.Node)
- func (proxier *Proxier) OnNodeSynced()
- func (proxier *Proxier) OnNodeUpdate(oldNode, node *v1.Node)
- func (proxier *Proxier) OnServiceAdd(service *v1.Service)
- func (proxier *Proxier) OnServiceDelete(service *v1.Service)
- func (proxier *Proxier) OnServiceSynced()
- func (proxier *Proxier) OnServiceUpdate(oldService, service *v1.Service)
- func (proxier *Proxier) Sync()
- func (proxier *Proxier) SyncLoop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupLeftovers ¶
func CleanupLeftovers() bool
CleanupLeftovers removes all nftables rules and chains created by the Proxier It returns true if an error was encountered. Errors are logged.
func NewDualStackProxier ¶
func NewDualStackProxier( sysctl utilsysctl.Interface, syncPeriod time.Duration, minSyncPeriod time.Duration, masqueradeAll bool, masqueradeBit int, localDetectors [2]proxyutiliptables.LocalTrafficDetector, hostname string, nodeIPs map[v1.IPFamily]net.IP, recorder events.EventRecorder, healthzServer *healthcheck.ProxierHealthServer, nodePortAddresses []string, initOnly bool, ) (proxy.Provider, error)
NewDualStackProxier creates a MetaProxier instance, with IPv4 and IPv6 proxies.
Types ¶
type Proxier ¶
type Proxier struct {
// contains filtered or unexported fields
}
Proxier is an nftables based proxy
func NewProxier ¶
func NewProxier(ipFamily v1.IPFamily, sysctl utilsysctl.Interface, syncPeriod time.Duration, minSyncPeriod time.Duration, masqueradeAll bool, masqueradeBit int, localDetector proxyutiliptables.LocalTrafficDetector, hostname string, nodeIP net.IP, recorder events.EventRecorder, healthzServer *healthcheck.ProxierHealthServer, nodePortAddressStrings []string, initOnly bool, ) (*Proxier, error)
NewProxier returns a new nftables Proxier. Once a proxier is created, it will keep nftables up to date in the background and will not terminate if a particular nftables call fails.
func (*Proxier) OnEndpointSliceAdd ¶
func (proxier *Proxier) OnEndpointSliceAdd(endpointSlice *discovery.EndpointSlice)
OnEndpointSliceAdd is called whenever creation of a new endpoint slice object is observed.
func (*Proxier) OnEndpointSliceDelete ¶
func (proxier *Proxier) OnEndpointSliceDelete(endpointSlice *discovery.EndpointSlice)
OnEndpointSliceDelete is called whenever deletion of an existing endpoint slice object is observed.
func (*Proxier) OnEndpointSliceUpdate ¶
func (proxier *Proxier) OnEndpointSliceUpdate(_, endpointSlice *discovery.EndpointSlice)
OnEndpointSliceUpdate is called whenever modification of an existing endpoint slice object is observed.
func (*Proxier) OnEndpointSlicesSynced ¶
func (proxier *Proxier) OnEndpointSlicesSynced()
OnEndpointSlicesSynced is called once all the initial event handlers were called and the state is fully propagated to local cache.
func (*Proxier) OnNodeDelete ¶
OnNodeDelete is called whenever deletion of an existing node object is observed.
func (*Proxier) OnNodeSynced ¶
func (proxier *Proxier) OnNodeSynced()
OnNodeSynced is called once all the initial event handlers were called and the state is fully propagated to local cache.
func (*Proxier) OnNodeUpdate ¶
OnNodeUpdate is called whenever modification of an existing node object is observed.
func (*Proxier) OnServiceAdd ¶
OnServiceAdd is called whenever creation of new service object is observed.
func (*Proxier) OnServiceDelete ¶
OnServiceDelete is called whenever deletion of an existing service object is observed.
func (*Proxier) OnServiceSynced ¶
func (proxier *Proxier) OnServiceSynced()
OnServiceSynced is called once all the initial event handlers were called and the state is fully propagated to local cache.
func (*Proxier) OnServiceUpdate ¶
OnServiceUpdate is called whenever modification of an existing service object is observed.