Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
80279ad3
"...controller/dynamographdeployment_controller_test.go" did not exist on "aa1bc3c5b5a0fa8e886ba0c0e92b3b37c412e857"
Unverified
Commit
80279ad3
authored
Aug 24, 2025
by
julienmancuso
Committed by
GitHub
Aug 24, 2025
Browse files
fix: increase shm default size and make it configurable (#2616)
parent
8ad558d4
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
132 additions
and
58 deletions
+132
-58
deploy/cloud/helm/crds/templates/nvidia.com_dynamocomponentdeployments.yaml
...crds/templates/nvidia.com_dynamocomponentdeployments.yaml
+12
-0
deploy/cloud/helm/crds/templates/nvidia.com_dynamographdeployments.yaml
...elm/crds/templates/nvidia.com_dynamographdeployments.yaml
+12
-0
deploy/cloud/operator/api/v1alpha1/common.go
deploy/cloud/operator/api/v1alpha1/common.go
+5
-0
deploy/cloud/operator/api/v1alpha1/dynamocomponentdeployment_types.go
.../operator/api/v1alpha1/dynamocomponentdeployment_types.go
+3
-0
deploy/cloud/operator/api/v1alpha1/zz_generated.deepcopy.go
deploy/cloud/operator/api/v1alpha1/zz_generated.deepcopy.go
+21
-0
deploy/cloud/operator/config/crd/bases/nvidia.com_dynamocomponentdeployments.yaml
...nfig/crd/bases/nvidia.com_dynamocomponentdeployments.yaml
+12
-0
deploy/cloud/operator/config/crd/bases/nvidia.com_dynamographdeployments.yaml
...r/config/crd/bases/nvidia.com_dynamographdeployments.yaml
+12
-0
deploy/cloud/operator/internal/consts/consts.go
deploy/cloud/operator/internal/consts/consts.go
+5
-3
deploy/cloud/operator/internal/controller/dynamocomponentdeployment_controller_test.go
...l/controller/dynamocomponentdeployment_controller_test.go
+12
-13
deploy/cloud/operator/internal/dynamo/graph.go
deploy/cloud/operator/internal/dynamo/graph.go
+18
-22
deploy/cloud/operator/internal/dynamo/graph_test.go
deploy/cloud/operator/internal/dynamo/graph_test.go
+20
-20
No files found.
deploy/cloud/helm/crds/templates/nvidia.com_dynamocomponentdeployments.yaml
View file @
80279ad3
...
@@ -10241,6 +10241,18 @@ spec:
...
@@ -10241,6 +10241,18 @@ spec:
serviceName:
serviceName:
description: contains the name of the component
description: contains the name of the component
type: string
type: string
sharedMemory:
description: SharedMemory controls the tmpfs mounted at /dev/shm (enable/disable and size).
properties:
disabled:
type: boolean
size:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
type: object
type: object
status:
status:
description: Status reflects the current observed state of the component deployment.
description: Status reflects the current observed state of the component deployment.
...
...
deploy/cloud/helm/crds/templates/nvidia.com_dynamographdeployments.yaml
View file @
80279ad3
...
@@ -10340,6 +10340,18 @@ spec:
...
@@ -10340,6 +10340,18 @@ spec:
serviceName:
serviceName:
description: contains the name of the component
description: contains the name of the component
type: string
type: string
sharedMemory:
description: SharedMemory controls the tmpfs mounted at /dev/shm (enable/disable and size).
properties:
disabled:
type: boolean
size:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
type: object
type: object
description: |-
description: |-
Services allows per-service overrides of the component deployment settings.
Services allows per-service overrides of the component deployment settings.
...
...
deploy/cloud/operator/api/v1alpha1/common.go
View file @
80279ad3
...
@@ -44,3 +44,8 @@ type Autoscaling struct {
...
@@ -44,3 +44,8 @@ type Autoscaling struct {
Behavior
*
autoscalingv2
.
HorizontalPodAutoscalerBehavior
`json:"behavior,omitempty"`
Behavior
*
autoscalingv2
.
HorizontalPodAutoscalerBehavior
`json:"behavior,omitempty"`
Metrics
[]
autoscalingv2
.
MetricSpec
`json:"metrics,omitempty"`
Metrics
[]
autoscalingv2
.
MetricSpec
`json:"metrics,omitempty"`
}
}
type
SharedMemorySpec
struct
{
Disabled
bool
`json:"disabled,omitempty"`
Size
resource
.
Quantity
`json:"size,omitempty"`
}
deploy/cloud/operator/api/v1alpha1/dynamocomponentdeployment_types.go
View file @
80279ad3
...
@@ -92,6 +92,9 @@ type DynamoComponentDeploymentSharedSpec struct {
...
@@ -92,6 +92,9 @@ type DynamoComponentDeploymentSharedSpec struct {
// Ingress config to expose the component outside the cluster (or through a service mesh).
// Ingress config to expose the component outside the cluster (or through a service mesh).
Ingress
*
IngressSpec
`json:"ingress,omitempty"`
Ingress
*
IngressSpec
`json:"ingress,omitempty"`
// SharedMemory controls the tmpfs mounted at /dev/shm (enable/disable and size).
SharedMemory
*
SharedMemorySpec
`json:"sharedMemory,omitempty"`
// +optional
// +optional
// ExtraPodMetadata adds labels/annotations to the created Pods.
// ExtraPodMetadata adds labels/annotations to the created Pods.
ExtraPodMetadata
*
dynamoCommon
.
ExtraPodMetadata
`json:"extraPodMetadata,omitempty"`
ExtraPodMetadata
*
dynamoCommon
.
ExtraPodMetadata
`json:"extraPodMetadata,omitempty"`
...
...
deploy/cloud/operator/api/v1alpha1/zz_generated.deepcopy.go
View file @
80279ad3
...
@@ -243,6 +243,11 @@ func (in *DynamoComponentDeploymentSharedSpec) DeepCopyInto(out *DynamoComponent
...
@@ -243,6 +243,11 @@ func (in *DynamoComponentDeploymentSharedSpec) DeepCopyInto(out *DynamoComponent
*
out
=
new
(
IngressSpec
)
*
out
=
new
(
IngressSpec
)
(
*
in
)
.
DeepCopyInto
(
*
out
)
(
*
in
)
.
DeepCopyInto
(
*
out
)
}
}
if
in
.
SharedMemory
!=
nil
{
in
,
out
:=
&
in
.
SharedMemory
,
&
out
.
SharedMemory
*
out
=
new
(
SharedMemorySpec
)
(
*
in
)
.
DeepCopyInto
(
*
out
)
}
if
in
.
ExtraPodMetadata
!=
nil
{
if
in
.
ExtraPodMetadata
!=
nil
{
in
,
out
:=
&
in
.
ExtraPodMetadata
,
&
out
.
ExtraPodMetadata
in
,
out
:=
&
in
.
ExtraPodMetadata
,
&
out
.
ExtraPodMetadata
*
out
=
new
(
common
.
ExtraPodMetadata
)
*
out
=
new
(
common
.
ExtraPodMetadata
)
...
@@ -563,3 +568,19 @@ func (in *PVC) DeepCopy() *PVC {
...
@@ -563,3 +568,19 @@ func (in *PVC) DeepCopy() *PVC {
in
.
DeepCopyInto
(
out
)
in
.
DeepCopyInto
(
out
)
return
out
return
out
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func
(
in
*
SharedMemorySpec
)
DeepCopyInto
(
out
*
SharedMemorySpec
)
{
*
out
=
*
in
out
.
Size
=
in
.
Size
.
DeepCopy
()
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedMemorySpec.
func
(
in
*
SharedMemorySpec
)
DeepCopy
()
*
SharedMemorySpec
{
if
in
==
nil
{
return
nil
}
out
:=
new
(
SharedMemorySpec
)
in
.
DeepCopyInto
(
out
)
return
out
}
deploy/cloud/operator/config/crd/bases/nvidia.com_dynamocomponentdeployments.yaml
View file @
80279ad3
...
@@ -10241,6 +10241,18 @@ spec:
...
@@ -10241,6 +10241,18 @@ spec:
serviceName:
serviceName:
description: contains the name of the component
description: contains the name of the component
type: string
type: string
sharedMemory:
description: SharedMemory controls the tmpfs mounted at /dev/shm (enable/disable and size).
properties:
disabled:
type: boolean
size:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
type: object
type: object
status:
status:
description: Status reflects the current observed state of the component deployment.
description: Status reflects the current observed state of the component deployment.
...
...
deploy/cloud/operator/config/crd/bases/nvidia.com_dynamographdeployments.yaml
View file @
80279ad3
...
@@ -10340,6 +10340,18 @@ spec:
...
@@ -10340,6 +10340,18 @@ spec:
serviceName:
serviceName:
description: contains the name of the component
description: contains the name of the component
type: string
type: string
sharedMemory:
description: SharedMemory controls the tmpfs mounted at /dev/shm (enable/disable and size).
properties:
disabled:
type: boolean
size:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
type: object
type: object
description: |-
description: |-
Services allows per-service overrides of the component deployment settings.
Services allows per-service overrides of the component deployment settings.
...
...
deploy/cloud/operator/internal/consts/consts.go
View file @
80279ad3
...
@@ -51,6 +51,8 @@ const (
...
@@ -51,6 +51,8 @@ const (
KubeAnnotationEnableMetrics
=
"nvidia.com/enable-metrics"
// User-provided annotation to control metrics
KubeAnnotationEnableMetrics
=
"nvidia.com/enable-metrics"
// User-provided annotation to control metrics
KubeLabelMetricsEnabled
=
"nvidia.com/metrics-enabled"
// Controller-managed label for pod selection
KubeLabelMetricsEnabled
=
"nvidia.com/metrics-enabled"
// Controller-managed label for pod selection
KubeValueNameSharedMemory
=
"shared-memory"
KubeValueNameSharedMemory
=
"shared-memory"
DefaultSharedMemoryMountPath
=
"/dev/shm"
DefaultSharedMemorySize
=
"8Gi"
// Grove multinode role suffixes
// Grove multinode role suffixes
GroveRoleSuffixLeader
=
"ldr"
GroveRoleSuffixLeader
=
"ldr"
...
...
deploy/cloud/operator/internal/controller/dynamocomponentdeployment_controller_test.go
View file @
80279ad3
...
@@ -24,7 +24,6 @@ import (
...
@@ -24,7 +24,6 @@ import (
"fmt"
"fmt"
"testing"
"testing"
"github.com/ai-dynamo/dynamo/deploy/cloud/operator/api/dynamo/common"
dynamoCommon
"github.com/ai-dynamo/dynamo/deploy/cloud/operator/api/dynamo/common"
dynamoCommon
"github.com/ai-dynamo/dynamo/deploy/cloud/operator/api/dynamo/common"
"github.com/ai-dynamo/dynamo/deploy/cloud/operator/api/v1alpha1"
"github.com/ai-dynamo/dynamo/deploy/cloud/operator/api/v1alpha1"
commonconsts
"github.com/ai-dynamo/dynamo/deploy/cloud/operator/internal/consts"
commonconsts
"github.com/ai-dynamo/dynamo/deploy/cloud/operator/internal/consts"
...
@@ -705,18 +704,18 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
...
@@ -705,18 +704,18 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
Multinode
:
&
v1alpha1
.
MultinodeSpec
{
Multinode
:
&
v1alpha1
.
MultinodeSpec
{
NodeCount
:
2
,
NodeCount
:
2
,
},
},
Resources
:
&
c
ommon
.
Resources
{
Resources
:
&
dynamoC
ommon
.
Resources
{
Requests
:
&
c
ommon
.
ResourceItem
{
Requests
:
&
dynamoC
ommon
.
ResourceItem
{
CPU
:
"300m"
,
CPU
:
"300m"
,
Memory
:
"500Mi"
,
Memory
:
"500Mi"
,
},
},
Limits
:
&
c
ommon
.
ResourceItem
{
Limits
:
&
dynamoC
ommon
.
ResourceItem
{
GPU
:
"1"
,
GPU
:
"1"
,
Memory
:
"20Gi"
,
Memory
:
"20Gi"
,
CPU
:
"10"
,
CPU
:
"10"
,
},
},
},
},
ExtraPodMetadata
:
&
c
ommon
.
ExtraPodMetadata
{
ExtraPodMetadata
:
&
dynamoC
ommon
.
ExtraPodMetadata
{
Annotations
:
map
[
string
]
string
{
Annotations
:
map
[
string
]
string
{
"nvidia.com/annotation1"
:
"annotation1"
,
"nvidia.com/annotation1"
:
"annotation1"
,
},
},
...
@@ -799,7 +798,7 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
...
@@ -799,7 +798,7 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
VolumeSource
:
corev1
.
VolumeSource
{
VolumeSource
:
corev1
.
VolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
Medium
:
corev1
.
StorageMediumMemory
,
Medium
:
corev1
.
StorageMediumMemory
,
SizeLimit
:
resource
.
New
Quantity
(
5
*
1024
*
1024
*
1024
,
resource
.
BinarySI
),
// 5gi (calculated from memory limit / 4)
SizeLimit
:
func
()
*
resource
.
Quantity
{
q
:=
resource
.
MustParse
(
commonconsts
.
DefaultSharedMemorySize
);
return
&
q
}(),
},
},
},
},
},
},
...
@@ -829,7 +828,7 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
...
@@ -829,7 +828,7 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
VolumeMounts
:
[]
corev1
.
VolumeMount
{
VolumeMounts
:
[]
corev1
.
VolumeMount
{
{
{
Name
:
"shared-memory"
,
Name
:
"shared-memory"
,
MountPath
:
"/dev/shm"
,
MountPath
:
commonconsts
.
DefaultSharedMemoryMountPath
,
},
},
},
},
Resources
:
corev1
.
ResourceRequirements
{
Resources
:
corev1
.
ResourceRequirements
{
...
@@ -908,7 +907,7 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
...
@@ -908,7 +907,7 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
VolumeSource
:
corev1
.
VolumeSource
{
VolumeSource
:
corev1
.
VolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
Medium
:
corev1
.
StorageMediumMemory
,
Medium
:
corev1
.
StorageMediumMemory
,
SizeLimit
:
resource
.
New
Quantity
(
5
*
1024
*
1024
*
1024
,
resource
.
BinarySI
),
// 5gi (calculated from memory limit / 4)
SizeLimit
:
func
()
*
resource
.
Quantity
{
q
:=
resource
.
MustParse
(
commonconsts
.
DefaultSharedMemorySize
);
return
&
q
}(),
},
},
},
},
},
},
...
@@ -938,7 +937,7 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
...
@@ -938,7 +937,7 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
VolumeMounts
:
[]
corev1
.
VolumeMount
{
VolumeMounts
:
[]
corev1
.
VolumeMount
{
{
{
Name
:
"shared-memory"
,
Name
:
"shared-memory"
,
MountPath
:
"/dev/shm"
,
MountPath
:
commonconsts
.
DefaultSharedMemoryMountPath
,
},
},
},
},
Resources
:
corev1
.
ResourceRequirements
{
Resources
:
corev1
.
ResourceRequirements
{
...
@@ -980,8 +979,8 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
...
@@ -980,8 +979,8 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
Multinode
:
&
v1alpha1
.
MultinodeSpec
{
Multinode
:
&
v1alpha1
.
MultinodeSpec
{
NodeCount
:
2
,
NodeCount
:
2
,
},
},
Resources
:
&
c
ommon
.
Resources
{
Resources
:
&
dynamoC
ommon
.
Resources
{
Limits
:
&
c
ommon
.
ResourceItem
{
Limits
:
&
dynamoC
ommon
.
ResourceItem
{
GPU
:
"1"
,
GPU
:
"1"
,
},
},
},
},
...
@@ -1024,8 +1023,8 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
...
@@ -1024,8 +1023,8 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
Multinode
:
&
v1alpha1
.
MultinodeSpec
{
Multinode
:
&
v1alpha1
.
MultinodeSpec
{
NodeCount
:
2
,
NodeCount
:
2
,
},
},
Resources
:
&
c
ommon
.
Resources
{
Resources
:
&
dynamoC
ommon
.
Resources
{
Limits
:
&
c
ommon
.
ResourceItem
{
Limits
:
&
dynamoC
ommon
.
ResourceItem
{
GPU
:
"1"
,
GPU
:
"1"
,
},
},
},
},
...
...
deploy/cloud/operator/internal/dynamo/graph.go
View file @
80279ad3
...
@@ -677,6 +677,8 @@ func addStandardEnvVars(container *corev1.Container, controllerConfig controller
...
@@ -677,6 +677,8 @@ func addStandardEnvVars(container *corev1.Container, controllerConfig controller
// GenerateBasePodSpec creates a basic PodSpec with common logic shared between controller and grove
// GenerateBasePodSpec creates a basic PodSpec with common logic shared between controller and grove
// Includes standard environment variables (DYNAMO_PORT, NATS_SERVER, ETCD_ENDPOINTS)
// Includes standard environment variables (DYNAMO_PORT, NATS_SERVER, ETCD_ENDPOINTS)
// Deployment-specific environment merging should be handled by the caller
// Deployment-specific environment merging should be handled by the caller
//
//nolint:gocyclo
func
GenerateBasePodSpec
(
func
GenerateBasePodSpec
(
component
*
v1alpha1
.
DynamoComponentDeploymentOverridesSpec
,
component
*
v1alpha1
.
DynamoComponentDeploymentOverridesSpec
,
backendFramework
BackendFramework
,
backendFramework
BackendFramework
,
...
@@ -780,9 +782,10 @@ func GenerateBasePodSpec(
...
@@ -780,9 +782,10 @@ func GenerateBasePodSpec(
MountPath
:
*
component
.
PVC
.
MountPoint
,
MountPath
:
*
component
.
PVC
.
MountPoint
,
})
})
}
}
shmVolume
,
shmVolumeMount
:=
generateSharedMemoryVolumeAndMount
(
&
container
.
Resources
)
if
shmVol
,
shmMount
:=
generateSharedMemoryVolumeAndMount
(
component
.
SharedMemory
);
shmVol
!=
nil
&&
shmMount
!=
nil
{
volumes
=
append
(
volumes
,
shmVolume
)
volumes
=
append
(
volumes
,
*
shmVol
)
container
.
VolumeMounts
=
append
(
container
.
VolumeMounts
,
shmVolumeMount
)
container
.
VolumeMounts
=
append
(
container
.
VolumeMounts
,
*
shmMount
)
}
// Apply backend-specific container modifications
// Apply backend-specific container modifications
multinodeDeployer
:=
MultinodeDeployerFactory
(
multinodeDeploymentType
)
multinodeDeployer
:=
MultinodeDeployerFactory
(
multinodeDeploymentType
)
...
@@ -1181,36 +1184,29 @@ func GenerateBasePodSpecForController(
...
@@ -1181,36 +1184,29 @@ func GenerateBasePodSpecForController(
return
podSpec
,
nil
return
podSpec
,
nil
}
}
func
generateSharedMemoryVolumeAndMount
(
resources
*
corev1
.
ResourceRequirements
)
(
corev1
.
Volume
,
corev1
.
VolumeMount
)
{
func
generateSharedMemoryVolumeAndMount
(
spec
*
v1alpha1
.
SharedMemorySpec
)
(
*
corev1
.
Volume
,
*
corev1
.
VolumeMount
)
{
sharedMemorySizeLimit
:=
resource
.
MustParse
(
"512Mi"
)
// default: enabled=true, size=8Gi
// Check if we have memory limits to work with
size
:=
resource
.
MustParse
(
commonconsts
.
DefaultSharedMemorySize
)
memoryLimit
:=
resources
.
Limits
[
corev1
.
ResourceMemory
]
if
spec
!=
nil
{
if
!
memoryLimit
.
IsZero
()
{
if
spec
.
Disabled
{
// Use 1/4 of memory limit
return
nil
,
nil
calculatedSize
:=
resource
.
NewQuantity
(
memoryLimit
.
Value
()
/
4
,
resource
.
BinarySI
)
}
// Apply bounds: minimum 512Mi, maximum 8Gi
if
!
spec
.
Size
.
IsZero
()
{
minSize
:=
resource
.
MustParse
(
"512Mi"
)
size
=
spec
.
Size
maxSize
:=
resource
.
MustParse
(
"8Gi"
)
if
calculatedSize
.
Cmp
(
minSize
)
>
0
&&
calculatedSize
.
Cmp
(
maxSize
)
<
0
{
sharedMemorySizeLimit
=
*
calculatedSize
}
else
if
calculatedSize
.
Cmp
(
maxSize
)
>=
0
{
sharedMemorySizeLimit
=
maxSize
// Cap at maximum
}
}
// If calculatedSize < minSize, keep the 512Mi base
}
}
volume
:=
corev1
.
Volume
{
volume
:=
corev1
.
Volume
{
Name
:
commonconsts
.
KubeValueNameSharedMemory
,
Name
:
commonconsts
.
KubeValueNameSharedMemory
,
VolumeSource
:
corev1
.
VolumeSource
{
VolumeSource
:
corev1
.
VolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
Medium
:
corev1
.
StorageMediumMemory
,
Medium
:
corev1
.
StorageMediumMemory
,
SizeLimit
:
&
s
haredMemorySizeLimit
,
SizeLimit
:
&
s
ize
,
},
},
},
},
}
}
volumeMount
:=
corev1
.
VolumeMount
{
volumeMount
:=
corev1
.
VolumeMount
{
Name
:
commonconsts
.
KubeValueNameSharedMemory
,
Name
:
commonconsts
.
KubeValueNameSharedMemory
,
MountPath
:
"/dev/shm"
,
MountPath
:
commonconsts
.
DefaultSharedMemoryMountPath
,
}
}
return
volume
,
volumeMount
return
&
volume
,
&
volumeMount
}
}
deploy/cloud/operator/internal/dynamo/graph_test.go
View file @
80279ad3
...
@@ -1235,7 +1235,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -1235,7 +1235,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
VolumeSource
:
corev1
.
VolumeSource
{
VolumeSource
:
corev1
.
VolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
Medium
:
corev1
.
StorageMediumMemory
,
Medium
:
corev1
.
StorageMediumMemory
,
SizeLimit
:
resource
.
New
Quantity
(
536870912
,
resource
.
BinarySI
),
SizeLimit
:
func
()
*
resource
.
Quantity
{
q
:=
resource
.
MustParse
(
commonconsts
.
DefaultSharedMemorySize
);
return
&
q
}(
),
},
},
},
},
},
},
...
@@ -1337,7 +1337,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -1337,7 +1337,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
VolumeMounts
:
[]
corev1
.
VolumeMount
{
VolumeMounts
:
[]
corev1
.
VolumeMount
{
{
{
Name
:
"shared-memory"
,
Name
:
"shared-memory"
,
MountPath
:
"/dev/shm"
,
MountPath
:
commonconsts
.
DefaultSharedMemoryMountPath
,
},
},
},
},
Ports
:
[]
corev1
.
ContainerPort
{
Ports
:
[]
corev1
.
ContainerPort
{
...
@@ -1378,7 +1378,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -1378,7 +1378,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
VolumeSource
:
corev1
.
VolumeSource
{
VolumeSource
:
corev1
.
VolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
Medium
:
corev1
.
StorageMediumMemory
,
Medium
:
corev1
.
StorageMediumMemory
,
SizeLimit
:
resource
.
New
Quantity
(
536870912
,
resource
.
BinarySI
),
SizeLimit
:
func
()
*
resource
.
Quantity
{
q
:=
resource
.
MustParse
(
commonconsts
.
DefaultSharedMemorySize
);
return
&
q
}(
),
},
},
},
},
},
},
...
@@ -1471,7 +1471,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -1471,7 +1471,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
},
},
{
{
Name
:
"shared-memory"
,
Name
:
"shared-memory"
,
MountPath
:
"/dev/shm"
,
MountPath
:
commonconsts
.
DefaultSharedMemoryMountPath
,
},
},
},
},
},
},
...
@@ -1733,7 +1733,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -1733,7 +1733,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
VolumeSource
:
corev1
.
VolumeSource
{
VolumeSource
:
corev1
.
VolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
Medium
:
corev1
.
StorageMediumMemory
,
Medium
:
corev1
.
StorageMediumMemory
,
SizeLimit
:
resource
.
New
Quantity
(
512
*
1024
*
1024
,
resource
.
BinarySI
),
SizeLimit
:
func
()
*
resource
.
Quantity
{
q
:=
resource
.
MustParse
(
commonconsts
.
DefaultSharedMemorySize
);
return
&
q
}(
),
},
},
},
},
},
},
...
@@ -1812,7 +1812,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -1812,7 +1812,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
VolumeMounts
:
[]
corev1
.
VolumeMount
{
VolumeMounts
:
[]
corev1
.
VolumeMount
{
{
{
Name
:
commonconsts
.
KubeValueNameSharedMemory
,
Name
:
commonconsts
.
KubeValueNameSharedMemory
,
MountPath
:
"/dev/shm"
,
MountPath
:
commonconsts
.
DefaultSharedMemoryMountPath
,
},
},
},
},
LivenessProbe
:
&
corev1
.
Probe
{
LivenessProbe
:
&
corev1
.
Probe
{
...
@@ -1883,7 +1883,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -1883,7 +1883,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
VolumeSource
:
corev1
.
VolumeSource
{
VolumeSource
:
corev1
.
VolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
Medium
:
corev1
.
StorageMediumMemory
,
Medium
:
corev1
.
StorageMediumMemory
,
SizeLimit
:
resource
.
New
Quantity
(
512
*
1024
*
1024
,
resource
.
BinarySI
),
SizeLimit
:
func
()
*
resource
.
Quantity
{
q
:=
resource
.
MustParse
(
commonconsts
.
DefaultSharedMemorySize
);
return
&
q
}(
),
},
},
},
},
},
},
...
@@ -1962,7 +1962,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -1962,7 +1962,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
VolumeMounts
:
[]
corev1
.
VolumeMount
{
VolumeMounts
:
[]
corev1
.
VolumeMount
{
{
{
Name
:
commonconsts
.
KubeValueNameSharedMemory
,
Name
:
commonconsts
.
KubeValueNameSharedMemory
,
MountPath
:
"/dev/shm"
,
MountPath
:
commonconsts
.
DefaultSharedMemoryMountPath
,
},
},
},
},
},
},
...
@@ -1989,7 +1989,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -1989,7 +1989,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
VolumeSource
:
corev1
.
VolumeSource
{
VolumeSource
:
corev1
.
VolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
Medium
:
corev1
.
StorageMediumMemory
,
Medium
:
corev1
.
StorageMediumMemory
,
SizeLimit
:
resource
.
New
Quantity
(
512
*
1024
*
1024
,
resource
.
BinarySI
),
SizeLimit
:
func
()
*
resource
.
Quantity
{
q
:=
resource
.
MustParse
(
commonconsts
.
DefaultSharedMemorySize
);
return
&
q
}(
),
},
},
},
},
},
},
...
@@ -2098,7 +2098,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -2098,7 +2098,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
VolumeMounts
:
[]
corev1
.
VolumeMount
{
VolumeMounts
:
[]
corev1
.
VolumeMount
{
{
{
Name
:
commonconsts
.
KubeValueNameSharedMemory
,
Name
:
commonconsts
.
KubeValueNameSharedMemory
,
MountPath
:
"/dev/shm"
,
MountPath
:
commonconsts
.
DefaultSharedMemoryMountPath
,
},
},
},
},
},
},
...
@@ -2134,7 +2134,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -2134,7 +2134,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
VolumeSource
:
corev1
.
VolumeSource
{
VolumeSource
:
corev1
.
VolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
Medium
:
corev1
.
StorageMediumMemory
,
Medium
:
corev1
.
StorageMediumMemory
,
SizeLimit
:
resource
.
New
Quantity
(
512
*
1024
*
1024
,
resource
.
BinarySI
),
SizeLimit
:
func
()
*
resource
.
Quantity
{
q
:=
resource
.
MustParse
(
commonconsts
.
DefaultSharedMemorySize
);
return
&
q
}(
),
},
},
},
},
},
},
...
@@ -2225,7 +2225,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -2225,7 +2225,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
},
},
{
{
Name
:
"shared-memory"
,
Name
:
"shared-memory"
,
MountPath
:
"/dev/shm"
,
MountPath
:
commonconsts
.
DefaultSharedMemoryMountPath
,
},
},
},
},
},
},
...
@@ -2509,7 +2509,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -2509,7 +2509,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
VolumeSource
:
corev1
.
VolumeSource
{
VolumeSource
:
corev1
.
VolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
Medium
:
corev1
.
StorageMediumMemory
,
Medium
:
corev1
.
StorageMediumMemory
,
SizeLimit
:
resource
.
New
Quantity
(
512
*
1024
*
1024
,
resource
.
BinarySI
),
SizeLimit
:
func
()
*
resource
.
Quantity
{
q
:=
resource
.
MustParse
(
commonconsts
.
DefaultSharedMemorySize
);
return
&
q
}(
),
},
},
},
},
},
},
...
@@ -2590,7 +2590,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -2590,7 +2590,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
VolumeMounts
:
[]
corev1
.
VolumeMount
{
VolumeMounts
:
[]
corev1
.
VolumeMount
{
{
{
Name
:
commonconsts
.
KubeValueNameSharedMemory
,
Name
:
commonconsts
.
KubeValueNameSharedMemory
,
MountPath
:
"/dev/shm"
,
MountPath
:
commonconsts
.
DefaultSharedMemoryMountPath
,
},
},
},
},
ReadinessProbe
:
&
corev1
.
Probe
{
ReadinessProbe
:
&
corev1
.
Probe
{
...
@@ -2648,7 +2648,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -2648,7 +2648,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
VolumeSource
:
corev1
.
VolumeSource
{
VolumeSource
:
corev1
.
VolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
Medium
:
corev1
.
StorageMediumMemory
,
Medium
:
corev1
.
StorageMediumMemory
,
SizeLimit
:
resource
.
New
Quantity
(
512
*
1024
*
1024
,
resource
.
BinarySI
),
SizeLimit
:
func
()
*
resource
.
Quantity
{
q
:=
resource
.
MustParse
(
commonconsts
.
DefaultSharedMemorySize
);
return
&
q
}(
),
},
},
},
},
},
},
...
@@ -2728,7 +2728,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -2728,7 +2728,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
VolumeMounts
:
[]
corev1
.
VolumeMount
{
VolumeMounts
:
[]
corev1
.
VolumeMount
{
{
{
Name
:
commonconsts
.
KubeValueNameSharedMemory
,
Name
:
commonconsts
.
KubeValueNameSharedMemory
,
MountPath
:
"/dev/shm"
,
MountPath
:
commonconsts
.
DefaultSharedMemoryMountPath
,
},
},
},
},
},
},
...
@@ -2755,7 +2755,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -2755,7 +2755,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
VolumeSource
:
corev1
.
VolumeSource
{
VolumeSource
:
corev1
.
VolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
Medium
:
corev1
.
StorageMediumMemory
,
Medium
:
corev1
.
StorageMediumMemory
,
SizeLimit
:
resource
.
New
Quantity
(
512
*
1024
*
1024
,
resource
.
BinarySI
),
SizeLimit
:
func
()
*
resource
.
Quantity
{
q
:=
resource
.
MustParse
(
commonconsts
.
DefaultSharedMemorySize
);
return
&
q
}(
),
},
},
},
},
},
},
...
@@ -2864,7 +2864,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -2864,7 +2864,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
VolumeMounts
:
[]
corev1
.
VolumeMount
{
VolumeMounts
:
[]
corev1
.
VolumeMount
{
{
{
Name
:
commonconsts
.
KubeValueNameSharedMemory
,
Name
:
commonconsts
.
KubeValueNameSharedMemory
,
MountPath
:
"/dev/shm"
,
MountPath
:
commonconsts
.
DefaultSharedMemoryMountPath
,
},
},
},
},
},
},
...
@@ -2899,7 +2899,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -2899,7 +2899,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
VolumeSource
:
corev1
.
VolumeSource
{
VolumeSource
:
corev1
.
VolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
Medium
:
corev1
.
StorageMediumMemory
,
Medium
:
corev1
.
StorageMediumMemory
,
SizeLimit
:
resource
.
New
Quantity
(
512
*
1024
*
1024
,
resource
.
BinarySI
),
SizeLimit
:
func
()
*
resource
.
Quantity
{
q
:=
resource
.
MustParse
(
commonconsts
.
DefaultSharedMemorySize
);
return
&
q
}(
),
},
},
},
},
},
},
...
@@ -2991,7 +2991,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -2991,7 +2991,7 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
},
},
{
{
Name
:
"shared-memory"
,
Name
:
"shared-memory"
,
MountPath
:
"/dev/shm"
,
MountPath
:
commonconsts
.
DefaultSharedMemoryMountPath
,
},
},
},
},
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment