Documentation ¶
Index ¶
- 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) OnNamespaceUpdate(obj interface{})
- func (npc *NetworkPolicyController) OnNetworkPolicyUpdate(obj interface{})
- func (npc *NetworkPolicyController) OnPodUpdate(obj interface{})
- func (npc *NetworkPolicyController) Run(healthChan chan<- *healthcheck.ControllerHeartbeat, stopCh <-chan struct{}, ...)
- func (npc *NetworkPolicyController) Sync() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetworkPolicyController ¶
type NetworkPolicyController struct { MetricsEnabled bool PodEventHandler cache.ResourceEventHandler NamespaceEventHandler cache.ResourceEventHandler NetworkPolicyEventHandler cache.ResourceEventHandler // contains filtered or unexported fields }
NetworkPolicyController strcut 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) (*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) OnNamespaceUpdate ¶
func (npc *NetworkPolicyController) OnNamespaceUpdate(obj interface{})
OnNamespaceUpdate handles updates to namespace from kubernetes api server
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) Run ¶
func (npc *NetworkPolicyController) Run(healthChan chan<- *healthcheck.ControllerHeartbeat, stopCh <-chan struct{}, wg *sync.WaitGroup)
Run runs forver till we receive notification on stopCh
func (*NetworkPolicyController) Sync ¶
func (npc *NetworkPolicyController) Sync() error
Sync synchronizes iptables to desired state of network policies
Click to show internal directories.
Click to hide internal directories.