Documentation ¶
Index ¶
- Constants
- func RegisterAndRunArpManager(dev string) error
- func RegisterBgpManager(bgpType string) error
- func RegisterIPSetMgr() error
- func RegisterIptablesMgr() error
- func RegisterManagers(gwIP net.IP, gwDev, bgpType, eipCidr string, arpPoisoning bool, ...) error
- func RegisterRouteMgr(gwIP net.IP, gwDev string, eipCidr string, internalAddrs []string) error
- type ArpManager
- type BgpManager
- type CmdIpsetMgr
- func (ipset *CmdIpsetMgr) AddIPToSet(name string, ip net.IP) error
- func (ipset *CmdIpsetMgr) AddSetAndEntries(name, setType string, entries ...string) error
- func (ipset *CmdIpsetMgr) DeleteFromSet(name string, ip net.IP) error
- func (ipset *CmdIpsetMgr) SetupIpset(name, setType string, entries ...string) error
- type EipManager
- type EipMetadata
- type EipMgr
- type GobgpMgr
- type IpsetManager
- type IptablesMgr
- func (iptables *IptablesMgr) AddPostroutingRule(eip, vmiIp net.IP, internalSet string) error
- func (iptables *IptablesMgr) AddPreroutingRule(eip, vmiIp net.IP) error
- func (iptables *IptablesMgr) DeletePostroutingRule(eip, vmiIp net.IP, internalSet string) error
- func (iptables *IptablesMgr) DeletePreroutingRule(eip, vmiIp net.IP) error
- func (iptables *IptablesMgr) SetupChains(eipset, vmiSet string) error
- type NatManager
- type NoBgpMgr
- type PolicyRouteMgr
- type RouteManager
Constants ¶
View Source
const ( BGP_TYPE_GOBGP string = "gobgp" BGP_TYPE_NONE string = "none" )
View Source
const ( SET_INTERNAL string = "k8s_internal_net" SET_EIP string = "kube-eip-eip" SET_VMI string = "kube-eip-vmi" )
View Source
const ( MDDir string = "/var/run/eip_agent" MD_STATUS_FINISHED string = "Finished" MD_STATUS_FAILED string = "Failed" )
View Source
const ( CHAIN_PREROUTING string = "KUBE-EIP-PREROUTING" CHAIN_POSTROUTING string = "KUBE-EIP-POSTROUTING" )
View Source
const ( RouteTableIdx int = 1001 RouteTableName string = "eip_route" RouteTableFile string = "/etc/iproute2/rt_tables" CNIDevName string = "cni0" )
Variables ¶
This section is empty.
Functions ¶
func RegisterBgpManager ¶
func RegisterIPSetMgr ¶
func RegisterIPSetMgr() error
func RegisterIptablesMgr ¶
func RegisterIptablesMgr() error
func RegisterManagers ¶
Types ¶
type ArpManager ¶
var ArpMgr ArpManager
type BgpManager ¶
type BgpManager interface { }
BgpManager use to sync ipv4 route to eip router There are two type of bgp manager, gobgp or nobgp Add a eip arp proxy or add eip to gateway device directly.
var BgpMgr BgpManager
type CmdIpsetMgr ¶
type CmdIpsetMgr struct {
// contains filtered or unexported fields
}
func (*CmdIpsetMgr) AddIPToSet ¶
func (ipset *CmdIpsetMgr) AddIPToSet(name string, ip net.IP) error
func (*CmdIpsetMgr) AddSetAndEntries ¶
func (ipset *CmdIpsetMgr) AddSetAndEntries(name, setType string, entries ...string) error
func (*CmdIpsetMgr) DeleteFromSet ¶
func (ipset *CmdIpsetMgr) DeleteFromSet(name string, ip net.IP) error
func (*CmdIpsetMgr) SetupIpset ¶
func (ipset *CmdIpsetMgr) SetupIpset(name, setType string, entries ...string) error
type EipMetadata ¶
type EipMgr ¶
type EipMgr struct { IPSetMgr IpsetManager NatMgr NatManager RouteMgr RouteManager BgpMgr BgpManager ArpMgr ArpManager ExternalIP net.IP InternalIP net.IP }
type IpsetManager ¶
type IpsetManager interface { AddSetAndEntries(string, string, ...string) error SetupIpset(string, string, ...string) error AddIPToSet(string, net.IP) error DeleteFromSet(string, net.IP) error }
var IpsetMgr IpsetManager
type IptablesMgr ¶
type IptablesMgr struct {
// contains filtered or unexported fields
}
func (*IptablesMgr) AddPostroutingRule ¶
func (iptables *IptablesMgr) AddPostroutingRule(eip, vmiIp net.IP, internalSet string) error
func (*IptablesMgr) AddPreroutingRule ¶
func (iptables *IptablesMgr) AddPreroutingRule(eip, vmiIp net.IP) error
func (*IptablesMgr) DeletePostroutingRule ¶
func (iptables *IptablesMgr) DeletePostroutingRule(eip, vmiIp net.IP, internalSet string) error
func (*IptablesMgr) DeletePreroutingRule ¶
func (iptables *IptablesMgr) DeletePreroutingRule(eip, vmiIp net.IP) error
func (*IptablesMgr) SetupChains ¶
func (iptables *IptablesMgr) SetupChains(eipset, vmiSet string) error
type NatManager ¶
type NatManager interface { SetupChains(string, string) error AddPreroutingRule(net.IP, net.IP) error AddPostroutingRule(net.IP, net.IP, string) error DeletePreroutingRule(net.IP, net.IP) error DeletePostroutingRule(net.IP, net.IP, string) error }
var IptablesNatMgr NatManager
type PolicyRouteMgr ¶
type PolicyRouteMgr struct { InternalAddrs []string ExternalGWIP net.IP ExternalGWDev string // contains filtered or unexported fields }
func (*PolicyRouteMgr) AddEipRule ¶
func (mgr *PolicyRouteMgr) AddEipRule(vmiIp net.IP) error
func (*PolicyRouteMgr) AddEipToIface ¶
func (mgr *PolicyRouteMgr) AddEipToIface(eip net.IP) error
func (*PolicyRouteMgr) DeleteEipRule ¶
func (mgr *PolicyRouteMgr) DeleteEipRule(vmiIp net.IP) error
func (*PolicyRouteMgr) RemoveEipFromIface ¶
func (mgr *PolicyRouteMgr) RemoveEipFromIface(eip net.IP) error
func (*PolicyRouteMgr) SetupRoute ¶
func (mgr *PolicyRouteMgr) SetupRoute() error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.