Documentation ¶
Index ¶
- Constants
- func NewIPTablesHandlers(config *options.KubeRouterConfig) (map[v1core.IPFamily]utils.IPTablesHandler, ...)
- type NetworkPolicyController
- func (npc *NetworkPolicyController) Cleanup()
- func (npc *NetworkPolicyController) ListNamespaceByLabels(namespaceSelector labels.Selector) ([]*api.Namespace, error)
- func (npc *NetworkPolicyController) ListPodsByNamespaceAndLabels(namespace string, podSelector labels.Selector) (ret []*api.Pod, err error)
- func (npc *NetworkPolicyController) OnNetworkPolicyUpdate(obj interface{})
- func (npc *NetworkPolicyController) OnPodUpdate(obj interface{})
- func (npc *NetworkPolicyController) RequestFullSync()
- func (npc *NetworkPolicyController) Run(healthChan chan<- *healthcheck.ControllerHeartbeat, stopCh <-chan struct{}, ...)
Constants ¶
View Source
const (
PodCompleted api.PodPhase = "Completed"
)
Variables ¶
This section is empty.
Functions ¶
func NewIPTablesHandlers ¶
func NewIPTablesHandlers(config *options.KubeRouterConfig) ( map[v1core.IPFamily]utils.IPTablesHandler, map[v1core.IPFamily]utils.IPSetHandler, error)
Types ¶
type NetworkPolicyController ¶
type NetworkPolicyController struct { MetricsEnabled bool PodEventHandler cache.ResourceEventHandler NamespaceEventHandler cache.ResourceEventHandler NetworkPolicyEventHandler cache.ResourceEventHandler // contains filtered or unexported fields }
NetworkPolicyController struct to hold information required by NetworkPolicyController
func NewNetworkPolicyController ¶
func NewNetworkPolicyController(clientset kubernetes.Interface, config *options.KubeRouterConfig, podInformer cache.SharedIndexInformer, npInformer cache.SharedIndexInformer, nsInformer cache.SharedIndexInformer, ipsetMutex *sync.Mutex, linkQ utils.LocalLinkQuerier, iptablesCmdHandlers map[v1core.IPFamily]utils.IPTablesHandler, ipSetHandlers map[v1core.IPFamily]utils.IPSetHandler) (*NetworkPolicyController, error)
NewNetworkPolicyController returns new NetworkPolicyController object
func (*NetworkPolicyController) Cleanup ¶
func (npc *NetworkPolicyController) Cleanup()
Cleanup cleanup configurations done
func (*NetworkPolicyController) ListNamespaceByLabels ¶
func (*NetworkPolicyController) ListPodsByNamespaceAndLabels ¶
func (*NetworkPolicyController) OnNetworkPolicyUpdate ¶
func (npc *NetworkPolicyController) OnNetworkPolicyUpdate(obj interface{})
OnNetworkPolicyUpdate handles updates to network policy from the kubernetes api server
func (*NetworkPolicyController) OnPodUpdate ¶
func (npc *NetworkPolicyController) OnPodUpdate(obj interface{})
OnPodUpdate handles updates to pods from the Kubernetes api server
func (*NetworkPolicyController) RequestFullSync ¶
func (npc *NetworkPolicyController) RequestFullSync()
RequestFullSync allows the request of a full network policy sync without blocking the callee
func (*NetworkPolicyController) Run ¶
func (npc *NetworkPolicyController) Run(healthChan chan<- *healthcheck.ControllerHeartbeat, stopCh <-chan struct{}, wg *sync.WaitGroup)
Run runs forever till we receive notification on stopCh
Click to show internal directories.
Click to hide internal directories.