From 6f3932e85d7122278ad3ce6305d6b11fdedb3a61 Mon Sep 17 00:00:00 2001 From: Laszlo Kiraly Date: Tue, 5 Sep 2023 13:35:08 +0200 Subject: [PATCH] Add feature test cases to ovs suite Related issue: networkservicemesh/deployments-k8s#9778 Signed-off-by: Laszlo Kiraly --- examples/features_ovs/README.md | 32 +++++++++++++++++++ examples/heal/local-forwarder-death/README.md | 4 +-- .../README.md | 8 ++--- .../heal/registry-remote-forwarder/README.md | 4 +-- .../heal/remote-forwarder-death-ip/README.md | 4 +-- .../heal/remote-forwarder-death/README.md | 4 +-- examples/heal_ovs/README.md | 18 +++++++++++ examples/ovs/README.md | 8 +++-- 8 files changed, 68 insertions(+), 14 deletions(-) create mode 100644 examples/features_ovs/README.md create mode 100644 examples/heal_ovs/README.md diff --git a/examples/features_ovs/README.md b/examples/features_ovs/README.md new file mode 100644 index 000000000000..a3f8511909db --- /dev/null +++ b/examples/features_ovs/README.md @@ -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) diff --git a/examples/heal/local-forwarder-death/README.md b/examples/heal/local-forwarder-death/README.md index 996833e1d09f..55fe2baea42d 100644 --- a/examples/heal/local-forwarder-death/README.md +++ b/examples/heal/local-forwarder-death/README.md @@ -40,7 +40,7 @@ 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: @@ -48,7 +48,7 @@ Remove local Forwarder and wait for a new one to start: 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: diff --git a/examples/heal/local-forwarder-remote-forwarder/README.md b/examples/heal/local-forwarder-remote-forwarder/README.md index 178ac6ce929b..0d975753243a 100644 --- a/examples/heal/local-forwarder-remote-forwarder/README.md +++ b/examples/heal/local-forwarder-remote-forwarder/README.md @@ -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: @@ -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: diff --git a/examples/heal/registry-remote-forwarder/README.md b/examples/heal/registry-remote-forwarder/README.md index 499915f412db..b47718d1dd0f 100644 --- a/examples/heal/registry-remote-forwarder/README.md +++ b/examples/heal/registry-remote-forwarder/README.md @@ -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: @@ -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: diff --git a/examples/heal/remote-forwarder-death-ip/README.md b/examples/heal/remote-forwarder-death-ip/README.md index c69422dae3da..ddc35a4867c2 100644 --- a/examples/heal/remote-forwarder-death-ip/README.md +++ b/examples/heal/remote-forwarder-death-ip/README.md @@ -41,7 +41,7 @@ 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: @@ -49,7 +49,7 @@ Remove remote Forwarder and wait for a new one to start: 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: diff --git a/examples/heal/remote-forwarder-death/README.md b/examples/heal/remote-forwarder-death/README.md index 0d623bbd5924..f7d1360ec52d 100644 --- a/examples/heal/remote-forwarder-death/README.md +++ b/examples/heal/remote-forwarder-death/README.md @@ -41,7 +41,7 @@ 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: @@ -49,7 +49,7 @@ Remove remote Forwarder and wait for a new one to start: 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: diff --git a/examples/heal_ovs/README.md b/examples/heal_ovs/README.md new file mode 100644 index 000000000000..7fb1f4d1b31c --- /dev/null +++ b/examples/heal_ovs/README.md @@ -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) + diff --git a/examples/ovs/README.md b/examples/ovs/README.md index fb07ae0ac909..4ab7c5012228 100644 --- a/examples/ovs/README.md +++ b/examples/ovs/README.md @@ -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