Documentation ¶
Index ¶
- func CompareStringSlices(slice1, slice2 []string) bool
- func GetUplinkMtu() int
- func NewK8SClient(timeout time.Duration, addToSchemes []func(s *runtime.Scheme) error) (*client.WithWatch, error)
- func NewSecretWatcher(c SecretWatcherClient, k8sclient *kubernetes.Clientset) (*secretWatcher, error)
- type BGPConfigurationWatcher
- type BGPFilterWatcher
- type BGPPrefixesPolicyAndAssignment
- type ImpExpPol
- type LinkWatcher
- type LocalBGPPeer
- type LocalSIDWatcher
- type NetWatcher
- func (w *NetWatcher) CreateNetwork(networkName string, networkVni uint32, netRange string, phyNet string) (netDef *NetworkDefinition, err error)
- func (w *NetWatcher) DeleteNetwork(networkName string) (*NetworkDefinition, error)
- func (w *NetWatcher) GetNodeIPs() (ip4 *net.IP, ip6 *net.IP)
- func (w *NetWatcher) OnNetAdded(net *networkv3.Network) error
- func (w *NetWatcher) OnNetChanged(old, new *networkv3.Network)
- func (w *NetWatcher) OnNetDeleted(netName string) error
- func (w *NetWatcher) SetOurBGPSpec(nodeBGPSpec *common.LocalNodeSpec)
- func (w *NetWatcher) Stop()
- func (w *NetWatcher) WatchNetworks(t *tomb.Tomb) error
- type NetworkDefinition
- type PeerWatcher
- type PrefixWatcher
- type RouteWatcher
- type SecretWatcherClient
- type VRF
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareStringSlices ¶ added in v3.26.0
func GetUplinkMtu ¶
func GetUplinkMtu() int
func NewK8SClient ¶ added in v3.25.1
func NewSecretWatcher ¶
func NewSecretWatcher(c SecretWatcherClient, k8sclient *kubernetes.Clientset) (*secretWatcher, error)
Types ¶
type BGPConfigurationWatcher ¶
type BGPConfigurationWatcher struct { BGPConfigurationWatcherEventChan chan common.CalicoVppEvent BGPConf *calicov3.BGPConfigurationSpec // contains filtered or unexported fields }
func NewBGPConfigurationWatcher ¶
func NewBGPConfigurationWatcher(clientv3 calicov3cli.Interface, log *logrus.Entry) *BGPConfigurationWatcher
func (*BGPConfigurationWatcher) GetBGPConf ¶
func (w *BGPConfigurationWatcher) GetBGPConf() (*calicov3.BGPConfigurationSpec, error)
For now, this doesn't watch the BGP configuration nor produce events
func (*BGPConfigurationWatcher) WatchBGPConfiguration ¶
func (w *BGPConfigurationWatcher) WatchBGPConfiguration(t *tomb.Tomb) error
type BGPFilterWatcher ¶ added in v3.26.0
type BGPFilterWatcher struct {
// contains filtered or unexported fields
}
func NewBGPFilterWatcher ¶ added in v3.26.0
func NewBGPFilterWatcher(clientv3 calicov3cli.Interface, k8sclient *kubernetes.Clientset, log *logrus.Entry) *BGPFilterWatcher
func (*BGPFilterWatcher) AddNewFilter ¶ added in v3.26.0
func (w *BGPFilterWatcher) AddNewFilter(filter calicov3.BGPFilter)
func (*BGPFilterWatcher) RemoveFilter ¶ added in v3.26.0
func (w *BGPFilterWatcher) RemoveFilter(filter calicov3.BGPFilter)
func (*BGPFilterWatcher) UpdateFilter ¶ added in v3.26.0
func (w *BGPFilterWatcher) UpdateFilter(filter calicov3.BGPFilter)
func (*BGPFilterWatcher) WatchBGPFilters ¶ added in v3.26.0
func (w *BGPFilterWatcher) WatchBGPFilters(t *tomb.Tomb) error
This function watches BGPFilters configured in Calico
type BGPPrefixesPolicyAndAssignment ¶ added in v3.26.0
type BGPPrefixesPolicyAndAssignment struct { PolicyAssignment *bgpapi.PolicyAssignment Policy *bgpapi.Policy Prefixes []*bgpapi.DefinedSet }
type ImpExpPol ¶ added in v3.26.0
type ImpExpPol struct { Imp *BGPPrefixesPolicyAndAssignment Exp *BGPPrefixesPolicyAndAssignment }
type LinkWatcher ¶
type LinkWatcher struct { UplinkStatuses map[string]config.UplinkStatus // contains filtered or unexported fields }
func NewLinkWatcher ¶
func NewLinkWatcher(uplinkStatus map[string]config.UplinkStatus, log *log.Entry) *LinkWatcher
func (*LinkWatcher) ResetMTU ¶
func (r *LinkWatcher) ResetMTU(link netlink.Link, mtu int) (err error)
func (*LinkWatcher) WatchLinks ¶
func (r *LinkWatcher) WatchLinks(t *tomb.Tomb) error
type LocalBGPPeer ¶ added in v3.26.0
type LocalSIDWatcher ¶
type LocalSIDWatcher struct {
// contains filtered or unexported fields
}
func NewLocalSIDWatcher ¶
func NewLocalSIDWatcher(vpp *vpplink.VppLink, clientv3 calicov3cli.Interface, log *logrus.Entry) *LocalSIDWatcher
func (*LocalSIDWatcher) AdvertiseSRv6Policy ¶
func (p *LocalSIDWatcher) AdvertiseSRv6Policy(localsid *types.SrLocalsid) (err error)
func (*LocalSIDWatcher) SetOurBGPSpec ¶
func (w *LocalSIDWatcher) SetOurBGPSpec(nodeBGPSpec *common.LocalNodeSpec)
func (*LocalSIDWatcher) WatchLocalSID ¶
func (w *LocalSIDWatcher) WatchLocalSID(t *tomb.Tomb) error
type NetWatcher ¶
type NetWatcher struct { InSync chan interface{} NetWatcher watch.Interface NadWatcher watch.Interface // contains filtered or unexported fields }
func NewNetWatcher ¶
func NewNetWatcher(vpp *vpplink.VppLink, log *logrus.Entry) *NetWatcher
func (*NetWatcher) CreateNetwork ¶ added in v3.26.0
func (w *NetWatcher) CreateNetwork(networkName string, networkVni uint32, netRange string, phyNet string) (netDef *NetworkDefinition, err error)
func (*NetWatcher) DeleteNetwork ¶ added in v3.26.0
func (w *NetWatcher) DeleteNetwork(networkName string) (*NetworkDefinition, error)
func (*NetWatcher) GetNodeIPs ¶ added in v3.26.0
func (w *NetWatcher) GetNodeIPs() (ip4 *net.IP, ip6 *net.IP)
func (*NetWatcher) OnNetAdded ¶
func (w *NetWatcher) OnNetAdded(net *networkv3.Network) error
func (*NetWatcher) OnNetChanged ¶
func (w *NetWatcher) OnNetChanged(old, new *networkv3.Network)
func (*NetWatcher) OnNetDeleted ¶
func (w *NetWatcher) OnNetDeleted(netName string) error
func (*NetWatcher) SetOurBGPSpec ¶ added in v3.26.0
func (w *NetWatcher) SetOurBGPSpec(nodeBGPSpec *common.LocalNodeSpec)
func (*NetWatcher) Stop ¶
func (w *NetWatcher) Stop()
func (*NetWatcher) WatchNetworks ¶
func (w *NetWatcher) WatchNetworks(t *tomb.Tomb) error
type NetworkDefinition ¶
type PeerWatcher ¶
type PeerWatcher struct { BGPConf *calicov3.BGPConfigurationSpec // contains filtered or unexported fields }
func NewPeerWatcher ¶
func NewPeerWatcher(clientv3 calicov3cli.Interface, k8sclient *kubernetes.Clientset, log *logrus.Entry) *PeerWatcher
func (*PeerWatcher) OnSecretUpdate ¶
func (w *PeerWatcher) OnSecretUpdate(old, new *v1.Secret)
This function gets called from SecretWatcher when a secret is added, updated or deleted
func (*PeerWatcher) SetBGPConf ¶
func (w *PeerWatcher) SetBGPConf(bgpConf *calicov3.BGPConfigurationSpec)
func (*PeerWatcher) WatchBGPPeers ¶
func (w *PeerWatcher) WatchBGPPeers(t *tomb.Tomb) error
This function watches BGP peers configured in Calico These peers are configured in GoBGP in addition to the other nodes in the cluster They may also control which nodes to pair with if the peerSelector is set
type PrefixWatcher ¶
type PrefixWatcher struct {
// contains filtered or unexported fields
}
func NewPrefixWatcher ¶
func NewPrefixWatcher(client *calicocli.Client, log *logrus.Entry) *PrefixWatcher
func (*PrefixWatcher) SetOurBGPSpec ¶
func (w *PrefixWatcher) SetOurBGPSpec(nodeBGPSpec *common.LocalNodeSpec)
func (*PrefixWatcher) WatchPrefix ¶
func (w *PrefixWatcher) WatchPrefix(t *tomb.Tomb) error
watchPrefix watches etcd /calico/ipam/v2/host/$NODENAME and add/delete aggregated routes which are assigned to the node. This function also updates policy appropriately.
type RouteWatcher ¶
type RouteWatcher struct {
// contains filtered or unexported fields
}
func NewRouteWatcher ¶
func NewRouteWatcher(log *log.Entry) *RouteWatcher
func (*RouteWatcher) RestoreAllRoutes ¶
func (r *RouteWatcher) RestoreAllRoutes() (err error)
func (*RouteWatcher) WatchRoutes ¶
func (r *RouteWatcher) WatchRoutes(t *tomb.Tomb) error
type SecretWatcherClient ¶
Click to show internal directories.
Click to hide internal directories.