capabilities

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 8 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"
)

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) 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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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