nsnetworkpolicy

package
v0.0.0-...-be065d1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (

	//whether network isolate is enable in namespace
	NamespaceNPAnnotationKey     = "kubesphere.io/network-isolate"
	NamespaceNPAnnotationEnabled = "enabled"

	NodeNSNPAnnotationKey = "kubesphere.io/snat-node-ips"

	AnnotationNPNAME = v1alpha1.NSNPPrefix + "network-isolate"

	//TODO: configure it
	DNSLocalIP        = "169.254.25.10"
	DNSPort           = 53
	DNSNamespace      = "kube-system"
	DNSServiceName    = "kube-dns"
	DNSServiceCoreDNS = "coredns"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NSNetworkPolicyController

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

namespacenpController implements the Controller interface for managing kubesphere network policies and convery them to k8s NetworkPolicies, then syncing them to the provider.

func NewNSNetworkPolicyController

func NewNSNetworkPolicyController(
	client kubernetes.Interface,
	ksclient ksnetclient.NetworkV1alpha1Interface,
	nsnpInformer nspolicy.NamespaceNetworkPolicyInformer,
	serviceInformer v1.ServiceInformer,
	nodeInformer v1.NodeInformer,
	workspaceInformer workspace.WorkspaceInformer,
	namespaceInformer v1.NamespaceInformer,
	policyProvider provider.NsNetworkPolicyProvider,
	options options.NSNPOptions) *NSNetworkPolicyController

NewnamespacenpController returns a controller which manages NSNSP objects.

func (*NSNetworkPolicyController) Run

func (c *NSNetworkPolicyController) Run(threadiness int, reconcilerPeriod string, stopCh <-chan struct{}) error

Run starts the controller.

func (*NSNetworkPolicyController) Start

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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