Documentation ¶
Index ¶
- Constants
- type NetworkRoutingController
- func (nrc *NetworkRoutingController) AddPolicies() error
- func (nrc *NetworkRoutingController) Cleanup()
- func (nrc *NetworkRoutingController) OnEndpointsAdd(obj interface{})
- func (nrc *NetworkRoutingController) OnEndpointsUpdate(obj interface{})
- func (nrc *NetworkRoutingController) OnNodeUpdate(_ interface{})
- func (nrc *NetworkRoutingController) OnServiceCreate(obj interface{})
- func (nrc *NetworkRoutingController) OnServiceDelete(oldObj interface{})
- func (nrc *NetworkRoutingController) OnServiceUpdate(objOld interface{}, objNew interface{})
- func (nrc *NetworkRoutingController) Run(healthChan chan<- *healthcheck.ControllerHeartbeat, stopCh <-chan struct{}, ...)
Constants ¶
const ( IfaceNotFound = "Link not found" LoadBalancerST = "LoadBalancer" ClusterIPST = "ClusterIP" NodePortST = "NodePort" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetworkRoutingController ¶
type NetworkRoutingController struct { MetricsEnabled bool CNIFirewallSetup *sync.Cond NodeEventHandler cache.ResourceEventHandler ServiceEventHandler cache.ResourceEventHandler EndpointsEventHandler cache.ResourceEventHandler // contains filtered or unexported fields }
NetworkRoutingController is struct to hold necessary information required by controller
func NewNetworkRoutingController ¶
func NewNetworkRoutingController(clientset kubernetes.Interface, kubeRouterConfig *options.KubeRouterConfig, nodeInformer cache.SharedIndexInformer, svcInformer cache.SharedIndexInformer, epInformer cache.SharedIndexInformer, ipsetMutex *sync.Mutex) (*NetworkRoutingController, error)
NewNetworkRoutingController returns new NetworkRoutingController object
func (*NetworkRoutingController) AddPolicies ¶
func (nrc *NetworkRoutingController) AddPolicies() error
AddPolicies adds BGP import and export policies
func (*NetworkRoutingController) Cleanup ¶
func (nrc *NetworkRoutingController) Cleanup()
Cleanup performs the cleanup of configurations done
func (*NetworkRoutingController) OnEndpointsAdd ¶
func (nrc *NetworkRoutingController) OnEndpointsAdd(obj interface{})
OnEndpointsAdd handles endpoint add events from apiserver This method calls OnEndpointsUpdate with the addition of updating BGP export policies Calling AddPolicies here covers the edge case where AddPolicies fails in OnServiceUpdate because the corresponding Endpoint resource for the Service was not created yet.
func (*NetworkRoutingController) OnEndpointsUpdate ¶
func (nrc *NetworkRoutingController) OnEndpointsUpdate(obj interface{})
OnEndpointsUpdate handles the endpoint updates from the kubernetes API server
func (*NetworkRoutingController) OnNodeUpdate ¶
func (nrc *NetworkRoutingController) OnNodeUpdate(_ interface{})
OnNodeUpdate Handle updates from Node watcher. Node watcher calls this method whenever there is new node is added or old node is deleted. So peer up with new node and drop peering from old node
func (*NetworkRoutingController) OnServiceCreate ¶
func (nrc *NetworkRoutingController) OnServiceCreate(obj interface{})
OnServiceCreate handles new service create event from the kubernetes API server
func (*NetworkRoutingController) OnServiceDelete ¶
func (nrc *NetworkRoutingController) OnServiceDelete(oldObj interface{})
OnServiceDelete handles the service delete updates from the kubernetes API server
func (*NetworkRoutingController) OnServiceUpdate ¶
func (nrc *NetworkRoutingController) OnServiceUpdate(objOld interface{}, objNew interface{})
OnServiceUpdate handles the service relates updates from the kubernetes API server
func (*NetworkRoutingController) Run ¶
func (nrc *NetworkRoutingController) Run(healthChan chan<- *healthcheck.ControllerHeartbeat, stopCh <-chan struct{}, wg *sync.WaitGroup)
Run runs forever until we are notified on stop channel