Documentation ¶
Overview ¶
Copyright 2018 Microsoft. All rights reserved. MIT License
Copyright 2018 Microsoft. All rights reserved. MIT License
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheEncoder ¶
CacheEncoder is used only for unit tests to test encoding and decoding Cache.
Types ¶
type NetworkPolicyManager ¶
type NetworkPolicyManager struct { Dataplane dataplane.GenericDataplane // Informers are the Kubernetes Informer // https://pkg.go.dev/k8s.io/client-go/informers models.Informers // Legacy controllers for handling Kubernetes resource watcher events // To be deprecated models.K8SControllersV1 // Controllers for handling Kubernetes resource watcher events models.K8SControllersV2 // Azure-specific variables models.AzureConfig // contains filtered or unexported fields }
NetworkPolicyManager contains informers for pod, namespace and networkpolicy.
func NewNetworkPolicyManager ¶
func NewNetworkPolicyManager(config npmconfig.Config, informerFactory informers.SharedInformerFactory, dp dataplane.GenericDataplane, exec utilexec.Interface, npmVersion string, k8sServerVersion *version.Info) *NetworkPolicyManager
NewNetworkPolicyManager creates a NetworkPolicyManager
func (*NetworkPolicyManager) GetAppVersion ¶
func (npMgr *NetworkPolicyManager) GetAppVersion() string
GetAppVersion returns network policy manager app version
func (*NetworkPolicyManager) MarshalJSON ¶
func (npMgr *NetworkPolicyManager) MarshalJSON() ([]byte, error)
Dear Time Traveler: This is the server end of the debug dragons den. Several of these properties of the npMgr struct have overridden methods which override the MarshalJson, just as this one is doing for npMgr. For example, npMgr.NamespaceCacheV2 does not marshal the whole struct, but rather the NsMap of type map[string]*Namespace. When unmarshaling, expect this type, and pay very close attention. Many hours have been wasted here when unmarshaling mismatched types.
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
|
|
controlplane/translation
Package translation converts NetworkPolicy object to policies.NPMNetworkPolicy object which contains necessary information to program dataplanes.
|
Package translation converts NetworkPolicy object to policies.NPMNetworkPolicy object which contains necessary information to program dataplanes. |
dataplane/mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |