Documentation ¶
Overview ¶
Copyright 2018 Microsoft. All rights reserved. MIT License
Copyright 2018 Microsoft. All rights reserved. MIT License
Copyright 2018 Microsoft. All rights reserved. MIT License
Copyright 2018 Microsoft. All rights reserved. MIT License
Copyright 2018 Microsoft. All rights reserved. MIT License
Index ¶
- type NetworkPolicyManager
- func (npMgr *NetworkPolicyManager) AddNamespace(nsObj *corev1.Namespace) error
- func (npMgr *NetworkPolicyManager) AddNetworkPolicy(npObj *networkingv1.NetworkPolicy) error
- func (npMgr *NetworkPolicyManager) AddPod(podObj *corev1.Pod) error
- func (npMgr *NetworkPolicyManager) DeleteNamespace(nsObj *corev1.Namespace) error
- func (npMgr *NetworkPolicyManager) DeleteNetworkPolicy(npObj *networkingv1.NetworkPolicy) error
- func (npMgr *NetworkPolicyManager) DeletePod(podObj *corev1.Pod) error
- func (npMgr *NetworkPolicyManager) GetClusterState() telemetry.ClusterState
- func (npMgr *NetworkPolicyManager) InitAllNsList() error
- func (npMgr *NetworkPolicyManager) Run(stopCh <-chan struct{}) error
- func (npMgr *NetworkPolicyManager) RunReportManager()
- func (npMgr *NetworkPolicyManager) UninitAllNsList() error
- func (npMgr *NetworkPolicyManager) UpdateAndSendReport(err error, eventMsg string) error
- func (npMgr *NetworkPolicyManager) UpdateNamespace(oldNsObj *corev1.Namespace, newNsObj *corev1.Namespace) error
- func (npMgr *NetworkPolicyManager) UpdateNetworkPolicy(oldNpObj *networkingv1.NetworkPolicy, newNpObj *networkingv1.NetworkPolicy) error
- func (npMgr *NetworkPolicyManager) UpdatePod(oldPodObj, newPodObj *corev1.Pod) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetworkPolicyManager ¶
NetworkPolicyManager contains informers for pod, namespace and networkpolicy.
func NewNetworkPolicyManager ¶
func NewNetworkPolicyManager(clientset *kubernetes.Clientset, informerFactory informers.SharedInformerFactory, npmVersion string) *NetworkPolicyManager
NewNetworkPolicyManager creates a NetworkPolicyManager
func (*NetworkPolicyManager) AddNamespace ¶ added in v1.0.9
func (npMgr *NetworkPolicyManager) AddNamespace(nsObj *corev1.Namespace) error
AddNamespace handles adding namespace to ipset.
func (*NetworkPolicyManager) AddNetworkPolicy ¶ added in v1.0.9
func (npMgr *NetworkPolicyManager) AddNetworkPolicy(npObj *networkingv1.NetworkPolicy) error
AddNetworkPolicy handles adding network policy to iptables.
func (*NetworkPolicyManager) AddPod ¶ added in v1.0.9
func (npMgr *NetworkPolicyManager) AddPod(podObj *corev1.Pod) error
AddPod handles adding pod ip to its label's ipset.
func (*NetworkPolicyManager) DeleteNamespace ¶ added in v1.0.9
func (npMgr *NetworkPolicyManager) DeleteNamespace(nsObj *corev1.Namespace) error
DeleteNamespace handles deleting namespace from ipset.
func (*NetworkPolicyManager) DeleteNetworkPolicy ¶ added in v1.0.9
func (npMgr *NetworkPolicyManager) DeleteNetworkPolicy(npObj *networkingv1.NetworkPolicy) error
DeleteNetworkPolicy handles deleting network policy from iptables.
func (*NetworkPolicyManager) DeletePod ¶ added in v1.0.9
func (npMgr *NetworkPolicyManager) DeletePod(podObj *corev1.Pod) error
DeletePod handles deleting pod from its label's ipset.
func (*NetworkPolicyManager) GetClusterState ¶ added in v1.0.9
func (npMgr *NetworkPolicyManager) GetClusterState() telemetry.ClusterState
GetClusterState returns current cluster state.
func (*NetworkPolicyManager) InitAllNsList ¶ added in v1.0.9
func (npMgr *NetworkPolicyManager) InitAllNsList() error
InitAllNsList syncs all-namespace ipset list.
func (*NetworkPolicyManager) Run ¶ added in v1.0.9
func (npMgr *NetworkPolicyManager) Run(stopCh <-chan struct{}) error
Run starts shared informers and waits for the shared informer cache to sync.
func (*NetworkPolicyManager) RunReportManager ¶ added in v1.0.9
func (npMgr *NetworkPolicyManager) RunReportManager()
RunReportManager starts NPMReportManager and send telemetry periodically.
func (*NetworkPolicyManager) UninitAllNsList ¶ added in v1.0.9
func (npMgr *NetworkPolicyManager) UninitAllNsList() error
UninitAllNsList cleans all-namespace ipset list.
func (*NetworkPolicyManager) UpdateAndSendReport ¶ added in v1.0.9
func (npMgr *NetworkPolicyManager) UpdateAndSendReport(err error, eventMsg string) error
UpdateAndSendReport updates the npm report then send it. This function should only be called when npMgr is locked.
func (*NetworkPolicyManager) UpdateNamespace ¶ added in v1.0.9
func (npMgr *NetworkPolicyManager) UpdateNamespace(oldNsObj *corev1.Namespace, newNsObj *corev1.Namespace) error
UpdateNamespace handles updating namespace in ipset.
func (*NetworkPolicyManager) UpdateNetworkPolicy ¶ added in v1.0.9
func (npMgr *NetworkPolicyManager) UpdateNetworkPolicy(oldNpObj *networkingv1.NetworkPolicy, newNpObj *networkingv1.NetworkPolicy) error
UpdateNetworkPolicy handles updateing network policy in iptables.