constant

package
v0.0.0-...-12e0a72 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ElasticQuotaControllerName          = "eq-controller"
	CompositeElasticQuotaControllerName = "ceq-controller"
	ClusterStateNodeControllerName      = "clusterstate-node-controller"
	ClusterStatePodControllerName       = "clusterstate-pod-controller"
	MigPartitionerControllerName        = "mig-partitioner-controller"
	MpsPartitionerControllerName        = "mps-partitioner-controller"
)

Controller names

View Source
const (
	// RegexNvidiaMigResource is a regex matching the name of the MIG devices exposed by the NVIDIA device plugin
	RegexNvidiaMigResource     = `nvidia\.com\/mig-\d+g\.\d+gb`
	RegexNvidiaMigProfile      = `\d+g\.\d+gb`
	RegexNvidiaMigFormatMemory = `\d+gb`
)

Common RegEx

View Source
const (
	// NvidiaMigResourcePrefix is the prefix of NVIDIA MIG resources
	NvidiaMigResourcePrefix = "nvidia.com/mig-"
	NvidiaResourcePrefix    = "nvidia.com/"
)

Prefixes

View Source
const (
	// LabelNvidiaProduct is the name of the label assigned by the NVIDIA GPU Operator that identifies
	// the model of the NVIDIA GPUs on a certain node
	LabelNvidiaProduct = "nvidia.com/gpu.product"
	// LabelNvidiaCount is the name of the label assigned by the NVIDIA GPU Operator that identifies
	// the number of NVIDIA GPUs on a certain node
	LabelNvidiaCount = "nvidia.com/gpu.count"
	// LabelNvidiaMemory is the name of the label assigned by the NVIDIA GPU Operator that identifies
	// the amount of memory of the GPUs of a node
	LabelNvidiaMemory = "nvidia.com/gpu.memory"
	// LabelNvidiaDevicePluginConfig is the label used by the NVIDIA k8s device plugin for determining the
	// which plugin config to apply choosing from the respective ConfigMap
	LabelNvidiaDevicePluginConfig = "nvidia.com/device-plugin.config"
)

Labels

View Source
const (
	// DefaultNvidiaGPUResourceMemory is the default memory value (in GigaByte) that is associated to
	// nvidia.com/gpu resources. The value represents the GPU memory requirement of a single resource.
	// This value is used when the controller and scheduler configurations do not specify any value for this
	// setting.
	DefaultNvidiaGPUResourceMemory = 16

	// DefaultPodResourcesTimeout is the default timeout used for the Pod resource lister
	DefaultPodResourcesTimeout = 10 * time.Second
	// DefaultPodResourcesMaxMsgSize is the default max message size used for the Pod resource lister
	DefaultPodResourcesMaxMsgSize = 1024 * 1024 * 16 // 16 Mb

	// DefaultDevicePluginCMName is the default name of the ConfigMap used by the NVIDIA device plugin
	DefaultDevicePluginCMName = "device-plugin-configs"
	// DefaultDevicePluginCMNamespace is the default namespace of the ConfigMap used by the NVIDIA device plugin
	DefaultDevicePluginCMNamespace = "gpu-operator"
)

Defaults

View Source
const (
	PodPhaseKey    = "status.phase"
	PodNodeNameKey = "spec.nodeName"
)
View Source
const (
	// EnvVarNodeName is the name of the env variable containing the name of the node
	EnvVarNodeName = "NODE_NAME"
)

Env variables

View Source
const (
	// InternalErrorMsg is the error message shown in logs for internal errors
	InternalErrorMsg = "internal error"
)

Error messages

View Source
const (
	// ResourceNvidiaGPU is the name of the GPU resource exposed by the NVIDIA device plugin
	ResourceNvidiaGPU v1.ResourceName = "nvidia.com/gpu"
)

Resource names

Variables

This section is empty.

Functions

This section is empty.

Types

type CapacityInfo

type CapacityInfo string
const (
	CapacityInfoOverQuota CapacityInfo = "over-quota"
	CapacityInfoInQuota   CapacityInfo = "in-quota"
)

Jump to

Keyboard shortcuts

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