namespace

package
v0.0.0-...-aba7421 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AnnotationNamespaceVPCError = " nsx.vmware.com/vpc_error"
)

Functions

func BuildVPCCR

func BuildVPCCR(ns string, ncName string, vpcName *string) *v1alpha1.VPC

Types

type NamespaceReconciler

type NamespaceReconciler struct {
	Client     client.Client
	Scheme     *apimachineryruntime.Scheme
	NSXConfig  *config.NSXOperatorConfig
	VPCService types.VPCServiceProvider
}

NamespaceReconciler process namespace create/delete event Using vpcservice provider instead of vpc service to prevent invoking method that should be exposed to other module.

func (*NamespaceReconciler) Reconcile

func (r *NamespaceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
	   VPC creation strategy:

   We suppose namespace should have following annotations:
	 - "nsx.vmware.com/vpc_name": "<Namespace Name>/<Supervisor ID>"
	   If the ns contains this annotation, first check if	the namespace in annotation is the same as
	   the one in ns event, if yes, create an infra VPC for it. if	not, skip the whole ns event as the infra
	   VPC will be created its corresponding ns creation event.
	 - "nsx.vmware.com/vpc_network_config":"<Supervisor ID>"
	   If ns do not contains "nsx.vmware.com/vpc_name" annotation. Use this annotation to handle VPC creation.
	   VPC will locate the network config with the CR name, and create VPC using its config.
	 - If the ns do not have either of the annotation above, then we believe it is using default VPC, try to search
	   default VPC in network config CR store. The default VPC network config CR's name is "default".

func (*NamespaceReconciler) Start

func (r *NamespaceReconciler) Start(mgr ctrl.Manager) error

Start setup manager and launch GC

Jump to

Keyboard shortcuts

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