consts.go 1.93 KB
Newer Older
1
2
package consts

3
4
import "time"

5
6
7
8
9
10
const (
	HPACPUDefaultAverageUtilization = 80

	DefaultUserId = "default"
	DefaultOrgId  = "default"

11
	DynamoServicePort       = 8000
12
13
	DynamoServicePortName   = "http"
	DynamoContainerPortName = "http"
14

15
16
	DynamoSystemPort     = 9090
	DynamoSystemPortName = "system"
17

18
19
	MpiRunSshPort = 2222

20
	EnvDynamoServicePort = "DYNAMO_PORT"
21

22
23
	KubeLabelDynamoSelector = "nvidia.com/selector"

24
25
	KubeAnnotationEnableGrove = "nvidia.com/enable-grove"

26
	KubeLabelDynamoComponent            = "nvidia.com/dynamo-component"
27
	KubeLabelDynamoNamespace            = "nvidia.com/dynamo-namespace"
28
	KubeLabelDynamoDeploymentTargetType = "nvidia.com/dynamo-deployment-target-type"
29
	KubeLabelDynamoComponentType        = "nvidia.com/dynamo-component-type"
30

31
32
33
	KubeLabelValueFalse = "false"
	KubeLabelValueTrue  = "true"

34
	KubeLabelDynamoComponentPod = "nvidia.com/dynamo-component-pod"
35
36
37

	KubeResourceGPUNvidia = "nvidia.com/gpu"

38
	DynamoDeploymentConfigEnvVar = "DYN_DEPLOYMENT_CONFIG"
39

40
	ComponentTypePlanner      = "planner"
41
	ComponentTypeFrontend     = "frontend"
42
	ComponentTypeWorker       = "worker"
43
	ComponentTypeDefault      = "default"
44
	PlannerServiceAccountName = "planner-serviceaccount"
45
46

	DefaultIngressSuffix = "local"
47
48

	DefaultGroveTerminationDelay = 15 * time.Minute
49
50

	// Metrics related constants
51
52
53
54
55
	KubeAnnotationEnableMetrics  = "nvidia.com/enable-metrics"  // User-provided annotation to control metrics
	KubeLabelMetricsEnabled      = "nvidia.com/metrics-enabled" // Controller-managed label for pod selection
	KubeValueNameSharedMemory    = "shared-memory"
	DefaultSharedMemoryMountPath = "/dev/shm"
	DefaultSharedMemorySize      = "8Gi"
56
57
58
59
60
61
62
63
64
65
66
67
68

	// Grove multinode role suffixes
	GroveRoleSuffixLeader = "ldr"
	GroveRoleSuffixWorker = "wkr"

	MpiRunSshSecretName = "mpi-run-ssh-secret"
)

type MultinodeDeploymentType string

const (
	MultinodeDeploymentTypeGrove MultinodeDeploymentType = "grove"
	MultinodeDeploymentTypeLWS   MultinodeDeploymentType = "lws"
69
)