Documentation
¶
Index ¶
- Constants
- func InstallFelixPlugin() (err error)
- type HostEndpoint
- func (h *HostEndpoint) Create(vpp *vpplink.VppLink, state *PolicyState) (err error)
- func (h *HostEndpoint) Delete(vpp *vpplink.VppLink, state *PolicyState) (err error)
- func (he *HostEndpoint) String() string
- func (h *HostEndpoint) Update(vpp *vpplink.VppLink, new *HostEndpoint, state *PolicyState) (err error)
- type HostEndpointID
- type IPSet
- func (i *IPSet) AddMembers(members []string, apply bool, vpp *vpplink.VppLink) (err error)
- func (i *IPSet) Create(vpp *vpplink.VppLink) (err error)
- func (i *IPSet) Delete(vpp *vpplink.VppLink) (err error)
- func (i *IPSet) RemoveMembers(members []string, apply bool, vpp *vpplink.VppLink) (err error)
- func (i *IPSet) String() string
- type NodeWatcherRestartError
- type Policy
- func (p *Policy) Create(vpp *vpplink.VppLink, state *PolicyState) (err error)
- func (p *Policy) DeepCopy() *Policy
- func (p *Policy) Delete(vpp *vpplink.VppLink, state *PolicyState) (err error)
- func (p *Policy) String() string
- func (p *Policy) Update(vpp *vpplink.VppLink, new *Policy, state *PolicyState) (err error)
- type PolicyID
- type PolicyState
- type Rule
- type Server
- func (s *Server) GetPrefixIPPool(prefix *net.IPNet) *proto.IPAMPool
- func (s *Server) IPNetNeedsSNAT(prefix *net.IPNet) bool
- func (s *Server) IpamPoolCopy(update *proto.IPAMPoolUpdate) *proto.IPAMPool
- func (s *Server) MessageReader(conn net.Conn) <-chan interface{}
- func (s *Server) RecvMessage(conn net.Conn) (msg interface{}, err error)
- func (s *Server) SendMessage(conn net.Conn, msg interface{}) (err error)
- func (s *Server) ServePolicy(t *tomb.Tomb) error
- func (s *Server) WorkloadRemoved(id *WorkloadEndpointID, containerIPs []*net.IPNet)
- type SyncState
- type Tier
- type WorkloadEndpoint
- func (w *WorkloadEndpoint) Create(vpp *vpplink.VppLink, swIfIndexes []uint32, state *PolicyState, network string) (err error)
- func (w *WorkloadEndpoint) Delete(vpp *vpplink.VppLink) (err error)
- func (we *WorkloadEndpoint) String() string
- func (w *WorkloadEndpoint) Update(vpp *vpplink.VppLink, new *WorkloadEndpoint, state *PolicyState, ...) (err error)
- type WorkloadEndpointID
Constants ¶
View Source
const ( FelixPluginSrcPath = "/bin/felix-api-proxy" FelixPluginDstPath = "/var/lib/calico/felix-plugins/felix-api-proxy" )
Variables ¶
This section is empty.
Functions ¶
func InstallFelixPlugin ¶
func InstallFelixPlugin() (err error)
Types ¶
type HostEndpoint ¶
type HostEndpoint struct { UplinkSwIfIndexes []uint32 TapSwIfIndexes []uint32 TunnelSwIfIndexes []uint32 Profiles []string Tiers []Tier ForwardTiers []Tier InterfaceName string // contains filtered or unexported fields }
func (*HostEndpoint) Create ¶
func (h *HostEndpoint) Create(vpp *vpplink.VppLink, state *PolicyState) (err error)
func (*HostEndpoint) Delete ¶
func (h *HostEndpoint) Delete(vpp *vpplink.VppLink, state *PolicyState) (err error)
func (*HostEndpoint) String ¶
func (he *HostEndpoint) String() string
func (*HostEndpoint) Update ¶
func (h *HostEndpoint) Update(vpp *vpplink.VppLink, new *HostEndpoint, state *PolicyState) (err error)
type HostEndpointID ¶
type HostEndpointID struct {
EndpointID string
}
func (HostEndpointID) String ¶
func (eid HostEndpointID) String() string
type IPSet ¶
type IPSet struct { VppID uint32 Type types.IpsetType IPPorts map[string]types.IPPort Addresses map[string]net.IP Networks map[string]*net.IPNet }
func (*IPSet) AddMembers ¶
func (*IPSet) RemoveMembers ¶
type NodeWatcherRestartError ¶ added in v3.25.1
type NodeWatcherRestartError struct{}
func (NodeWatcherRestartError) Error ¶ added in v3.25.1
func (e NodeWatcherRestartError) Error() string
type Policy ¶
Policy represents both Policies and Profiles in the calico API
func (*Policy) Create ¶
func (p *Policy) Create(vpp *vpplink.VppLink, state *PolicyState) (err error)
type PolicyState ¶
type PolicyState struct { IPSets map[string]*IPSet Policies map[PolicyID]*Policy Profiles map[string]*Policy WorkloadEndpoints map[WorkloadEndpointID]*WorkloadEndpoint HostEndpoints map[HostEndpointID]*HostEndpoint }
func NewPolicyState ¶
func NewPolicyState() *PolicyState
type Rule ¶
type Rule struct { *types.Rule RuleID string VppID uint32 DstIPPortIPSetNames []string DstNotIPPortIPSetNames []string SrcIPPortIPSetNames []string SrcNotIPPortIPSetNames []string DstIPSetNames []string DstNotIPSetNames []string SrcIPSetNames []string SrcNotIPSetNames []string DstIPPortSetNames []string Annotations map[string]string }
type Server ¶
type Server struct { /* always allow traffic coming from host to the pods (for healthchecks and so on) */ // AllowFromHostPolicy persists the policy allowing host --> pod communications. // See CreateAllowFromHostPolicy definition AllowFromHostPolicy *Policy FelixConfigChan chan interface{} GotOurNodeBGPchan chan interface{} // contains filtered or unexported fields }
Server holds all the data required to configure the policies defined by felix in VPP
func NewPolicyServer ¶
NewServer creates a policy server
func (*Server) GetPrefixIPPool ¶ added in v3.25.1
match checks whether we have an IP pool which contains the given prefix. If we have, it returns the pool.
func (*Server) IPNetNeedsSNAT ¶ added in v3.25.1
func (*Server) IpamPoolCopy ¶ added in v3.25.1
func (s *Server) IpamPoolCopy(update *proto.IPAMPoolUpdate) *proto.IPAMPool
func (*Server) MessageReader ¶
func (*Server) RecvMessage ¶
func (*Server) SendMessage ¶
func (*Server) ServePolicy ¶
Serve runs the policy server
func (*Server) WorkloadRemoved ¶
func (s *Server) WorkloadRemoved(id *WorkloadEndpointID, containerIPs []*net.IPNet)
WorkloadRemoved is called by the CNI server when the interface of a pod is deleted
type WorkloadEndpoint ¶
type WorkloadEndpoint struct { SwIfIndex []uint32 Profiles []string Tiers []Tier // contains filtered or unexported fields }
func (*WorkloadEndpoint) Create ¶
func (w *WorkloadEndpoint) Create(vpp *vpplink.VppLink, swIfIndexes []uint32, state *PolicyState, network string) (err error)
func (*WorkloadEndpoint) Delete ¶
func (w *WorkloadEndpoint) Delete(vpp *vpplink.VppLink) (err error)
func (*WorkloadEndpoint) String ¶
func (we *WorkloadEndpoint) String() string
func (*WorkloadEndpoint) Update ¶
func (w *WorkloadEndpoint) Update(vpp *vpplink.VppLink, new *WorkloadEndpoint, state *PolicyState, network string) (err error)
type WorkloadEndpointID ¶
type WorkloadEndpointID struct { OrchestratorID string WorkloadID string EndpointID string Network string }
func (*WorkloadEndpointID) String ¶
func (wi *WorkloadEndpointID) String() string
Click to show internal directories.
Click to hide internal directories.