util

package
v2.7.3 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// NSXTNetworkProvider holds the network provider name for NSX-T based setups.
	NSXTNetworkProvider = "NSXT_CONTAINER_PLUGIN"
	// VDSNetworkProvider holds the network provider name for VDS based setups.
	VDSNetworkProvider = "VSPHERE_NETWORK"
)

Variables

This section is empty.

Functions

func GetNetworkProvider

func GetNetworkProvider(ctx context.Context) (string, error)

GetNetworkProvider reads the network-config configmap in Supervisor cluster. Returns the network provider as NSXT_CONTAINER_PLUGIN for NSX-T, or VSPHERE_NETWORK for VDS. Otherwise, returns an error, if network provider is not present in the configmap.

func GetTKGVMIP

func GetTKGVMIP(ctx context.Context, vmOperatorClient client.Client, dc dynamic.Interface,
	vmNamespace, vmName string, nsxConfiguration bool) (string, error)

GetTKGVMIP finds the external facing IP address of a TKG VM object from a given Supervisor Namespace based on the networking configuration (NSX-T or VDS).

func GetVolumeID

func GetVolumeID(ctx context.Context, client client.Client, pvcName string, namespace string) (string, error)

GetVolumeID gets the volume ID from the PV that is bound to PVC by pvcName.

Types

This section is empty.

Jump to

Keyboard shortcuts

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