controllers

package
v1.16.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 31 Imported by: 0

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

Copyright 2018 Microsoft. All rights reserved. MIT License

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlattenNameSpaceSelector

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

func GetOperatorAndLabel(label string) (string, string)

GetOperatorAndLabel returns the operator associated with the label and the label without operator.

func GetOperatorsAndLabels

func GetOperatorsAndLabels(labelsWithOps []string) ([]string, []string)

GetOperatorsAndLabels returns the operators along with the associated labels.

func HashSelector

func HashSelector(selector *metav1.LabelSelector) string

HashSelector returns the hash value of the selector.

func ParseLabel

func ParseLabel(label string) (string, bool)

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

type IsSafeCleanUpAzureNpmChain bool

IsSafeCleanUpAzureNpmChain is used to indicate whether default Azure NPM chain can be safely deleted or not.

type NamedPortOperation

type NamedPortOperation string

NamedPortOperation decides opeartion (e.g., delete or add) for named port ipset in manageNamedPortIpsets

type NamespaceController

type NamespaceController struct {
	// contains filtered or unexported fields
}

func NewNameSpaceController

func NewNameSpaceController(nameSpaceInformer coreinformer.NamespaceInformer, ipsMgr *ipsm.IpsetManager, npmNamespaceCache *NpmNamespaceCache) *NamespaceController

func (*NamespaceController) Run

func (nsc *NamespaceController) Run(stopCh <-chan struct{})

type NetworkPolicyController

type NetworkPolicyController struct {
	// contains filtered or unexported fields
}

func NewNetworkPolicyController

func NewNetworkPolicyController(npInformer networkinginformers.NetworkPolicyInformer, ipsMgr *ipsm.IpsetManager, placeAzureChainFirst bool) *NetworkPolicyController

func (*NetworkPolicyController) BootupDataplane

func (c *NetworkPolicyController) BootupDataplane() error

BootupDataplane does all initialization tasks for data plane TODO(jungukcho) Need to refactor UninitNpmChains since it assumes it has already AZURE-NPM chains

func (*NetworkPolicyController) LengthOfRawNpMap

func (c *NetworkPolicyController) LengthOfRawNpMap() int

func (*NetworkPolicyController) Run

func (c *NetworkPolicyController) Run(stopCh <-chan struct{})

func (*NetworkPolicyController) RunPeriodicTasks

func (c *NetworkPolicyController) RunPeriodicTasks(stopCh <-chan struct{})

type NpmNamespaceCache

type NpmNamespaceCache struct {
	sync.RWMutex
	NsMap map[string]*common.Namespace // Key is ns-<nsname>
}

NpmNamespaceCache to store namespace struct in nameSpaceController.go. Since this cache is shared between podController and NameSpaceController, it has mutex for avoiding racing condition between them.

func (*NpmNamespaceCache) GetNsMap

func (n *NpmNamespaceCache) GetNsMap() map[string]*common.Namespace

func (*NpmNamespaceCache) MarshalJSON

func (n *NpmNamespaceCache) MarshalJSON() ([]byte, error)

type PodController

type PodController struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewPodController

func NewPodController(podInformer coreinformer.PodInformer, ipsMgr *ipsm.IpsetManager, npmNamespaceCache *NpmNamespaceCache) *PodController

func (*PodController) LengthOfPodMap

func (c *PodController) LengthOfPodMap() int

func (*PodController) MarshalJSON

func (c *PodController) MarshalJSON() ([]byte, error)

func (*PodController) Run

func (c *PodController) Run(stopCh <-chan struct{})

type ReqHeap

An ReqHeap is a min-heap of labelSelectorRequirements.

func (ReqHeap) Len

func (h ReqHeap) Len() int

func (ReqHeap) Less

func (h ReqHeap) Less(i, j int) bool

func (*ReqHeap) Pop

func (h *ReqHeap) Pop() interface{}

func (*ReqHeap) Push

func (h *ReqHeap) Push(x interface{})

func (ReqHeap) Swap

func (h ReqHeap) Swap(i, j int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL