Documentation ¶
Index ¶
Constants ¶
View Source
const ( TrueString = "true" VmopNamespaceEnv = "POD_NAMESPACE" WcpFaultDomainsFSS = "FSS_WCP_FAULTDOMAINS" VMServiceV1Alpha2FSS = "FSS_WCP_VMSERVICE_V1ALPHA2" InstanceStorageFSS = "FSS_WCP_INSTANCE_STORAGE" UnifiedTKGFSS = "FSS_WCP_Unified_TKG" VMClassAsConfigFSS = "FSS_WCP_VM_CLASS_AS_CONFIG" VMClassAsConfigDaynDateFSS = "FSS_WCP_VM_CLASS_AS_CONFIG_DAYNDATE" VMImageRegistryFSS = "FSS_WCP_VM_IMAGE_REGISTRY" NamespacedClassAndWindowsFSS = "FSS_WCP_NAMESPACED_CLASS_AND_WINDOWS_SUPPORT" MaxCreateVMsOnProviderEnv = "MAX_CREATE_VMS_ON_PROVIDER" DefaultMaxCreateVMsOnProvider = 80 InstanceStoragePVPlacementFailedTTLEnv = "INSTANCE_STORAGE_PV_PLACEMENT_FAILED_TTL" // DefaultInstanceStoragePVPlacementFailedTTL is the default wait time before declaring PV placement failed // after error annotation is set on PVC. DefaultInstanceStoragePVPlacementFailedTTL = 5 * time.Minute // InstanceStorageJitterMaxFactorEnv is env variable for setting max factor to be used in wait.Jitter // for instance storage. InstanceStorageJitterMaxFactorEnv = "INSTANCE_STORAGE_JITTER_MAX_FACTOR" // DefaultInstanceStorageJitterMaxFactor is the default max factor to compute jitter requeue duration // for instance storage. // Note that wait.Jitter sets the maxFactor to 1.0 if the input maxFactor is <= 0.0. With this default // max factor and 10s default seed duration, wait.Jitter returns requeue delay between 11 and 19. // These numbers ensures multiple reconcile threads aren't re queuing VMs at the exact interval. We want // to have a little entropy around the requeue time. DefaultInstanceStorageJitterMaxFactor = 1.0 // InstanceStorageSeedRequeueDurationEnv is environment variable for setting seed requeue // duration for instance storage. InstanceStorageSeedRequeueDurationEnv = "INSTANCE_STORAGE_SEED_REQUEUE_DURATION" // DefaultInstanceStorageSeedRequeueDuration is the default seed requeue duration for instance storage. DefaultInstanceStorageSeedRequeueDuration = 10 * time.Second // NetworkProviderType is the cluster network provider type. Valid values // include: NAMED, NSXT, VSPHERE_NETWORK. Please note that NAMED is only // used for testing and is not supported in production environments. NetworkProviderType = "NETWORK_PROVIDER" NetworkProviderTypeNamed = "NAMED" NetworkProviderTypeNSXT = "NSXT" NetworkProviderTypeVDS = "VSPHERE_NETWORK" )
Variables ¶
View Source
var IsInstanceStorageFSSEnabled = func() bool { return os.Getenv(InstanceStorageFSS) == trueString }
View Source
var IsNamedNetworkProviderEnabled = func() bool { return os.Getenv(NetworkProviderType) == NetworkProviderTypeNamed }
View Source
var IsNamespacedClassAndWindowsFSSEnabled = func() bool { return os.Getenv(NamespacedClassAndWindowsFSS) == trueString }
View Source
var IsUnifiedTKGFSSEnabled = func() bool { return os.Getenv(UnifiedTKGFSS) == trueString }
View Source
var IsVMClassAsConfigFSSDaynDateEnabled = func() bool { return os.Getenv(VMClassAsConfigDaynDateFSS) == trueString }
View Source
var IsVMClassAsConfigFSSEnabled = func() bool { return os.Getenv(VMClassAsConfigFSS) == trueString }
View Source
var IsVMServiceV1Alpha2FSSEnabled = func() bool { return os.Getenv(VMServiceV1Alpha2FSS) == trueString }
View Source
var IsWCPVMImageRegistryEnabled = func() bool { return os.Getenv(VMImageRegistryFSS) == trueString }
View Source
var IsWcpFaultDomainsFSSEnabled = func() bool { return os.Getenv(WcpFaultDomainsFSS) == trueString }
View Source
var MaxConcurrentCreateVMsOnProvider = func() int { v := os.Getenv(MaxCreateVMsOnProviderEnv) if v == "" { return DefaultMaxCreateVMsOnProvider } val, err := strconv.Atoi(v) if err != nil { return DefaultMaxCreateVMsOnProvider } return val }
MaxConcurrentCreateVMsOnProvider returns the percentage of reconciler threads that can be used to create VMs on the provider concurrently. The default is 80.
Functions ¶
func GetInstanceStoragePVPlacementFailedTTL ¶
GetInstanceStoragePVPlacementFailedTTL returns the configured wait time before declaring PV placement failed after error annotation is set on PVC.
func GetInstanceStorageRequeueDelay ¶
GetInstanceStorageRequeueDelay returns requeue delay for instance storage.
func GetVMOpNamespaceFromEnv ¶
GetVMOpNamespaceFromEnv resolves the VM Operator pod's namespace from the environment.
func IsNotFoundError ¶
func SetVMOpNamespaceEnv ¶
SetVMOpNamespaceEnv sets the VM Operator pod's namespace in the environment.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.