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
6f8ce176
Unverified
Commit
6f8ce176
authored
Aug 26, 2025
by
mohammedabdulwahhab
Committed by
GitHub
Aug 27, 2025
Browse files
fix: add label to persist DGD name on downstream pods (#2729)
parent
490cdc18
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
118 additions
and
80 deletions
+118
-80
deploy/cloud/operator/internal/consts/consts.go
deploy/cloud/operator/internal/consts/consts.go
+1
-0
deploy/cloud/operator/internal/controller/dynamocomponentdeployment_controller.go
...ternal/controller/dynamocomponentdeployment_controller.go
+3
-0
deploy/cloud/operator/internal/controller/dynamocomponentdeployment_controller_test.go
...l/controller/dynamocomponentdeployment_controller_test.go
+4
-2
deploy/cloud/operator/internal/dynamo/graph.go
deploy/cloud/operator/internal/dynamo/graph.go
+2
-0
deploy/cloud/operator/internal/dynamo/graph_test.go
deploy/cloud/operator/internal/dynamo/graph_test.go
+108
-78
No files found.
deploy/cloud/operator/internal/consts/consts.go
View file @
6f8ce176
...
@@ -23,6 +23,7 @@ const (
...
@@ -23,6 +23,7 @@ const (
KubeAnnotationEnableGrove
=
"nvidia.com/enable-grove"
KubeAnnotationEnableGrove
=
"nvidia.com/enable-grove"
KubeLabelDynamoGraphDeploymentName
=
"nvidia.com/dynamo-graph-deployment-name"
KubeLabelDynamoComponent
=
"nvidia.com/dynamo-component"
KubeLabelDynamoComponent
=
"nvidia.com/dynamo-component"
KubeLabelDynamoNamespace
=
"nvidia.com/dynamo-namespace"
KubeLabelDynamoNamespace
=
"nvidia.com/dynamo-namespace"
KubeLabelDynamoDeploymentTargetType
=
"nvidia.com/dynamo-deployment-target-type"
KubeLabelDynamoDeploymentTargetType
=
"nvidia.com/dynamo-deployment-target-type"
...
...
deploy/cloud/operator/internal/controller/dynamocomponentdeployment_controller.go
View file @
6f8ce176
...
@@ -1146,6 +1146,9 @@ func (r *DynamoComponentDeploymentReconciler) generatePodTemplateSpec(ctx contex
...
@@ -1146,6 +1146,9 @@ func (r *DynamoComponentDeploymentReconciler) generatePodTemplateSpec(ctx contex
podLabels
[
commonconsts
.
KubeLabelMetricsEnabled
]
=
commonconsts
.
KubeLabelValueTrue
podLabels
[
commonconsts
.
KubeLabelMetricsEnabled
]
=
commonconsts
.
KubeLabelValueTrue
}
}
// Add label for the dynamo graph deployment on the pods themselves
podLabels
[
commonconsts
.
KubeLabelDynamoGraphDeploymentName
]
=
opt
.
dynamoComponentDeployment
.
Spec
.
Labels
[
commonconsts
.
KubeLabelDynamoGraphDeploymentName
]
// Add component type label if specified
// Add component type label if specified
if
opt
.
dynamoComponentDeployment
.
Spec
.
ComponentType
!=
""
{
if
opt
.
dynamoComponentDeployment
.
Spec
.
ComponentType
!=
""
{
podLabels
[
commonconsts
.
KubeLabelDynamoComponentType
]
=
opt
.
dynamoComponentDeployment
.
Spec
.
ComponentType
podLabels
[
commonconsts
.
KubeLabelDynamoComponentType
]
=
opt
.
dynamoComponentDeployment
.
Spec
.
ComponentType
...
...
deploy/cloud/operator/internal/controller/dynamocomponentdeployment_controller_test.go
View file @
6f8ce176
...
@@ -782,7 +782,8 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
...
@@ -782,7 +782,8 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
"role"
:
"leader"
,
"role"
:
"leader"
,
"nvidia.com/label1"
:
"label1"
,
"nvidia.com/label1"
:
"label1"
,
commonconsts
.
KubeLabelDynamoComponentType
:
commonconsts
.
ComponentTypeWorker
,
commonconsts
.
KubeLabelDynamoComponentType
:
commonconsts
.
ComponentTypeWorker
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
""
,
},
},
Annotations
:
map
[
string
]
string
{
Annotations
:
map
[
string
]
string
{
"scheduling.k8s.io/group-name"
:
"test-lws-deploy-0"
,
"scheduling.k8s.io/group-name"
:
"test-lws-deploy-0"
,
...
@@ -891,7 +892,8 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
...
@@ -891,7 +892,8 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
"role"
:
"worker"
,
"role"
:
"worker"
,
"nvidia.com/label1"
:
"label1"
,
"nvidia.com/label1"
:
"label1"
,
commonconsts
.
KubeLabelDynamoComponentType
:
commonconsts
.
ComponentTypeWorker
,
commonconsts
.
KubeLabelDynamoComponentType
:
commonconsts
.
ComponentTypeWorker
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
""
,
},
},
Annotations
:
map
[
string
]
string
{
Annotations
:
map
[
string
]
string
{
"scheduling.k8s.io/group-name"
:
"test-lws-deploy-0"
,
"scheduling.k8s.io/group-name"
:
"test-lws-deploy-0"
,
...
...
deploy/cloud/operator/internal/dynamo/graph.go
View file @
6f8ce176
...
@@ -138,6 +138,7 @@ func GenerateDynamoComponentsDeployments(ctx context.Context, parentDynamoGraphD
...
@@ -138,6 +138,7 @@ func GenerateDynamoComponentsDeployments(ctx context.Context, parentDynamoGraphD
deployment
.
Labels
=
labels
deployment
.
Labels
=
labels
labels
[
commonconsts
.
KubeLabelDynamoComponent
]
=
componentName
labels
[
commonconsts
.
KubeLabelDynamoComponent
]
=
componentName
labels
[
commonconsts
.
KubeLabelDynamoNamespace
]
=
graphDynamoNamespace
labels
[
commonconsts
.
KubeLabelDynamoNamespace
]
=
graphDynamoNamespace
labels
[
commonconsts
.
KubeLabelDynamoGraphDeploymentName
]
=
parentDynamoGraphDeployment
.
Name
// Propagate metrics annotation from parent deployment if present
// Propagate metrics annotation from parent deployment if present
if
parentDynamoGraphDeployment
.
Annotations
!=
nil
{
if
parentDynamoGraphDeployment
.
Annotations
!=
nil
{
...
@@ -960,6 +961,7 @@ func GenerateGrovePodGangSet(
...
@@ -960,6 +961,7 @@ func GenerateGrovePodGangSet(
func
generateLabels
(
component
*
v1alpha1
.
DynamoComponentDeploymentOverridesSpec
,
dynamoDeployment
*
v1alpha1
.
DynamoGraphDeployment
,
componentName
string
)
(
map
[
string
]
string
,
error
)
{
func
generateLabels
(
component
*
v1alpha1
.
DynamoComponentDeploymentOverridesSpec
,
dynamoDeployment
*
v1alpha1
.
DynamoGraphDeployment
,
componentName
string
)
(
map
[
string
]
string
,
error
)
{
labels
:=
make
(
map
[
string
]
string
)
labels
:=
make
(
map
[
string
]
string
)
labels
[
commonconsts
.
KubeLabelDynamoSelector
]
=
GetDynamoComponentName
(
dynamoDeployment
,
componentName
)
labels
[
commonconsts
.
KubeLabelDynamoSelector
]
=
GetDynamoComponentName
(
dynamoDeployment
,
componentName
)
labels
[
commonconsts
.
KubeLabelDynamoGraphDeploymentName
]
=
dynamoDeployment
.
Name
if
component
.
ComponentType
!=
""
{
if
component
.
ComponentType
!=
""
{
labels
[
commonconsts
.
KubeLabelDynamoComponentType
]
=
component
.
ComponentType
labels
[
commonconsts
.
KubeLabelDynamoComponentType
]
=
component
.
ComponentType
}
}
...
...
deploy/cloud/operator/internal/dynamo/graph_test.go
View file @
6f8ce176
...
@@ -99,8 +99,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
...
@@ -99,8 +99,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
Name
:
"test-dynamographdeployment-service1"
,
Name
:
"test-dynamographdeployment-service1"
,
Namespace
:
"default"
,
Namespace
:
"default"
,
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponent
:
"service1"
,
commonconsts
.
KubeLabelDynamoComponent
:
"service1"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"default"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"default"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamographdeployment"
,
},
},
},
},
Spec
:
v1alpha1
.
DynamoComponentDeploymentSpec
{
Spec
:
v1alpha1
.
DynamoComponentDeploymentSpec
{
...
@@ -118,8 +119,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
...
@@ -118,8 +119,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
},
},
},
},
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponent
:
"service1"
,
commonconsts
.
KubeLabelDynamoComponent
:
"service1"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"default"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"default"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamographdeployment"
,
},
},
Autoscaling
:
nil
,
Autoscaling
:
nil
,
},
},
...
@@ -130,8 +132,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
...
@@ -130,8 +132,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
Name
:
"test-dynamographdeployment-service2"
,
Name
:
"test-dynamographdeployment-service2"
,
Namespace
:
"default"
,
Namespace
:
"default"
,
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponent
:
"service2"
,
commonconsts
.
KubeLabelDynamoComponent
:
"service2"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"default"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"default"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamographdeployment"
,
},
},
},
},
Spec
:
v1alpha1
.
DynamoComponentDeploymentSpec
{
Spec
:
v1alpha1
.
DynamoComponentDeploymentSpec
{
...
@@ -140,8 +143,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
...
@@ -140,8 +143,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
DynamoNamespace
:
&
[]
string
{
"default"
}[
0
],
DynamoNamespace
:
&
[]
string
{
"default"
}[
0
],
Replicas
:
&
[]
int32
{
3
}[
0
],
Replicas
:
&
[]
int32
{
3
}[
0
],
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponent
:
"service2"
,
commonconsts
.
KubeLabelDynamoComponent
:
"service2"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"default"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"default"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamographdeployment"
,
},
},
Resources
:
&
common
.
Resources
{
Resources
:
&
common
.
Resources
{
Requests
:
&
common
.
ResourceItem
{
Requests
:
&
common
.
ResourceItem
{
...
@@ -207,8 +211,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
...
@@ -207,8 +211,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
Name
:
"test-dynamographdeployment-service1"
,
Name
:
"test-dynamographdeployment-service1"
,
Namespace
:
"default"
,
Namespace
:
"default"
,
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponent
:
"service1"
,
commonconsts
.
KubeLabelDynamoComponent
:
"service1"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamographdeployment"
,
},
},
},
},
Spec
:
v1alpha1
.
DynamoComponentDeploymentSpec
{
Spec
:
v1alpha1
.
DynamoComponentDeploymentSpec
{
...
@@ -226,8 +231,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
...
@@ -226,8 +231,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
},
},
},
},
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponent
:
"service1"
,
commonconsts
.
KubeLabelDynamoComponent
:
"service1"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamographdeployment"
,
},
},
Autoscaling
:
nil
,
Autoscaling
:
nil
,
},
},
...
@@ -238,8 +244,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
...
@@ -238,8 +244,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
Name
:
"test-dynamographdeployment-service2"
,
Name
:
"test-dynamographdeployment-service2"
,
Namespace
:
"default"
,
Namespace
:
"default"
,
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponent
:
"service2"
,
commonconsts
.
KubeLabelDynamoComponent
:
"service2"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamographdeployment"
,
},
},
},
},
Spec
:
v1alpha1
.
DynamoComponentDeploymentSpec
{
Spec
:
v1alpha1
.
DynamoComponentDeploymentSpec
{
...
@@ -248,8 +255,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
...
@@ -248,8 +255,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
DynamoNamespace
:
&
[]
string
{
"dynamo-test-dynamographdeployment"
}[
0
],
DynamoNamespace
:
&
[]
string
{
"dynamo-test-dynamographdeployment"
}[
0
],
Replicas
:
&
[]
int32
{
3
}[
0
],
Replicas
:
&
[]
int32
{
3
}[
0
],
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponent
:
"service2"
,
commonconsts
.
KubeLabelDynamoComponent
:
"service2"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamographdeployment"
,
},
},
Resources
:
&
common
.
Resources
{
Resources
:
&
common
.
Resources
{
Requests
:
&
common
.
ResourceItem
{
Requests
:
&
common
.
ResourceItem
{
...
@@ -365,8 +373,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
...
@@ -365,8 +373,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
Name
:
"test-dynamographdeployment-service1"
,
Name
:
"test-dynamographdeployment-service1"
,
Namespace
:
"default"
,
Namespace
:
"default"
,
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponent
:
"service1"
,
commonconsts
.
KubeLabelDynamoComponent
:
"service1"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamographdeployment"
,
},
},
},
},
Spec
:
v1alpha1
.
DynamoComponentDeploymentSpec
{
Spec
:
v1alpha1
.
DynamoComponentDeploymentSpec
{
...
@@ -384,8 +393,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
...
@@ -384,8 +393,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
},
},
},
},
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponent
:
"service1"
,
commonconsts
.
KubeLabelDynamoComponent
:
"service1"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamographdeployment"
,
},
},
Autoscaling
:
nil
,
Autoscaling
:
nil
,
Ingress
:
&
v1alpha1
.
IngressSpec
{
Ingress
:
&
v1alpha1
.
IngressSpec
{
...
@@ -400,8 +410,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
...
@@ -400,8 +410,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
Name
:
"test-dynamographdeployment-service2"
,
Name
:
"test-dynamographdeployment-service2"
,
Namespace
:
"default"
,
Namespace
:
"default"
,
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponent
:
"service2"
,
commonconsts
.
KubeLabelDynamoComponent
:
"service2"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamographdeployment"
,
},
},
},
},
Spec
:
v1alpha1
.
DynamoComponentDeploymentSpec
{
Spec
:
v1alpha1
.
DynamoComponentDeploymentSpec
{
...
@@ -410,8 +421,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
...
@@ -410,8 +421,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
DynamoNamespace
:
&
[]
string
{
"dynamo-test-dynamographdeployment"
}[
0
],
DynamoNamespace
:
&
[]
string
{
"dynamo-test-dynamographdeployment"
}[
0
],
Replicas
:
&
[]
int32
{
3
}[
0
],
Replicas
:
&
[]
int32
{
3
}[
0
],
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponent
:
"service2"
,
commonconsts
.
KubeLabelDynamoComponent
:
"service2"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamographdeployment"
,
},
},
Resources
:
&
common
.
Resources
{
Resources
:
&
common
.
Resources
{
Requests
:
&
common
.
ResourceItem
{
Requests
:
&
common
.
ResourceItem
{
...
@@ -483,8 +495,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
...
@@ -483,8 +495,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
Name
:
"test-dynamographdeployment-service1"
,
Name
:
"test-dynamographdeployment-service1"
,
Namespace
:
"default"
,
Namespace
:
"default"
,
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponent
:
"service1"
,
commonconsts
.
KubeLabelDynamoComponent
:
"service1"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamographdeployment"
,
},
},
},
},
Spec
:
v1alpha1
.
DynamoComponentDeploymentSpec
{
Spec
:
v1alpha1
.
DynamoComponentDeploymentSpec
{
...
@@ -508,8 +521,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
...
@@ -508,8 +521,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
},
},
},
},
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponent
:
"service1"
,
commonconsts
.
KubeLabelDynamoComponent
:
"service1"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamographdeployment"
,
},
},
Autoscaling
:
nil
,
Autoscaling
:
nil
,
Envs
:
[]
corev1
.
EnvVar
{
Envs
:
[]
corev1
.
EnvVar
{
...
@@ -526,8 +540,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
...
@@ -526,8 +540,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
Name
:
"test-dynamographdeployment-service2"
,
Name
:
"test-dynamographdeployment-service2"
,
Namespace
:
"default"
,
Namespace
:
"default"
,
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponent
:
"service2"
,
commonconsts
.
KubeLabelDynamoComponent
:
"service2"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamographdeployment"
,
},
},
},
},
Spec
:
v1alpha1
.
DynamoComponentDeploymentSpec
{
Spec
:
v1alpha1
.
DynamoComponentDeploymentSpec
{
...
@@ -536,8 +551,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
...
@@ -536,8 +551,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
DynamoNamespace
:
&
[]
string
{
"dynamo-test-dynamographdeployment"
}[
0
],
DynamoNamespace
:
&
[]
string
{
"dynamo-test-dynamographdeployment"
}[
0
],
Replicas
:
&
[]
int32
{
3
}[
0
],
Replicas
:
&
[]
int32
{
3
}[
0
],
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponent
:
"service2"
,
commonconsts
.
KubeLabelDynamoComponent
:
"service2"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"dynamo-test-dynamographdeployment"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamographdeployment"
,
},
},
Resources
:
&
common
.
Resources
{
Resources
:
&
common
.
Resources
{
Requests
:
&
common
.
ResourceItem
{
Requests
:
&
common
.
ResourceItem
{
...
@@ -616,8 +632,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
...
@@ -616,8 +632,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
Name
:
"test-dynamographdeployment-service1"
,
Name
:
"test-dynamographdeployment-service1"
,
Namespace
:
"default"
,
Namespace
:
"default"
,
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponent
:
"service1"
,
commonconsts
.
KubeLabelDynamoComponent
:
"service1"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"default"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"default"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamographdeployment"
,
},
},
},
},
Spec
:
v1alpha1
.
DynamoComponentDeploymentSpec
{
Spec
:
v1alpha1
.
DynamoComponentDeploymentSpec
{
...
@@ -636,8 +653,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
...
@@ -636,8 +653,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
},
},
},
},
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponent
:
"service1"
,
commonconsts
.
KubeLabelDynamoComponent
:
"service1"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"default"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"default"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamographdeployment"
,
},
},
Autoscaling
:
nil
,
Autoscaling
:
nil
,
ExtraPodSpec
:
&
common
.
ExtraPodSpec
{
ExtraPodSpec
:
&
common
.
ExtraPodSpec
{
...
@@ -654,8 +672,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
...
@@ -654,8 +672,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
Name
:
"test-dynamographdeployment-service2"
,
Name
:
"test-dynamographdeployment-service2"
,
Namespace
:
"default"
,
Namespace
:
"default"
,
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponent
:
"service2"
,
commonconsts
.
KubeLabelDynamoComponent
:
"service2"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"default"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"default"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamographdeployment"
,
},
},
},
},
Spec
:
v1alpha1
.
DynamoComponentDeploymentSpec
{
Spec
:
v1alpha1
.
DynamoComponentDeploymentSpec
{
...
@@ -665,8 +684,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
...
@@ -665,8 +684,9 @@ func TestGenerateDynamoComponentsDeployments(t *testing.T) {
DynamoNamespace
:
&
[]
string
{
"default"
}[
0
],
DynamoNamespace
:
&
[]
string
{
"default"
}[
0
],
Replicas
:
&
[]
int32
{
3
}[
0
],
Replicas
:
&
[]
int32
{
3
}[
0
],
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponent
:
"service2"
,
commonconsts
.
KubeLabelDynamoComponent
:
"service2"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"default"
,
commonconsts
.
KubeLabelDynamoNamespace
:
"default"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamographdeployment"
,
},
},
Resources
:
&
common
.
Resources
{
Resources
:
&
common
.
Resources
{
Requests
:
&
common
.
ResourceItem
{
Requests
:
&
common
.
ResourceItem
{
...
@@ -1214,11 +1234,12 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -1214,11 +1234,12 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
{
{
Name
:
"frontend"
,
Name
:
"frontend"
,
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoSelector
:
"test-dynamo-graph-deployment-frontend"
,
commonconsts
.
KubeLabelDynamoSelector
:
"test-dynamo-graph-deployment-frontend"
,
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
commonconsts
.
KubeLabelDynamoComponentType
:
commonconsts
.
ComponentTypeFrontend
,
commonconsts
.
KubeLabelDynamoComponentType
:
commonconsts
.
ComponentTypeFrontend
,
"nvidia.com/label1"
:
"label1"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamo-graph-deployment"
,
"nvidia.com/label2"
:
"label2"
,
"nvidia.com/label1"
:
"label1"
,
"nvidia.com/label2"
:
"label2"
,
},
},
Annotations
:
map
[
string
]
string
{
Annotations
:
map
[
string
]
string
{
"nvidia.com/annotation1"
:
"annotation1"
,
"nvidia.com/annotation1"
:
"annotation1"
,
...
@@ -1355,8 +1376,9 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -1355,8 +1376,9 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
{
{
Name
:
"planner"
,
Name
:
"planner"
,
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
commonconsts
.
KubeLabelDynamoSelector
:
"test-dynamo-graph-deployment-planner"
,
commonconsts
.
KubeLabelDynamoSelector
:
"test-dynamo-graph-deployment-planner"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamo-graph-deployment"
,
},
},
Annotations
:
map
[
string
]
string
{},
Annotations
:
map
[
string
]
string
{},
Spec
:
grovev1alpha1
.
PodCliqueSpec
{
Spec
:
grovev1alpha1
.
PodCliqueSpec
{
...
@@ -1710,11 +1732,12 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -1710,11 +1732,12 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
{
{
Name
:
"worker-ldr"
,
Name
:
"worker-ldr"
,
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponentType
:
commonconsts
.
ComponentTypeWorker
,
commonconsts
.
KubeLabelDynamoComponentType
:
commonconsts
.
ComponentTypeWorker
,
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
commonconsts
.
KubeLabelDynamoSelector
:
"test-dynamo-graph-deployment-worker-ldr"
,
commonconsts
.
KubeLabelDynamoSelector
:
"test-dynamo-graph-deployment-worker-ldr"
,
"nvidia.com/label1"
:
"label1"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamo-graph-deployment"
,
"nvidia.com/label2"
:
"label2"
,
"nvidia.com/label1"
:
"label1"
,
"nvidia.com/label2"
:
"label2"
,
},
},
Annotations
:
map
[
string
]
string
{
Annotations
:
map
[
string
]
string
{
"nvidia.com/annotation1"
:
"annotation1"
,
"nvidia.com/annotation1"
:
"annotation1"
,
...
@@ -1859,11 +1882,12 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -1859,11 +1882,12 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
{
{
Name
:
"worker-wkr"
,
Name
:
"worker-wkr"
,
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponentType
:
commonconsts
.
ComponentTypeWorker
,
commonconsts
.
KubeLabelDynamoComponentType
:
commonconsts
.
ComponentTypeWorker
,
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
commonconsts
.
KubeLabelDynamoSelector
:
"test-dynamo-graph-deployment-worker-wkr"
,
commonconsts
.
KubeLabelDynamoSelector
:
"test-dynamo-graph-deployment-worker-wkr"
,
"nvidia.com/label1"
:
"label1"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamo-graph-deployment"
,
"nvidia.com/label2"
:
"label2"
,
"nvidia.com/label1"
:
"label1"
,
"nvidia.com/label2"
:
"label2"
,
},
},
Annotations
:
map
[
string
]
string
{
Annotations
:
map
[
string
]
string
{
"nvidia.com/annotation1"
:
"annotation1"
,
"nvidia.com/annotation1"
:
"annotation1"
,
...
@@ -1973,9 +1997,10 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -1973,9 +1997,10 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
{
{
Name
:
"frontend"
,
Name
:
"frontend"
,
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
commonconsts
.
KubeLabelDynamoSelector
:
"test-dynamo-graph-deployment-frontend"
,
commonconsts
.
KubeLabelDynamoSelector
:
"test-dynamo-graph-deployment-frontend"
,
commonconsts
.
KubeLabelDynamoComponentType
:
commonconsts
.
ComponentTypeFrontend
,
commonconsts
.
KubeLabelDynamoComponentType
:
commonconsts
.
ComponentTypeFrontend
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamo-graph-deployment"
,
},
},
Annotations
:
map
[
string
]
string
{},
Annotations
:
map
[
string
]
string
{},
Spec
:
grovev1alpha1
.
PodCliqueSpec
{
Spec
:
grovev1alpha1
.
PodCliqueSpec
{
...
@@ -2109,8 +2134,9 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -2109,8 +2134,9 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
{
{
Name
:
"planner"
,
Name
:
"planner"
,
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoSelector
:
"test-dynamo-graph-deployment-planner"
,
commonconsts
.
KubeLabelDynamoSelector
:
"test-dynamo-graph-deployment-planner"
,
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamo-graph-deployment"
,
},
},
Annotations
:
map
[
string
]
string
{},
Annotations
:
map
[
string
]
string
{},
Spec
:
grovev1alpha1
.
PodCliqueSpec
{
Spec
:
grovev1alpha1
.
PodCliqueSpec
{
...
@@ -2488,11 +2514,12 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -2488,11 +2514,12 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
{
{
Name
:
"worker-ldr"
,
Name
:
"worker-ldr"
,
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoSelector
:
"test-dynamo-graph-deployment-worker-ldr"
,
commonconsts
.
KubeLabelDynamoSelector
:
"test-dynamo-graph-deployment-worker-ldr"
,
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
commonconsts
.
KubeLabelDynamoComponentType
:
commonconsts
.
ComponentTypeWorker
,
commonconsts
.
KubeLabelDynamoComponentType
:
commonconsts
.
ComponentTypeWorker
,
"nvidia.com/label1"
:
"label1"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamo-graph-deployment"
,
"nvidia.com/label2"
:
"label2"
,
"nvidia.com/label1"
:
"label1"
,
"nvidia.com/label2"
:
"label2"
,
},
},
Annotations
:
map
[
string
]
string
{
Annotations
:
map
[
string
]
string
{
"nvidia.com/annotation1"
:
"annotation1"
,
"nvidia.com/annotation1"
:
"annotation1"
,
...
@@ -2625,11 +2652,12 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -2625,11 +2652,12 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
{
{
Name
:
"worker-wkr"
,
Name
:
"worker-wkr"
,
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponentType
:
commonconsts
.
ComponentTypeWorker
,
commonconsts
.
KubeLabelDynamoComponentType
:
commonconsts
.
ComponentTypeWorker
,
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
commonconsts
.
KubeLabelDynamoSelector
:
"test-dynamo-graph-deployment-worker-wkr"
,
commonconsts
.
KubeLabelDynamoSelector
:
"test-dynamo-graph-deployment-worker-wkr"
,
"nvidia.com/label1"
:
"label1"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamo-graph-deployment"
,
"nvidia.com/label2"
:
"label2"
,
"nvidia.com/label1"
:
"label1"
,
"nvidia.com/label2"
:
"label2"
,
},
},
Annotations
:
map
[
string
]
string
{
Annotations
:
map
[
string
]
string
{
"nvidia.com/annotation1"
:
"annotation1"
,
"nvidia.com/annotation1"
:
"annotation1"
,
...
@@ -2739,9 +2767,10 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -2739,9 +2767,10 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
{
{
Name
:
"frontend"
,
Name
:
"frontend"
,
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelDynamoComponentType
:
commonconsts
.
ComponentTypeFrontend
,
commonconsts
.
KubeLabelDynamoComponentType
:
commonconsts
.
ComponentTypeFrontend
,
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
commonconsts
.
KubeLabelDynamoSelector
:
"test-dynamo-graph-deployment-frontend"
,
commonconsts
.
KubeLabelDynamoSelector
:
"test-dynamo-graph-deployment-frontend"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamo-graph-deployment"
,
},
},
Annotations
:
map
[
string
]
string
{},
Annotations
:
map
[
string
]
string
{},
Spec
:
grovev1alpha1
.
PodCliqueSpec
{
Spec
:
grovev1alpha1
.
PodCliqueSpec
{
...
@@ -2875,8 +2904,9 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
...
@@ -2875,8 +2904,9 @@ func TestGenerateGrovePodGangSet(t *testing.T) {
{
{
Name
:
"planner"
,
Name
:
"planner"
,
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
commonconsts
.
KubeLabelMetricsEnabled
:
commonconsts
.
KubeLabelValueTrue
,
commonconsts
.
KubeLabelDynamoSelector
:
"test-dynamo-graph-deployment-planner"
,
commonconsts
.
KubeLabelDynamoSelector
:
"test-dynamo-graph-deployment-planner"
,
commonconsts
.
KubeLabelDynamoGraphDeploymentName
:
"test-dynamo-graph-deployment"
,
},
},
Annotations
:
map
[
string
]
string
{},
Annotations
:
map
[
string
]
string
{},
Spec
:
grovev1alpha1
.
PodCliqueSpec
{
Spec
:
grovev1alpha1
.
PodCliqueSpec
{
...
@@ -4493,7 +4523,7 @@ func TestGenerateBasePodSpec_Worker(t *testing.T) {
...
@@ -4493,7 +4523,7 @@ func TestGenerateBasePodSpec_Worker(t *testing.T) {
VolumeSource
:
corev1
.
VolumeSource
{
VolumeSource
:
corev1
.
VolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
EmptyDir
:
&
corev1
.
EmptyDirVolumeSource
{
Medium
:
corev1
.
StorageMediumMemory
,
Medium
:
corev1
.
StorageMediumMemory
,
SizeLimit
:
func
()
*
resource
.
Quantity
{
q
:=
resource
.
MustParse
(
"
512M
i"
);
return
&
q
}(),
SizeLimit
:
func
()
*
resource
.
Quantity
{
q
:=
resource
.
MustParse
(
"
8G
i"
);
return
&
q
}(),
},
},
},
},
},
},
...
...
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