Documentation ¶
Overview ¶
Copyright 2018 Microsoft. All rights reserved. MIT License
Copyright 2018 Microsoft. All rights reserved. MIT License
Package npm 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 ¶
- func FlattenNameSpaceSelector(nsSelector *metav1.LabelSelector) []metav1.LabelSelector
- func GetAIMetadata() string
- func GetOperatorAndLabel(label string) (string, string)
- func GetOperatorsAndLabels(labelsWithOps []string) ([]string, []string)
- func HashSelector(selector *metav1.LabelSelector) string
- func NewNameSpaceController(nameSpaceInformer coreinformer.NamespaceInformer, ...) *nameSpaceController
- func NewNetworkPolicyController(npInformer networkinginformers.NetworkPolicyInformer, ...) *networkPolicyController
- func NewPodController(podInformer coreinformer.PodInformer, clientset kubernetes.Interface, ...) *podController
- func ParseLabel(label string) (string, bool)
- type IsSafeCleanUpAzureNpmChain
- type LabelAppendOperation
- type NamedPortOperation
- type Namespace
- type NetworkPolicyManager
- func (npMgr *NetworkPolicyManager) Encode(writer io.Writer) error
- func (npMgr *NetworkPolicyManager) GetAppVersion() string
- func (npMgr *NetworkPolicyManager) GetClusterState() telemetry.ClusterState
- func (npMgr *NetworkPolicyManager) SendClusterMetrics()
- func (npMgr *NetworkPolicyManager) Start(config npmconfig.Config, stopCh <-chan struct{}) error
- type NetworkPolicyManagerEncoder
- type NpmPod
- type ReqHeap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FlattenNameSpaceSelector ¶ added in v1.4.5
func FlattenNameSpaceSelector(nsSelector *metav1.LabelSelector) []metav1.LabelSelector
flattenNameSpaceSelector will help flatten multiple NameSpace selector match Expressions values into multiple label selectors helping with the OR condition.
func GetOperatorAndLabel ¶ added in v1.0.27
GetOperatorAndLabel returns the operator associated with the label and the label without operator.
func GetOperatorsAndLabels ¶ added in v1.0.27
GetOperatorsAndLabels returns the operators along with the associated labels.
func HashSelector ¶ added in v1.0.27
func HashSelector(selector *metav1.LabelSelector) string
HashSelector returns the hash value of the selector.
func NewNameSpaceController ¶ added in v1.2.9
func NewNameSpaceController(nameSpaceInformer coreinformer.NamespaceInformer, clientset kubernetes.Interface, ipsMgr *ipsm.IpsetManager, npmNamespaceCache *npmNamespaceCache) *nameSpaceController
func NewNetworkPolicyController ¶ added in v1.2.9
func NewNetworkPolicyController(npInformer networkinginformers.NetworkPolicyInformer, clientset kubernetes.Interface, ipsMgr *ipsm.IpsetManager) *networkPolicyController
func NewPodController ¶ added in v1.2.9
func NewPodController(podInformer coreinformer.PodInformer, clientset kubernetes.Interface, ipsMgr *ipsm.IpsetManager, npmNamespaceCache *npmNamespaceCache) *podController
func ParseLabel ¶ added in v1.0.27
ParseLabel takes a Azure-NPM processed label then returns if it's referring to complement set, and if so, returns the original set as well.
Types ¶
type IsSafeCleanUpAzureNpmChain ¶ added in v1.2.9
type IsSafeCleanUpAzureNpmChain bool
IsSafeCleanUpAzureNpmChain is used to indicate whether default Azure NPM chain can be safely deleted or not.
type LabelAppendOperation ¶ added in v1.3.0
type LabelAppendOperation bool
const ( ClearExistingLabels LabelAppendOperation = true AppendToExistingLabels LabelAppendOperation = false )
type NamedPortOperation ¶ added in v1.2.9
type NamedPortOperation string
NamedPortOperation decides opeartion (e.g., delete or add) for named port ipset in manageNamedPortIpsets
type NetworkPolicyManager ¶
type NetworkPolicyManager struct { NodeName string TelemetryEnabled bool // contains filtered or unexported fields }
NetworkPolicyManager contains informers for pod, namespace and networkpolicy.
func NewNetworkPolicyManager ¶
func NewNetworkPolicyManager(clientset kubernetes.Interface, informerFactory informers.SharedInformerFactory, exec utilexec.Interface, npmVersion string, k8sServerVersion *version.Info) *NetworkPolicyManager
NewNetworkPolicyManager creates a NetworkPolicyManager
func (*NetworkPolicyManager) Encode ¶ added in v1.4.11
func (npMgr *NetworkPolicyManager) Encode(writer io.Writer) error
Encode returns all information of pod, namespace, ipsm map information. TODO(jungukcho): While this approach is beneficial to hold separate lock instead of global lock, it has strict ordering limitation between encoding and decoding. Will find flexible way by maintaining performance benefit.
func (*NetworkPolicyManager) GetAppVersion ¶
func (npMgr *NetworkPolicyManager) GetAppVersion() string
GetAppVersion returns network policy manager app version
func (*NetworkPolicyManager) GetClusterState ¶ added in v1.0.9
func (npMgr *NetworkPolicyManager) GetClusterState() telemetry.ClusterState
GetClusterState returns current cluster state.
func (*NetworkPolicyManager) SendClusterMetrics ¶ added in v1.1.8
func (npMgr *NetworkPolicyManager) SendClusterMetrics()
SendClusterMetrics :- send NPM cluster metrics using AppInsights TODO(jungukcho): need to move codes into metrics packages
type NetworkPolicyManagerEncoder ¶ added in v1.4.11
type ReqHeap ¶ added in v1.0.27
type ReqHeap []metav1.LabelSelectorRequirement
An ReqHeap is a min-heap of labelSelectorRequirements.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
http
|
|
Package ipsm focus on ip set operation Copyright 2018 Microsoft.
|
Package ipsm focus on ip set operation Copyright 2018 Microsoft. |
pkg
|
|