diff --git a/test/e2e/underlay/underlay.go b/test/e2e/underlay/underlay.go index ff740791b0e..4cf353931a6 100644 --- a/test/e2e/underlay/underlay.go +++ b/test/e2e/underlay/underlay.go @@ -310,7 +310,7 @@ var _ = Describe("[Underlay]", func() { ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: Namespace, - Annotations: map[string]string{util.LogicalSwitchAnnotation: name}, + Annotations: map[string]string{util.LogicalSwitchAnnotation: subnet.Name}, }, Spec: corev1.PodSpec{ Containers: []corev1.Container{ @@ -379,9 +379,10 @@ var _ = Describe("[Underlay]", func() { var autoMount bool pod := &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ - Name: f.GetName(), - Namespace: Namespace, - Labels: map[string]string{"e2e": "true"}, + Name: f.GetName(), + Namespace: Namespace, + Labels: map[string]string{"e2e": "true"}, + Annotations: map[string]string{util.LogicalSwitchAnnotation: Subnet}, }, Spec: corev1.PodSpec{ Containers: []corev1.Container{ @@ -450,9 +451,10 @@ var _ = Describe("[Underlay]", func() { var autoMount bool pod := &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ - Name: f.GetName(), - Namespace: Namespace, - Labels: map[string]string{"e2e": "true"}, + Name: f.GetName(), + Namespace: Namespace, + Labels: map[string]string{"e2e": "true"}, + Annotations: map[string]string{util.LogicalSwitchAnnotation: Subnet}, }, Spec: corev1.PodSpec{ Containers: []corev1.Container{ @@ -541,9 +543,10 @@ var _ = Describe("[Underlay]", func() { var autoMount bool pod := &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ - Name: f.GetName(), - Namespace: Namespace, - Labels: map[string]string{"e2e": "true"}, + Name: f.GetName(), + Namespace: Namespace, + Labels: map[string]string{"e2e": "true"}, + Annotations: map[string]string{util.LogicalSwitchAnnotation: Subnet}, }, Spec: corev1.PodSpec{ NodeName: nodes[0], @@ -634,9 +637,10 @@ var _ = Describe("[Underlay]", func() { for i := range nodes { pods[i] = &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ - Name: fmt.Sprintf("%s-%d", name, i+1), - Namespace: Namespace, - Labels: map[string]string{"e2e": "true"}, + Name: fmt.Sprintf("%s-%d", name, i+1), + Namespace: Namespace, + Labels: map[string]string{"e2e": "true"}, + Annotations: map[string]string{util.LogicalSwitchAnnotation: Subnet}, }, Spec: corev1.PodSpec{ NodeName: nodes[i], @@ -725,9 +729,10 @@ var _ = Describe("[Underlay]", func() { var autoMount bool upod := &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ - Name: f.GetName(), - Namespace: Namespace, - Labels: map[string]string{"e2e": "true"}, + Name: f.GetName(), + Namespace: Namespace, + Labels: map[string]string{"e2e": "true"}, + Annotations: map[string]string{util.LogicalSwitchAnnotation: Subnet}, }, Spec: corev1.PodSpec{ Containers: []corev1.Container{ @@ -813,9 +818,10 @@ var _ = Describe("[Underlay]", func() { var autoMount bool pod := &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ - Name: f.GetName(), - Namespace: Namespace, - Labels: map[string]string{"e2e": "true"}, + Name: f.GetName(), + Namespace: Namespace, + Labels: map[string]string{"e2e": "true"}, + Annotations: map[string]string{util.LogicalSwitchAnnotation: Subnet}, }, Spec: corev1.PodSpec{ Containers: []corev1.Container{