Skip to content

Commit

Permalink
Add feature test cases to ovs suite
Browse files Browse the repository at this point in the history
Related issue: networkservicemesh#9778

Signed-off-by: Laszlo Kiraly <laszlo.kiraly@est.tech>
  • Loading branch information
ljkiraly committed Feb 6, 2024
1 parent c001ee1 commit 6f3932e
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 14 deletions.
32 changes: 32 additions & 0 deletions examples/features_ovs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# OVS feature examples

Ths document contains links for essential feature examples of NSM with forwarder-ovs

## Requires

- [ovs](../ovs)

## Includes

Features

- [Kernel2Kernel IPv6 example](../features/ipv6/Kernel2Kernel_ipv6)
- [Kernel2IP2Kernel IPv6 example](../features/ipv6/Kernel2IP2Kernel_ipv6)
- [Kernel2Kernel dual stack example](../features/dual-stack/Kernel2Kernel_dual_stack)
- [Kernel2IP2Kernel dual stack example](../features/dual-stack/Kernel2IP2Kernel_dual_stack)
- [Admission webhook](../features//webhook)
- [DNS](../features/dns)
- [Topology aware scale from zero](../features/scale-from-zero)
- [Exclude prefixes](../features/exclude-prefixes)
- [Exclude prefixes client](../features/exclude-prefixes-client)
- [Select forwarder by capability](../features/select-forwarder)
- [Policy based routing](../features/policy-based-routing)
- [Mutually aware NSEs](../features/mutually-aware-nses)
- [Inject clients in namespace via NSM annotation](../features/annotated-namespace)
- [NSC connects to multiple services](../features/multiple-services)
- [Scaled Registry K8s](../features/scaled-registry)
- [NSC changes endpoints dynamically](../features/change-nse-dynamically)

SmartVF feature

- [Admission webhook SmartVF example](../features/webhook-smartvf)
4 changes: 2 additions & 2 deletions examples/heal/local-forwarder-death/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ NSC_NODE=$(kubectl get pods -l app=alpine -n ns-local-forwarder-death --template

Find local Forwarder:
```bash
FORWARDER=$(kubectl get pods -l app=forwarder-vpp --field-selector spec.nodeName==${NSC_NODE} -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')
FORWARDER=$(kubectl get pods -l 'app in (forwarder-ovs, forwarder-vpp)' --field-selector spec.nodeName==${NSC_NODE} -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')
```

Remove local Forwarder and wait for a new one to start:
```bash
kubectl delete pod -n nsm-system ${FORWARDER}
```
```bash
kubectl wait --for=condition=ready --timeout=1m pod -l app=forwarder-vpp --field-selector spec.nodeName==${NSC_NODE} -n nsm-system
kubectl wait --for=condition=ready --timeout=1m pod -l 'app in (forwarder-ovs, forwarder-vpp)' --field-selector spec.nodeName==${NSC_NODE} -n nsm-system
```

Ping from NSC to NSE:
Expand Down
8 changes: 4 additions & 4 deletions examples/heal/local-forwarder-remote-forwarder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ NSE_NODE=$(kubectl get pods -l app=nse-kernel -n ns-local-forwarder-remote-forwa

Find local Forwarder:
```bash
FORWARDER1=$(kubectl get pods -l app=forwarder-vpp --field-selector spec.nodeName==${NSC_NODE} -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')
FORWARDER1=$(kubectl get pods -l 'app in (forwarder-ovs, forwarder-vpp)' --field-selector spec.nodeName==${NSC_NODE} -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')
```

Find remote Forwarder:
```bash
FORWARDER2=$(kubectl get pods -l app=forwarder-vpp --field-selector spec.nodeName==${NSE_NODE} -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')
FORWARDER2=$(kubectl get pods -l 'app in (forwarder-ovs, forwarder-vpp)' --field-selector spec.nodeName==${NSE_NODE} -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')
```

Restart local and remote Forwarders:
Expand All @@ -60,10 +60,10 @@ kubectl delete pod ${FORWARDER2} -n nsm-system

Waiting for new ones:
```bash
kubectl wait --for=condition=ready --timeout=1m pod -l app=forwarder-vpp --field-selector spec.nodeName==${NSC_NODE} -n nsm-system
kubectl wait --for=condition=ready --timeout=1m pod -l 'app in (forwarder-ovs, forwarder-vpp)' --field-selector spec.nodeName==${NSC_NODE} -n nsm-system
```
```bash
kubectl wait --for=condition=ready --timeout=1m pod -l app=forwarder-vpp --field-selector spec.nodeName==${NSE_NODE} -n nsm-system
kubectl wait --for=condition=ready --timeout=1m pod -l 'app in (forwarder-ovs, forwarder-vpp)' --field-selector spec.nodeName==${NSE_NODE} -n nsm-system
```

Ping from NSC to NSE:
Expand Down
4 changes: 2 additions & 2 deletions examples/heal/registry-remote-forwarder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ REGISTRY=$(kubectl get pods -l app=registry -n nsm-system --template '{{range .i

Find remote Forwarder:
```bash
FORWARDER=$(kubectl get pods -l app=forwarder-vpp --field-selector spec.nodeName==${NSE_NODE} -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')
FORWARDER=$(kubectl get pods -l 'app in (forwarder-ovs, forwarder-vpp)' --field-selector spec.nodeName==${NSE_NODE} -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')
```

Restart Registry and remote Forwarder:
Expand All @@ -62,7 +62,7 @@ Waiting for new ones:
kubectl wait --for=condition=ready --timeout=1m pod -l app=registry -n nsm-system
```
```bash
kubectl wait --for=condition=ready --timeout=1m pod -l app=forwarder-vpp --field-selector spec.nodeName==${NSE_NODE} -n nsm-system
kubectl wait --for=condition=ready --timeout=1m pod -l 'app in (forwarder-ovs, forwarder-vpp)' --field-selector spec.nodeName==${NSE_NODE} -n nsm-system
```

Ping from NSC to NSE:
Expand Down
4 changes: 2 additions & 2 deletions examples/heal/remote-forwarder-death-ip/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ NSE_NODE=$(kubectl get pods -l app=nse-kernel -n ns-remote-forwarder-death-ip --

Find remote Forwarder:
```bash
FORWARDER=$(kubectl get pods -l app=forwarder-vpp --field-selector spec.nodeName==${NSE_NODE} -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')
FORWARDER=$(kubectl get pods -l 'app in (forwarder-ovs, forwarder-vpp)' --field-selector spec.nodeName==${NSE_NODE} -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')
```

Remove remote Forwarder and wait for a new one to start:
```bash
kubectl delete pod -n nsm-system ${FORWARDER}
```
```bash
kubectl wait --for=condition=ready --timeout=1m pod -l app=forwarder-vpp --field-selector spec.nodeName==${NSE_NODE} -n nsm-system
kubectl wait --for=condition=ready --timeout=1m pod -l 'app in (forwarder-ovs, forwarder-vpp)' --field-selector spec.nodeName==${NSE_NODE} -n nsm-system
```

Ping from NSC to NSE:
Expand Down
4 changes: 2 additions & 2 deletions examples/heal/remote-forwarder-death/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ NSE_NODE=$(kubectl get pods -l app=nse-kernel -n ns-remote-forwarder-death --tem

Find remote Forwarder:
```bash
FORWARDER=$(kubectl get pods -l app=forwarder-vpp --field-selector spec.nodeName==${NSE_NODE} -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')
FORWARDER=$(kubectl get pods -l 'app in (forwarder-ovs, forwarder-vpp)' --field-selector spec.nodeName==${NSE_NODE} -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')
```

Remove remote Forwarder and wait for a new one to start:
```bash
kubectl delete pod -n nsm-system ${FORWARDER}
```
```bash
kubectl wait --for=condition=ready --timeout=1m pod -l app=forwarder-vpp --field-selector spec.nodeName==${NSE_NODE} -n nsm-system
kubectl wait --for=condition=ready --timeout=1m pod -l 'app in (forwarder-ovs, forwarder-vpp)' --field-selector spec.nodeName==${NSE_NODE} -n nsm-system
```

Ping from NSC to NSE:
Expand Down
18 changes: 18 additions & 0 deletions examples/heal_ovs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# OVS heal examples

Ths document contains links for essential heal examples of NSM with forwarder-ovs

## Requires

- [ovs](../ovs)

## Includes

- [Local forwarder death](../heal/local-forwarder-death)
- [Remote forwarder death](../heal/remote-forwarder-death)
- [Local Forwarder + Remote Forwarder](../heal/local-forwarder-remote-forwarder)
- [Local NSMgr restart](../heal/local-nsmgr-restart)
- [Registry restart](../heal/registry-restart)
- [Remote Forwarder death ip](../heal/remote-forwarder-death-ip)
- [Registry + Remote Forwarder](../heal/registry-remote-forwarder)

8 changes: 6 additions & 2 deletions examples/ovs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ Contain basic setup for NSM that includes `nsmgr`, `forwarder-ovs`, `registry-k8

## Includes

Basic examples

- [Kernel to Kernel Connection](../use-cases/Kernel2Kernel)
- [Kernel to Kernel Connection over VLAN Trunking](../use-cases/Kernel2KernelVLAN)
- [Kernel to IP to Kernel Connection](../use-cases/Kernel2IP2Kernel)

SmartVf examples

- [SmartVF to SmartVF Connection](../use-cases/SmartVF2SmartVF)
- [Admission webhook SmartVF example](../features/webhook-smartvf)

## SR-IOV config

Expand Down

0 comments on commit 6f3932e

Please sign in to comment.