capabilities

package
v1.9.0-p01 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 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 = "Bring_Your_Own_Key_Provider_Supported"

	// 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"
)

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