constants

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// CreatedAtBuildVersionAnnotationKey is set on VirtualMachine
	// objects when an object's metadata.generation value is 1.
	// The value of this annotation may be empty, indicating the VM was first
	// created before this annotation was used. This information itself is
	// in fact useful, as it still indicates something about the build version
	// at which an object was first created.
	CreatedAtBuildVersionAnnotationKey = createdAtPrefix + "build-version"

	// CreatedAtSchemaVersionAnnotationKey is set on VirtualMachine
	// objects when an object's metadata.generation value is 1.
	// The value of this annotation may be empty, indicating the VM was first
	// created before this annotation was used. This information itself is
	// in fact useful, as it still indicates something about the schema version
	// at which an object was first created.
	CreatedAtSchemaVersionAnnotationKey = createdAtPrefix + "schema-version"

	// UpgradedToBuildVersionAnnotationKey is set on VirtualMachine
	// objects when the function "ReconcileSchemaUpgrade" from
	// pkg/providers/vsphere/upgrade/virtualmachine/vm_schema_upgrade.go is
	// executed.
	//
	// Please note, a validation webhook will deny any patch/update operations
	// on VirtualMachine objects from unprivileged users until such time the
	// object has this annotation with a value that matches the expected value.
	UpgradedToBuildVersionAnnotationKey = upgradedToPrefix + "build-version"

	// UpgradedToSchemaVersionAnnotationKey is set on VirtualMachine
	// objects when the function "ReconcileSchemaUpgrade" from
	// pkg/providers/vsphere/upgrade/virtualmachine/vm_schema_upgrade.go is
	// executed.
	//
	// Please note, a validation webhook will deny any patch/update operations
	// on VirtualMachine objects from unprivileged users until such time the
	// object has this annotation with a value that matches the expected value.
	UpgradedToSchemaVersionAnnotationKey = upgradedToPrefix + "schema-version"

	// UpgradedToFeatureVersionAnnotationKey is set on VirtualMachine
	// objects when the function "ReconcileSchemaUpgrade" from
	// pkg/providers/vsphere/upgrade/virtualmachine/vm_schema_upgrade.go is
	// executed.
	//
	// Please note, a validation webhook will deny any patch/update operations
	// on VirtualMachine objects from unprivileged users until such time the
	// object has this annotation with a value that matches the expected value.
	UpgradedToFeatureVersionAnnotationKey = upgradedToPrefix + "feature-version"

	// MinSupportedHWVersionForPVC is the supported virtual hardware version for
	// persistent volumes.
	MinSupportedHWVersionForPVC = vimtypes.VMX15

	// MinSupportedHWVersionForVTPM is the supported virtual hardware version
	// for a Virtual Trusted Platform Module (vTPM).
	MinSupportedHWVersionForVTPM = vimtypes.VMX14

	// MinSupportedHWVersionForPCIPassthruDevices is the supported virtual
	// hardware version for NVidia PCI devices.
	MinSupportedHWVersionForPCIPassthruDevices = vimtypes.VMX17

	// DisplayNameAnnotationKey is applied to objects so their display name is
	// also in an annotation for metadata-only listers.
	DisplayNameAnnotationKey = "vmware.com/display-name"

	// VMICacheLabelKey is applied to resources that need to be reconciled when
	// the VirtualMachineImageCache resource specified by the label's value is
	// updated.
	VMICacheLabelKey = "vmicache.vmoperator.vmware.com/name"

	// VMICacheLocationAnnotationKey is applied to resources waiting on a
	// VirtualMachineImageCache's disks to be available at the specified
	// location.
	// The value of this annotation is a comma-delimited string that specifies
	// the datacenter ID and datastore ID, ex. datacenter-50,datastore-42.
	VMICacheLocationAnnotationKey = "vmicache.vmoperator.vmware.com/location"

	// FastDeployAnnotationKey is applied to VirtualMachine resources that want
	// to control the mode of FastDeploy used to create the underlying VM.
	// Please note, this annotation only has any effect if the FastDeploy FSS is
	// enabled.
	// The valid values for this annotation are "direct" and "linked." If the
	// FSS is enabled and:
	//
	//   - the value is "direct," then the VM is deployed from cached disks.
	//   - the value is "linked," then the VM is deployed as a linked clone.
	//   - the value is empty or the annotation is not present, then the mode
	//     is derived from the environment variable FAST_DEPLOY_MODE.
	//   - the value is anything else, then fast deploy is not used to deploy
	//     the VM.
	FastDeployAnnotationKey = "vmoperator.vmware.com/fast-deploy"

	// FastDeployModeDirect is a fast deploy mode. See FastDeployAnnotationKey
	// for more information.
	FastDeployModeDirect = "direct"

	// FastDeployModeLinked is a fast deploy mode. See FastDeployAnnotationKey
	// for more information.
	FastDeployModeLinked = "linked"

	// LastRestartTimeAnnotationKey is applied to a Deployment's pod template
	// spec when the pod needs to restart itself, ex. the capabilities change.
	// The application of this annotation causes the Deployment to do a rollout
	// of new pods, ensuring at least one pod is online at all times.
	// The value is an RFC3339Nano formatted timestamp.
	LastRestartTimeAnnotationKey = "vmoperator.vmware.com/last-restart-time"

	// LastRestartReasonAnnotationKey is applied to a Deployment's pod template
	// spec when the pod needs to restart itself, ex. the capabilities change.
	// The application of this annotation causes the Deployment to do a rollout
	// of new pods, ensuring at least one pod is online at all times.
	// The value is the reason for the restart.
	LastRestartReasonAnnotationKey = "vmoperator.vmware.com/last-restart-reason"

	// VCCredsSecretName is the name of the secret in the pod namespace
	// that contains the VC credentials.
	VCCredsSecretName = "wcp-vmop-sa-vc-auth" //nolint:gosec

	// ClusterModuleNameAnnotationKey is the annotation key for cluster module group name for
	// the VM. The VM must have a VirtualMachineSetResourcePolicy assigned.
	ClusterModuleNameAnnotationKey string = "vsphere-cluster-module-group"

	// ClusterModuleUUIDAnnotationKey is the annotation key for cluster module UUID for
	// the VM. The VM must have a VirtualMachineSetResourcePolicy assigned.
	ClusterModuleUUIDAnnotationKey string = "vsphere-cluster-module-group-uuid"

	// SkipValidationAnnotationKey is a privileged annotation that may be used
	// to skip the validation webhooks for a given object.
	SkipValidationAnnotationKey string = "vmoperator.vmware.com.protected/skip-validation"

	// BootstrapHashConfigSpecAnnotationKey is the annotation used to track the
	// config spec used to bootstrap a VM's guest information.
	BootstrapHashConfigSpecAnnotationKey = "vmoperator.vmware.com/bootstrap-hash-configspec"

	// BootstrapHashCustomSpecAnnotationKey is the annotation used to track the
	// customization spec used to bootstrap a VM's guest information.
	BootstrapHashCustomSpecAnnotationKey = "vmoperator.vmware.com/bootstrap-hash-customspec"

	// SkipDeletePlatformResourceKey is a privileged annotation that may be used
	// to skip the deletion of a Kubernetes object's underlying platform
	// resource. For example, when applied to a VM, deleting the VirtualMachine
	// object in Kubernetes will not result in the deletion of the vSphere VM.
	SkipDeletePlatformResourceKey string = "vmoperator.vmware.com.protected/skip-delete-platform-resource"

	// LastUpdatedPowerStateTimeAnnotation is the annotation key for the last
	// updated time of the power state.
	LastUpdatedPowerStateTimeAnnotation = "vmoperator.vmware.com.protected/last-updated-power-state-time"

	// ApplyPowerStateTimeAnnotation is the annotation key for the time to apply
	// a power state change to a VirtualMachine or a VirtualMachineGroup object
	// scheduled from its parent group.
	ApplyPowerStateTimeAnnotation = "vmoperator.vmware.com.protected/apply-power-state-time"

	// VirtualMachineClassHashAnnotationKey is the annotation key for the VM Class hash
	// used to generate VirtualMachineClassInstances.
	VirtualMachineClassHashAnnotationKey = "vmoperator.vmware.com/vmclass-hash"

	// VirtualMachineSnapshotRevertInProgressAnnotationKey is the
	// annotation key to indicate that a VM snapshot revert is in
	// progress.
	//
	// This annotation is set when a snapshot revert operation is initiated
	// and is removed once the operation completes successfully.
	//
	// If the revert operation fails, this annotation may remain on the VM,
	// indicating that the revert is still in progress. In such cases, manual
	// intervention will be required to remove the annotation and retry the
	// revert operation.
	VirtualMachineSnapshotRevertInProgressAnnotationKey = "vmoperator.vmware.com/snapshot-revert-in-progress"

	// VirtualMachineImageExtraConfigLabelsKey is the ExtraConfig key
	// whose value is a comma-delimited list of labels that are surfaced on the
	// VMI:
	//
	// For example, if the value in ExtraConfig is:
	//
	//     vmservice.vmi.labels=example.com/hello:world,fu.bar:,another.example.com:true
	//
	// Then the VMI would have three labels:
	//
	//     - example.com/hello: "world"
	//     - fu.bar: ""
	//     - another.example.com: "true"
	VirtualMachineImageExtraConfigLabelsKey = "vmservice.vmi.labels"

	// VMProvKeepDisksExtraConfigKey is set in ExtraConfig with the value a
	// comma-separated list of the names of disks to keep when a VM is being
	// deleted or having its disks promoted.
	VMProvKeepDisksExtraConfigKey = "vmprov.keepDisks"

	// CSIVSphereVolumeSyncAnnotationKey is the annotation key for the CSIVSphereVolumeSync
	// annotation.
	CSIVSphereVolumeSyncAnnotationKey = "csi.vsphere.volume.sync"

	// CSIVSphereVolumeSyncAnnotationValueRequested is the annotation value for the
	// CSIVSphereVolumeSync annotation. It is used to inform the CSI driver to
	// update SPU for the attached volumes.
	CSIVSphereVolumeSyncAnnotationValueRequested = "requested"

	// CSIVSphereVolumeSyncAnnotationValueCompleted is the annotation value for the
	// CSIVSphereVolumeSync annotation. It is used to indicate that the CSI driver
	// has completed the sync of the volume. This annotation is set by the CSI driver
	// when the sync is completed.
	CSIVSphereVolumeSyncAnnotationValueCompleted = "completed"

	// AsyncQuotaPerformCheckAnnotationKey is the label key indicating that the ContentLibrary
	// associated with a VirtualMachinePublishRequest is subject to VCFA quota approval. Additionally,
	// this is used by the VirtualMachinePublishRequest controller as an annotation to indicate
	// to the controller on subsequent reconciliations that quota validation has been initiated
	// and is in-progress.
	AsyncQuotaPerformCheckAnnotationKey = "vmware-system-vcfa-storage-quota"

	// AsyncQuotaCheckRequestedCapacityAnnotationKey is the annotation key added
	// by the VirtualMachinePublishRequest controller to initiate quota validation. Adding
	// this annotation will indicate that the controller must provide the requested capacity
	// and block request fulfillment until further notice.
	AsyncQuotaCheckRequestedCapacityAnnotationKey = "vcfa.storage.quota.check.vmware.com/requested-capacity"

	// AsyncQuotaCheckStatusAnnotationKey is the annotation that would indicate that
	// the quota check has failed for this VirtualMachinePublishRequest. This provides
	// a machine-readable status.
	AsyncQuotaCheckStatusAnnotationKey = "vcfa.storage.quota.check.vmware.com/status"

	// AsyncQuotaCheckStatusAnnotationValueFailed is the value of the annotation indicating
	// that the quota check has failed for this VirtualMachinePublishRequest.
	AsyncQuotaCheckStatusAnnotationValueFailed = "Failed"

	// AsyncQuotaCheckMessageAnnotationKey is the annotation that provides a human-readable,
	// user-facing message detailing the nature of a failed quota check for a given
	// VirtualMachinePublishRequest.
	AsyncQuotaCheckMessageAnnotationKey = "vcfa.storage.quota.check.vmware.com/message"

	// VCFAIDAnnotationKey is the annotation key for the VCFA ID for GOSC customization.
	VCFAIDAnnotationKey = "vmoperator.vmware.com/vcfa-id"

	// ReconcilePriorityAnnotationKey is the annotation key that specifies the
	// reconcile priority for an object.
	ReconcilePriorityAnnotationKey = "vmoperator.vmware.com.protected/reconcile-priority"

	// CreatedByLabel is the label key that indicates an object was
	// created on behalf of a VM Operator VM. The value is the name of a VM.
	CreatedByLabel = "vmoperator.vmware.com/created-by"

	// NoUnmanagedVolumesRegisterAnnotationKey is the annotation to not create any CNSRegisterVolumes
	// by skipping the unmanaged volume register reconcile.
	NoUnmanagedVolumesRegisterAnnotationKey = "vmoperator.vmware.com/no-unmanaged-volumes-register"
)

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
testlabels module

Jump to

Keyboard shortcuts

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