capabilities

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: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConfigMapName is the name of the capabilities ConfigMap.
	ConfigMapName = "wcp-cluster-capabilities"

	// ConfigMapNamespace is the namespace of the capabilities ConfigMap.
	ConfigMapNamespace = "kube-system"

	// CapabilitiesName is the name of the cluster-scoped Capabilities resource
	// used to discover Supervisor capabilities.
	CapabilitiesName = "supervisor-capabilities"

	// CapabilityKeyBringYourOwnKeyProvider is the name of capability key
	// defined in the capabilities ConfigMap and/or CRD.
	CapabilityKeyBringYourOwnKeyProvider = "supports_BYOK_encryption"

	// CapabilityKeyTKGMultipleContentLibraries is the name of capability key
	// defined in the capabilities ConfigMap and/or CRD.
	CapabilityKeyTKGMultipleContentLibraries = "MultipleCL_For_TKG_Supported"

	// CapabilityKeyWorkloadIsolation is the name of capability key
	// defined in the capabilities ConfigMap and/or CRD.
	CapabilityKeyWorkloadIsolation = "Workload_Domain_Isolation_Supported"

	// CapabilityKeyMutableNetworks is the name of capability key
	// defined in the capabilities ConfigMap and/or CRD.
	CapabilityKeyMutableNetworks = "supports_VM_service_mutable_networks"

	// CapabilityKeyVMGroups is the name of capability key defined in the
	// Supervisor capabilities CRD.
	CapabilityKeyVMGroups = "supports_VM_service_VM_groups"

	// CapabilityKeyImmutableClasses is the name of capability key defined in the
	// Supervisor capabilities CRD.
	CapabilityKeyImmutableClasses = "supports_VM_service_immutable_VM_classes"

	// CapabilityKeyVMSnapshots is the name of the capability key
	// defined in the Supervisor capabilities CRD for the VM snapshots
	// capability.
	CapabilityKeyVMSnapshots = "supports_VM_service_VM_snapshots"

	// CapabilityKeyInventoryContentLibrary is the name of the key defined in the
	// Supervisor capabilities CRD.
	CapabilityKeyInventoryContentLibrary = "supports_inventory_content_library"

	// CapabilityKeyVMPlacementPolicies is the name of the capability key
	// defined in the Supervisor capabilities CRD for the VM placement policy
	// capability.
	CapabilityKeyVMPlacementPolicies = "supports_VM_service_VM_placement_policies"

	// CapabilityKeyVMWaitForFirstConsumerPVC is the name of the capability key
	// defined in the Supervisor capabilities CRD for the VM WFFC PVC
	// capability.
	CapabilityKeyVMWaitForFirstConsumerPVC = "supports_VM_service_WFFC_PVC"

	// CapabilityKeySharedDisks is the name of the capability key
	// defined in the Supervisor capabilities CRD for the VM Service's support
	// for shared disks. This capability is introduced as a part of Oracle RAC
	// and Microsoft WSFC workloads support.
	CapabilityKeySharedDisks = "supports_shared_disks_with_VM_service_VMs"

	// CapabilityKeyGuestCustomizationVCDParity is the name of the capability key
	// defined in the Supervisor capabilities CRD for guest customization VCD parity.
	CapabilityKeyGuestCustomizationVCDParity = "supports_guest_customization_vcd_parity"

	// CapabilityKeyVSpherePolicies is the name of the capability key
	// defined in the Supervisor capabilities CRD for IaaS Policies and Placement.
	CapabilityKeyVSpherePolicies = "supports_iaas_compute_policies"

	// CapabilityKeyAllDisksArePVCs is the name of the capability key defined in
	// the Supervisor capabilities CRD for enabling all disks as PVCs in VM Op.
	CapabilityKeyAllDisksArePVCs = "supports_vm_service_all_disks_are_pvcs"
)

Variables

View Source
var (
	// CapabilitiesKey is the ObjectKey for the cluster-scoped Capabilities
	// resource.
	CapabilitiesKey = ctrlclient.ObjectKey{Name: CapabilitiesName}

	// ConfigMapKey is the ObjectKey for the capabilities ConfigMap.
	ConfigMapKey = ctrlclient.ObjectKey{
		Name:      ConfigMapName,
		Namespace: ConfigMapNamespace,
	}
)

Functions

func UpdateCapabilities

func UpdateCapabilities(
	ctx context.Context,
	k8sClient ctrlclient.Client) (bool, error)

UpdateCapabilities updates the capabilities in the context from either the capabilities ConfigMap or cluster-scoped CRD resource.

func UpdateCapabilitiesFeatures

func UpdateCapabilitiesFeatures[T updateCapTypes](
	ctx context.Context,
	obj T) (string, bool)

UpdateCapabilitiesFeatures updates the features in the context config.

Please note, this call impacts the configuration available to contexts throughout the process, not just *this* context or its children. Please refer to the pkg/config package for more information on SetContext and its behavior.

The return value indicates if any of the features changed.

func WouldUpdateCapabilitiesFeatures added in v1.10.0

func WouldUpdateCapabilitiesFeatures[T updateCapTypes](
	ctx context.Context,
	obj T) (string, bool)

WouldUpdateCapabilitiesFeatures is like UpdateCapabilitiesFeatures but does not actually cause a change to the capabilities.

Types

This section is empty.

Jump to

Keyboard shortcuts

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