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
9abe8dff
"ssh:/git@developer.sourcefind.cn:2222/OpenDAS/dynamo.git" did not exist on "6cb76b967a58cd53c2250bf46a22f59c533ecec3"
Unverified
Commit
9abe8dff
authored
May 28, 2025
by
julienmancuso
Committed by
GitHub
May 28, 2025
Browse files
fix: fix operator unit tests (#1227)
parent
07e4720d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
5 deletions
+39
-5
deploy/cloud/operator/internal/controller/dynamocomponentdeployment_controller_test.go
...l/controller/dynamocomponentdeployment_controller_test.go
+39
-5
No files found.
deploy/cloud/operator/internal/controller/dynamocomponentdeployment_controller_test.go
View file @
9abe8dff
...
@@ -38,6 +38,7 @@ import (
...
@@ -38,6 +38,7 @@ import (
networkingv1
"k8s.io/api/networking/v1"
networkingv1
"k8s.io/api/networking/v1"
"k8s.io/apimachinery/pkg/api/resource"
"k8s.io/apimachinery/pkg/api/resource"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/tools/record"
"k8s.io/client-go/tools/record"
"k8s.io/utils/ptr"
"k8s.io/utils/ptr"
...
@@ -933,7 +934,7 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
...
@@ -933,7 +934,7 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
Name
:
"main"
,
Name
:
"main"
,
Image
:
"test-image:latest"
,
Image
:
"test-image:latest"
,
Command
:
[]
string
{
"sh"
,
"-c"
},
Command
:
[]
string
{
"sh"
,
"-c"
},
Args
:
[]
string
{
"ray start --head --port=6379 && cd src && uv run dynamo serve --service-name test-lws-deploy-service test-tag --test-lws-deploy-service.ServiceArgs.dynamo.namespace=default --test-lws-deploy-service.environment=kubernetes"
},
Args
:
[]
string
{
"ray start --head --port=6379 && cd src && uv run dynamo serve
--system-app-port 5000 --enable-system-app --use-default-health-checks
--service-name test-lws-deploy-service test-tag --test-lws-deploy-service.ServiceArgs.dynamo.namespace=default --test-lws-deploy-service.environment=kubernetes"
},
Env
:
[]
corev1
.
EnvVar
{{
Name
:
"DYNAMO_PORT"
,
Value
:
"3000"
}},
Env
:
[]
corev1
.
EnvVar
{{
Name
:
"DYNAMO_PORT"
,
Value
:
"3000"
}},
VolumeMounts
:
[]
corev1
.
VolumeMount
{
VolumeMounts
:
[]
corev1
.
VolumeMount
{
{
{
...
@@ -942,7 +943,10 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
...
@@ -942,7 +943,10 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
},
},
Ports
:
[]
corev1
.
ContainerPort
{
Ports
:
[]
corev1
.
ContainerPort
{
{
{
Protocol
:
corev1
.
ProtocolTCP
,
Name
:
"http"
,
ContainerPort
:
3000
,
Protocol
:
corev1
.
ProtocolTCP
,
Name
:
commonconsts
.
DynamoServicePortName
,
ContainerPort
:
commonconsts
.
DynamoServicePort
,
},
{
Protocol
:
corev1
.
ProtocolTCP
,
Name
:
commonconsts
.
DynamoHealthPortName
,
ContainerPort
:
commonconsts
.
DynamoHealthPort
,
},
},
},
},
TTY
:
true
,
TTY
:
true
,
...
@@ -958,6 +962,20 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
...
@@ -958,6 +962,20 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
"nvidia.com/gpu"
:
resource
.
MustParse
(
"1"
),
"nvidia.com/gpu"
:
resource
.
MustParse
(
"1"
),
},
},
},
},
LivenessProbe
:
&
corev1
.
Probe
{
ProbeHandler
:
corev1
.
ProbeHandler
{
HTTPGet
:
&
corev1
.
HTTPGetAction
{
Path
:
"/healthz"
,
Port
:
intstr
.
FromString
(
commonconsts
.
DynamoHealthPortName
),
},
},
},
ReadinessProbe
:
&
corev1
.
Probe
{
ProbeHandler
:
corev1
.
ProbeHandler
{
HTTPGet
:
&
corev1
.
HTTPGetAction
{
Path
:
"/readyz"
,
Port
:
intstr
.
FromString
(
commonconsts
.
DynamoHealthPortName
),
},
},
},
},
},
},
},
Volumes
:
[]
corev1
.
Volume
{{
Name
:
"shared-memory"
,
VolumeSource
:
corev1
.
VolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
Medium
:
corev1
.
StorageMediumMemory
,
SizeLimit
:
limit
}}}},
Volumes
:
[]
corev1
.
Volume
{{
Name
:
"shared-memory"
,
VolumeSource
:
corev1
.
VolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
Medium
:
corev1
.
StorageMediumMemory
,
SizeLimit
:
limit
}}}},
...
@@ -987,13 +1005,29 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
...
@@ -987,13 +1005,29 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
Args
:
[]
string
{
"ray start --address=$(LWS_LEADER_ADDRESS):6379 --block"
},
Args
:
[]
string
{
"ray start --address=$(LWS_LEADER_ADDRESS):6379 --block"
},
Env
:
[]
corev1
.
EnvVar
{{
Name
:
"DYNAMO_PORT"
,
Value
:
"3000"
}},
Env
:
[]
corev1
.
EnvVar
{{
Name
:
"DYNAMO_PORT"
,
Value
:
"3000"
}},
VolumeMounts
:
[]
corev1
.
VolumeMount
{{
Name
:
"shared-memory"
,
MountPath
:
"/dev/shm"
}},
VolumeMounts
:
[]
corev1
.
VolumeMount
{{
Name
:
"shared-memory"
,
MountPath
:
"/dev/shm"
}},
Ports
:
[]
corev1
.
ContainerPort
{{
Protocol
:
corev1
.
ProtocolTCP
,
Name
:
"http"
,
ContainerPort
:
3000
}},
Ports
:
[]
corev1
.
ContainerPort
{{
Protocol
:
corev1
.
ProtocolTCP
,
Name
:
commonconsts
.
DynamoServicePortName
,
ContainerPort
:
commonconsts
.
DynamoServicePort
},
{
Protocol
:
corev1
.
ProtocolTCP
,
Name
:
commonconsts
.
DynamoHealthPortName
,
ContainerPort
:
commonconsts
.
DynamoHealthPort
,
}},
TTY
:
true
,
TTY
:
true
,
Stdin
:
true
,
Stdin
:
true
,
Resources
:
corev1
.
ResourceRequirements
{
Resources
:
corev1
.
ResourceRequirements
{
Requests
:
corev1
.
ResourceList
{
corev1
.
ResourceCPU
:
resource
.
MustParse
(
"300m"
),
corev1
.
ResourceMemory
:
resource
.
MustParse
(
"500Mi"
)},
Requests
:
corev1
.
ResourceList
{
corev1
.
ResourceCPU
:
resource
.
MustParse
(
"300m"
),
corev1
.
ResourceMemory
:
resource
.
MustParse
(
"500Mi"
)},
Limits
:
corev1
.
ResourceList
{
corev1
.
ResourceCPU
:
resource
.
MustParse
(
"500m"
),
corev1
.
ResourceMemory
:
resource
.
MustParse
(
"1Gi"
),
"nvidia.com/gpu"
:
resource
.
MustParse
(
"1"
)},
Limits
:
corev1
.
ResourceList
{
corev1
.
ResourceCPU
:
resource
.
MustParse
(
"500m"
),
corev1
.
ResourceMemory
:
resource
.
MustParse
(
"1Gi"
),
"nvidia.com/gpu"
:
resource
.
MustParse
(
"1"
)},
},
},
LivenessProbe
:
&
corev1
.
Probe
{
ProbeHandler
:
corev1
.
ProbeHandler
{
HTTPGet
:
&
corev1
.
HTTPGetAction
{
Path
:
"/healthz"
,
Port
:
intstr
.
FromString
(
commonconsts
.
DynamoHealthPortName
),
},
},
},
ReadinessProbe
:
&
corev1
.
Probe
{
ProbeHandler
:
corev1
.
ProbeHandler
{
HTTPGet
:
&
corev1
.
HTTPGetAction
{
Path
:
"/readyz"
,
Port
:
intstr
.
FromString
(
commonconsts
.
DynamoHealthPortName
),
},
},
},
},
},
},
},
Volumes
:
[]
corev1
.
Volume
{{
Name
:
"shared-memory"
,
VolumeSource
:
corev1
.
VolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
Medium
:
corev1
.
StorageMediumMemory
,
SizeLimit
:
limit
}}}},
Volumes
:
[]
corev1
.
Volume
{{
Name
:
"shared-memory"
,
VolumeSource
:
corev1
.
VolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
Medium
:
corev1
.
StorageMediumMemory
,
SizeLimit
:
limit
}}}},
...
...
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