Unverified Commit 219cfa1f authored by Biswa Panda's avatar Biswa Panda Committed by GitHub
Browse files

feat: add dynamo pipeline example using inf-gw (#1512)

parent a09ca3ec
......@@ -1143,11 +1143,15 @@ func (r *DynamoComponentDeploymentReconciler) getGenericServiceName(dynamoCompon
return r.getKubeName(dynamoComponentDeployment, dynamoComponent, false)
}
func (r *DynamoComponentDeploymentReconciler) getKubeLabels(_ *v1alpha1.DynamoComponentDeployment, dynamoComponent *v1alpha1.DynamoComponent) map[string]string {
func (r *DynamoComponentDeploymentReconciler) getKubeLabels(dynamoComponentDeployment *v1alpha1.DynamoComponentDeployment, dynamoComponent *v1alpha1.DynamoComponent) map[string]string {
labels := map[string]string{
commonconsts.KubeLabelDynamoComponent: dynamoComponent.Name,
}
labels[commonconsts.KubeLabelDynamoComponentType] = commonconsts.DynamoApiServerComponentName
if dynamoComponentDeployment != nil && dynamoComponentDeployment.Labels != nil {
if v, ok := dynamoComponentDeployment.Labels[commonconsts.KubeLabelDynamoComponent]; ok && v != "" {
labels[commonconsts.KubeLabelDynamoComponentType] = v
}
}
return labels
}
......
......@@ -904,9 +904,8 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
Name: "test-lws-deploy-0",
Namespace: "default",
Labels: map[string]string{
commonconsts.KubeLabelDynamoComponent: "test-lws-component",
commonconsts.KubeLabelDynamoComponentType: commonconsts.DynamoApiServerComponentName,
"instance-id": "0",
commonconsts.KubeLabelDynamoComponent: "test-lws-component",
"instance-id": "0",
},
},
Spec: leaderworkersetv1.LeaderWorkerSetSpec{
......@@ -920,7 +919,6 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
"instance-id": "0",
"role": "leader",
commonconsts.KubeLabelDynamoComponent: "test-lws-component",
commonconsts.KubeLabelDynamoComponentType: commonconsts.DynamoApiServerComponentName,
},
Annotations: map[string]string{
"scheduling.k8s.io/group-name": "test-lws-deploy-0",
......@@ -974,7 +972,6 @@ func TestDynamoComponentDeploymentReconciler_generateLeaderWorkerSet(t *testing.
"instance-id": "0",
"role": "worker",
commonconsts.KubeLabelDynamoComponent: "test-lws-component",
commonconsts.KubeLabelDynamoComponentType: commonconsts.DynamoApiServerComponentName,
},
Annotations: map[string]string{
"scheduling.k8s.io/group-name": "test-lws-deploy-0",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment