Skip to content

Commit 32956f8

Browse files
authored
Merge pull request #290 from Venkat-Kunaparaju/udn-primary
Add UDN_PRIMARY external, NP, and load balancer test cases
2 parents 710fc03 + ce903ce commit 32956f8

10 files changed

Lines changed: 398 additions & 73 deletions

README.md

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -129,26 +129,31 @@ kubeconfig_infra: (30)
129129
| 40 | UDN_PRIMARY_POD_TO_CLUSTER_IP_TO_POD_DIFF_NODE |
130130
| 41 | UDN_PRIMARY_POD_TO_NODE_PORT_TO_POD_SAME_NODE |
131131
| 42 | UDN_PRIMARY_POD_TO_NODE_PORT_TO_POD_DIFF_NODE |
132-
| 43 | UDN_SECONDARY_POD_TO_POD_SAME_NODE |
133-
| 44 | UDN_SECONDARY_POD_TO_POD_DIFF_NODE |
134-
| 45 | UDN_SECONDARY_POD_TO_CLUSTER_IP_TO_POD_SAME_NODE |
135-
| 46 | UDN_SECONDARY_POD_TO_CLUSTER_IP_TO_POD_DIFF_NODE |
136-
| 47 | UDN_SECONDARY_POD_TO_NODE_PORT_TO_POD_SAME_NODE |
137-
| 48 | UDN_SECONDARY_POD_TO_NODE_PORT_TO_POD_DIFF_NODE |
138-
| 49 | UDN_LOCALNET_POD_TO_POD_SAME_NODE |
139-
| 50 | UDN_LOCALNET_POD_TO_POD_DIFF_NODE |
140-
| 51 | UDN_LOCALNET_POD_TO_CLUSTER_IP_TO_POD_SAME_NODE |
141-
| 52 | UDN_LOCALNET_POD_TO_CLUSTER_IP_TO_POD_DIFF_NODE |
142-
| 53 | UDN_LOCALNET_POD_TO_NODE_PORT_TO_POD_SAME_NODE |
143-
| 54 | UDN_LOCALNET_POD_TO_NODE_PORT_TO_POD_DIFF_NODE |
144-
| 55 | POD_TO_LOAD_BALANCER_TO_POD_SAME_NODE |
145-
| 56 | POD_TO_LOAD_BALANCER_TO_POD_DIFF_NODE |
146-
| 57 | POD_TO_LOAD_BALANCER_TO_HOST_SAME_NODE |
147-
| 58 | POD_TO_LOAD_BALANCER_TO_HOST_DIFF_NODE |
148-
| 59 | HOST_TO_LOAD_BALANCER_TO_POD_SAME_NODE |
149-
| 60 | HOST_TO_LOAD_BALANCER_TO_POD_DIFF_NODE |
150-
| 61 | HOST_TO_LOAD_BALANCER_TO_HOST_SAME_NODE |
151-
| 62 | HOST_TO_LOAD_BALANCER_TO_HOST_DIFF_NODE |
132+
| 43 | UDN_PRIMARY_POD_TO_EXTERNAL |
133+
| 44 | UDN_PRIMARY_POD_TO_POD_NP_DENY |
134+
| 45 | UDN_PRIMARY_POD_TO_POD_NP_ALLOW |
135+
| 46 | UDN_PRIMARY_POD_TO_LOAD_BALANCER_TO_POD_SAME_NODE |
136+
| 47 | UDN_PRIMARY_POD_TO_LOAD_BALANCER_TO_POD_DIFF_NODE |
137+
| 48 | UDN_SECONDARY_POD_TO_POD_SAME_NODE |
138+
| 49 | UDN_SECONDARY_POD_TO_POD_DIFF_NODE |
139+
| 50 | UDN_SECONDARY_POD_TO_CLUSTER_IP_TO_POD_SAME_NODE |
140+
| 51 | UDN_SECONDARY_POD_TO_CLUSTER_IP_TO_POD_DIFF_NODE |
141+
| 52 | UDN_SECONDARY_POD_TO_NODE_PORT_TO_POD_SAME_NODE |
142+
| 53 | UDN_SECONDARY_POD_TO_NODE_PORT_TO_POD_DIFF_NODE |
143+
| 54 | UDN_LOCALNET_POD_TO_POD_SAME_NODE |
144+
| 55 | UDN_LOCALNET_POD_TO_POD_DIFF_NODE |
145+
| 56 | UDN_LOCALNET_POD_TO_CLUSTER_IP_TO_POD_SAME_NODE |
146+
| 57 | UDN_LOCALNET_POD_TO_CLUSTER_IP_TO_POD_DIFF_NODE |
147+
| 58 | UDN_LOCALNET_POD_TO_NODE_PORT_TO_POD_SAME_NODE |
148+
| 59 | UDN_LOCALNET_POD_TO_NODE_PORT_TO_POD_DIFF_NODE |
149+
| 60 | POD_TO_LOAD_BALANCER_TO_POD_SAME_NODE |
150+
| 61 | POD_TO_LOAD_BALANCER_TO_POD_DIFF_NODE |
151+
| 62 | POD_TO_LOAD_BALANCER_TO_HOST_SAME_NODE |
152+
| 63 | POD_TO_LOAD_BALANCER_TO_HOST_DIFF_NODE |
153+
| 64 | HOST_TO_LOAD_BALANCER_TO_POD_SAME_NODE |
154+
| 65 | HOST_TO_LOAD_BALANCER_TO_POD_DIFF_NODE |
155+
| 66 | HOST_TO_LOAD_BALANCER_TO_HOST_SAME_NODE |
156+
| 67 | HOST_TO_LOAD_BALANCER_TO_HOST_DIFF_NODE |
152157
4. "duration" - The duration that each individual test will run for.
153158
5. "pre_provision" - (Optional) Whether to pre-provision all pods and services once before the test run begins, rather than creating and tearing them down per test case. Defaults to false. Takes in "true/false".
154159
6. "name" - This is the connection name. Any string value to identify the connection.
@@ -194,11 +199,15 @@ kubeconfig_infra: (30)
194199

195200
See the [OVN-Kubernetes UDN documentation](https://github.com/ovn-kubernetes/ovn-kubernetes/blob/master/docs/features/user-defined-networks/user-defined-networks.md) for details on User Defined Networks.
196201

197-
Test cases 37-54 run traffic over OVN-Kubernetes User Defined Networks. The framework creates and cleans up a `{namespace}-udn` namespace with the appropriate UDN CRDs automatically.
202+
Test cases 37-59 run traffic over OVN-Kubernetes User Defined Networks. The framework creates and cleans up a `{namespace}-udn` namespace with the appropriate UDN CRDs automatically. NetworkPolicies and LoadBalancer services for UDN tests are also created in (and torn down from) the `{namespace}-udn` namespace.
198203

199-
- **37-42** (Primary UDN): Layer3 network replacing the pod's default network. Supports pod-to-pod, ClusterIP, and NodePort.
200-
- **43-48** (Secondary UDN): Layer2 network attached as a 2nd interface. Supports pod-to-pod, ClusterIP, and NodePort.
201-
- **49-54** (Localnet UDN): Localnet topology secondary network via ClusterUserDefinedNetwork, providing direct L2 access. Supports pod-to-pod, ClusterIP, and NodePort.
204+
- **37-47** (Primary UDN): Layer3 network replacing the pod's default network.
205+
- **37-42**: pod-to-pod, ClusterIP, and NodePort.
206+
- **43**: pod-to-external (egress out of the UDN to the public internet).
207+
- **44-45**: NetworkPolicy enforcement on the primary UDN (deny / allow).
208+
- **46-47**: pod-to-LoadBalancer-to-pod (same / different node).
209+
- **48-53** (Secondary UDN): Layer2 network attached as a 2nd interface. Supports pod-to-pod, ClusterIP, and NodePort.
210+
- **54-59** (Localnet UDN): Localnet topology secondary network via ClusterUserDefinedNetwork, providing direct L2 access. Supports pod-to-pod, ClusterIP, and NodePort.
202211

203212
CIDRs default to `15.1.0.0/16` (primary), `15.2.0.0/16` (secondary), and `15.3.0.0/24` (localnet), overridable via `TFT_UDN_PRIMARY_CIDR`, `TFT_UDN_SECONDARY_CIDR`, and `TFT_UDN_LOCALNET_CIDR`. The localnet physical network name defaults to `physnet`, overridable via `TFT_UDN_LOCALNET_PHYSICAL_NETWORK`. Reference manifests are in `manifests/udn-primary.yaml.j2`, `manifests/udn-secondary.yaml.j2`, and `manifests/udn-localnet.yaml.j2`.
204213

eval-config.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,31 @@ IPERF_TCP:
209209
threshold: 18
210210
Reverse:
211211
threshold: 18
212+
- id: UDN_PRIMARY_POD_TO_EXTERNAL
213+
Normal:
214+
threshold: 18
215+
Reverse:
216+
threshold: 10
217+
- id: UDN_PRIMARY_POD_TO_POD_NP_DENY
218+
Normal:
219+
threshold: 0
220+
Reverse:
221+
threshold: 0
222+
- id: UDN_PRIMARY_POD_TO_POD_NP_ALLOW
223+
Normal:
224+
threshold: 18
225+
Reverse:
226+
threshold: 10
227+
- id: UDN_PRIMARY_POD_TO_LOAD_BALANCER_TO_POD_SAME_NODE
228+
Normal:
229+
threshold: 18
230+
Reverse:
231+
threshold: 10
232+
- id: UDN_PRIMARY_POD_TO_LOAD_BALANCER_TO_POD_DIFF_NODE
233+
Normal:
234+
threshold: 18
235+
Reverse:
236+
threshold: 10
212237
- id: UDN_SECONDARY_POD_TO_POD_SAME_NODE
213238
Normal:
214239
threshold: 18
@@ -520,6 +545,31 @@ IPERF_UDP:
520545
threshold: 5
521546
Reverse:
522547
threshold: 5
548+
- id: UDN_PRIMARY_POD_TO_EXTERNAL
549+
Normal:
550+
threshold: 5
551+
Reverse:
552+
threshold: 5
553+
- id: UDN_PRIMARY_POD_TO_POD_NP_DENY
554+
Normal:
555+
threshold: 0
556+
Reverse:
557+
threshold: 0
558+
- id: UDN_PRIMARY_POD_TO_POD_NP_ALLOW
559+
Normal:
560+
threshold: 5
561+
Reverse:
562+
threshold: 5
563+
- id: UDN_PRIMARY_POD_TO_LOAD_BALANCER_TO_POD_SAME_NODE
564+
Normal:
565+
threshold: 5
566+
Reverse:
567+
threshold: 5
568+
- id: UDN_PRIMARY_POD_TO_LOAD_BALANCER_TO_POD_DIFF_NODE
569+
Normal:
570+
threshold: 5
571+
Reverse:
572+
threshold: 5
523573
- id: UDN_SECONDARY_POD_TO_POD_SAME_NODE
524574
Normal:
525575
threshold: 5

task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ def node_location(self) -> str:
337337
def get_namespace(self) -> str:
338338
ns = self.ts.cfg_descr.get_tft().namespace
339339
if self.ts.test_case_id.is_udn:
340-
return f"{ns}-udn"
340+
return tftbase.get_udn_namespace(ns)
341341
return ns
342342

343343
def get_duration(self) -> int:

tests/eval-config-2.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,31 @@ IPERF_TCP:
309309
Reverse:
310310
threshold: 10
311311
id: 62
312+
- Normal:
313+
threshold: 18
314+
Reverse:
315+
threshold: 10
316+
id: 63
317+
- Normal:
318+
threshold: 18
319+
Reverse:
320+
threshold: 10
321+
id: 64
322+
- Normal:
323+
threshold: 18
324+
Reverse:
325+
threshold: 10
326+
id: 65
327+
- Normal:
328+
threshold: 18
329+
Reverse:
330+
threshold: 10
331+
id: 66
332+
- Normal:
333+
threshold: 18
334+
Reverse:
335+
threshold: 10
336+
id: 67
312337
IPERF_UDP:
313338
- Normal:
314339
threshold: 5
@@ -620,3 +645,28 @@ IPERF_UDP:
620645
Reverse:
621646
threshold: 5
622647
id: 62
648+
- Normal:
649+
threshold: 5
650+
Reverse:
651+
threshold: 5
652+
id: 63
653+
- Normal:
654+
threshold: 5
655+
Reverse:
656+
threshold: 5
657+
id: 64
658+
- Normal:
659+
threshold: 5
660+
Reverse:
661+
threshold: 5
662+
id: 65
663+
- Normal:
664+
threshold: 5
665+
Reverse:
666+
threshold: 5
667+
id: 66
668+
- Normal:
669+
threshold: 5
670+
Reverse:
671+
threshold: 5
672+
id: 67

tests/generate-eval-config-output0.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,31 @@ IPERF_TCP:
209209
threshold: 18
210210
Reverse:
211211
threshold: 18
212+
- id: UDN_PRIMARY_POD_TO_EXTERNAL
213+
Normal:
214+
threshold: 18
215+
Reverse:
216+
threshold: 10
217+
- id: UDN_PRIMARY_POD_TO_POD_NP_DENY
218+
Normal:
219+
threshold: 0
220+
Reverse:
221+
threshold: 0
222+
- id: UDN_PRIMARY_POD_TO_POD_NP_ALLOW
223+
Normal:
224+
threshold: 18
225+
Reverse:
226+
threshold: 10
227+
- id: UDN_PRIMARY_POD_TO_LOAD_BALANCER_TO_POD_SAME_NODE
228+
Normal:
229+
threshold: 18
230+
Reverse:
231+
threshold: 10
232+
- id: UDN_PRIMARY_POD_TO_LOAD_BALANCER_TO_POD_DIFF_NODE
233+
Normal:
234+
threshold: 18
235+
Reverse:
236+
threshold: 10
212237
- id: UDN_SECONDARY_POD_TO_POD_SAME_NODE
213238
Normal:
214239
threshold: 18
@@ -520,6 +545,31 @@ IPERF_UDP:
520545
threshold: 5
521546
Reverse:
522547
threshold: 5
548+
- id: UDN_PRIMARY_POD_TO_EXTERNAL
549+
Normal:
550+
threshold: 5
551+
Reverse:
552+
threshold: 5
553+
- id: UDN_PRIMARY_POD_TO_POD_NP_DENY
554+
Normal:
555+
threshold: 0
556+
Reverse:
557+
threshold: 0
558+
- id: UDN_PRIMARY_POD_TO_POD_NP_ALLOW
559+
Normal:
560+
threshold: 5
561+
Reverse:
562+
threshold: 5
563+
- id: UDN_PRIMARY_POD_TO_LOAD_BALANCER_TO_POD_SAME_NODE
564+
Normal:
565+
threshold: 5
566+
Reverse:
567+
threshold: 5
568+
- id: UDN_PRIMARY_POD_TO_LOAD_BALANCER_TO_POD_DIFF_NODE
569+
Normal:
570+
threshold: 5
571+
Reverse:
572+
threshold: 5
523573
- id: UDN_SECONDARY_POD_TO_POD_SAME_NODE
524574
Normal:
525575
threshold: 5

tests/generate-eval-config-output2.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,31 @@ IPERF_TCP:
246246
threshold: 18
247247
Reverse:
248248
threshold: 18
249+
- id: UDN_PRIMARY_POD_TO_EXTERNAL
250+
Normal:
251+
threshold: 18
252+
Reverse:
253+
threshold: 10
254+
- id: UDN_PRIMARY_POD_TO_POD_NP_DENY
255+
Normal:
256+
threshold: 0
257+
Reverse:
258+
threshold: 0
259+
- id: UDN_PRIMARY_POD_TO_POD_NP_ALLOW
260+
Normal:
261+
threshold: 18
262+
Reverse:
263+
threshold: 10
264+
- id: UDN_PRIMARY_POD_TO_LOAD_BALANCER_TO_POD_SAME_NODE
265+
Normal:
266+
threshold: 18
267+
Reverse:
268+
threshold: 10
269+
- id: UDN_PRIMARY_POD_TO_LOAD_BALANCER_TO_POD_DIFF_NODE
270+
Normal:
271+
threshold: 18
272+
Reverse:
273+
threshold: 10
249274
- id: UDN_SECONDARY_POD_TO_POD_SAME_NODE
250275
Normal:
251276
threshold: 18
@@ -563,6 +588,31 @@ IPERF_UDP:
563588
threshold: 5
564589
Reverse:
565590
threshold: 5
591+
- id: UDN_PRIMARY_POD_TO_EXTERNAL
592+
Normal:
593+
threshold: 5
594+
Reverse:
595+
threshold: 5
596+
- id: UDN_PRIMARY_POD_TO_POD_NP_DENY
597+
Normal:
598+
threshold: 0
599+
Reverse:
600+
threshold: 0
601+
- id: UDN_PRIMARY_POD_TO_POD_NP_ALLOW
602+
Normal:
603+
threshold: 5
604+
Reverse:
605+
threshold: 5
606+
- id: UDN_PRIMARY_POD_TO_LOAD_BALANCER_TO_POD_SAME_NODE
607+
Normal:
608+
threshold: 5
609+
Reverse:
610+
threshold: 5
611+
- id: UDN_PRIMARY_POD_TO_LOAD_BALANCER_TO_POD_DIFF_NODE
612+
Normal:
613+
threshold: 5
614+
Reverse:
615+
threshold: 5
566616
- id: UDN_SECONDARY_POD_TO_POD_SAME_NODE
567617
Normal:
568618
threshold: 5

tests/generate-eval-config-output3.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,31 @@ IPERF_TCP:
230230
threshold: 18
231231
Reverse:
232232
threshold: 18
233+
- id: UDN_PRIMARY_POD_TO_EXTERNAL
234+
Normal:
235+
threshold: 18
236+
Reverse:
237+
threshold: 10
238+
- id: UDN_PRIMARY_POD_TO_POD_NP_DENY
239+
Normal:
240+
threshold: 0
241+
Reverse:
242+
threshold: 0
243+
- id: UDN_PRIMARY_POD_TO_POD_NP_ALLOW
244+
Normal:
245+
threshold: 18
246+
Reverse:
247+
threshold: 10
248+
- id: UDN_PRIMARY_POD_TO_LOAD_BALANCER_TO_POD_SAME_NODE
249+
Normal:
250+
threshold: 18
251+
Reverse:
252+
threshold: 10
253+
- id: UDN_PRIMARY_POD_TO_LOAD_BALANCER_TO_POD_DIFF_NODE
254+
Normal:
255+
threshold: 18
256+
Reverse:
257+
threshold: 10
233258
- id: UDN_SECONDARY_POD_TO_POD_SAME_NODE
234259
Normal:
235260
threshold: 18
@@ -541,6 +566,31 @@ IPERF_UDP:
541566
threshold: 5
542567
Reverse:
543568
threshold: 5
569+
- id: UDN_PRIMARY_POD_TO_EXTERNAL
570+
Normal:
571+
threshold: 5
572+
Reverse:
573+
threshold: 5
574+
- id: UDN_PRIMARY_POD_TO_POD_NP_DENY
575+
Normal:
576+
threshold: 0
577+
Reverse:
578+
threshold: 0
579+
- id: UDN_PRIMARY_POD_TO_POD_NP_ALLOW
580+
Normal:
581+
threshold: 5
582+
Reverse:
583+
threshold: 5
584+
- id: UDN_PRIMARY_POD_TO_LOAD_BALANCER_TO_POD_SAME_NODE
585+
Normal:
586+
threshold: 5
587+
Reverse:
588+
threshold: 5
589+
- id: UDN_PRIMARY_POD_TO_LOAD_BALANCER_TO_POD_DIFF_NODE
590+
Normal:
591+
threshold: 5
592+
Reverse:
593+
threshold: 5
544594
- id: UDN_SECONDARY_POD_TO_POD_SAME_NODE
545595
Normal:
546596
threshold: 5

0 commit comments

Comments
 (0)