From 8f43767b57f2e3afadcaa00b87e71e3a9a570852 Mon Sep 17 00:00:00 2001 From: Periyasamy Palanisamy Date: Tue, 23 Nov 2021 14:09:59 +0100 Subject: [PATCH] add smartvf vlan trunking example Signed-off-by: Periyasamy Palanisamy --- examples/ovs/README.md | 1 + .../use-cases/SmartVf2SmartVfVlan/README.md | 128 ++++++++++++++++++ 2 files changed, 129 insertions(+) create mode 100644 examples/use-cases/SmartVf2SmartVfVlan/README.md diff --git a/examples/ovs/README.md b/examples/ovs/README.md index 24d61d8bf457..63e008f8d06a 100644 --- a/examples/ovs/README.md +++ b/examples/ovs/README.md @@ -11,6 +11,7 @@ Contain basic setup for NSM that includes `nsmgr`, `forwarder-ovs`, `registry-k8 - [Kernel to Kernel Connection](../use-cases/Kernel2Kernel) - [Kernel to Kernel Connection over VLAN Trunking](../use-cases/Kernel2KernelVLAN) - [SmartVF to SmartVF Connection](../use-cases/SmartVF2SmartVF) +- [SmartVF to SmartVF Connection over VLAN Trunking](../use-cases/SmartVf2SmartVfVlan) - [Admission webhook SmartVF example](../features/webhook-smartvf) ## SR-IOV config diff --git a/examples/use-cases/SmartVf2SmartVfVlan/README.md b/examples/use-cases/SmartVf2SmartVfVlan/README.md new file mode 100644 index 000000000000..a9b005b0ed0a --- /dev/null +++ b/examples/use-cases/SmartVf2SmartVfVlan/README.md @@ -0,0 +1,128 @@ +# Test SmartVF to SmartVF connection over VLAN Trunking at NSE side + + +This example shows that NS Clients and NSE on the one node can find each other. + +NS Clients and NSE are using the `kernel` mechanism via SmartVF device to connect to its local ovs forwarder. +The NS Client connections are multiplexed over single VF device on the NSE side. + +## Requires + +Make sure that you have completed steps from [ovs](../../ovs) setup. +There is more consumption of heap memory by NSE pod due to vpp process when host is configured with +hugepage, so in this case NSE pod should be created with memory limit > 2.2 GB. + +## Run + +Create test namespace: +```bash +NAMESPACE=($(kubectl create -f https://raw.githubusercontent.com/networkservicemesh/deployments-k8s/08abf825759063be5eda5055e4ccd13570e6039b/examples/use-cases/namespace.yaml)[0]) +NAMESPACE=${NAMESPACE:10} +``` + +Select node to deploy NSC and NSE: +```bash +NODE=($(kubectl get nodes -o go-template='{{range .items}}{{ if not .spec.taints }}{{index .metadata.labels "kubernetes.io/hostname"}} {{end}}{{end}}')[0]) +``` + +Create customization file: +```bash +cat > kustomization.yaml < patch-nsc.yaml < patch-nse.yaml <