diff --git a/apps/nse-remote-vlan/nse-remote-vlan.yaml b/apps/nse-remote-vlan/nse-remote-vlan.yaml index e6ea5907d047..59c75c61e8c4 100644 --- a/apps/nse-remote-vlan/nse-remote-vlan.yaml +++ b/apps/nse-remote-vlan/nse-remote-vlan.yaml @@ -21,7 +21,6 @@ spec: imagePullPolicy: IfNotPresent ports: - containerPort: 5003 - hostPort: 5003 env: - name: SPIFFE_ENDPOINT_SOCKET value: unix:///run/spire/sockets/agent.sock @@ -29,14 +28,6 @@ spec: valueFrom: fieldRef: fieldPath: metadata.name - - name: NSM_CONNECT_TO - value: "registry:5002" - - name: NSM_SERVICES - value: "finance-bridge { vlan: 100; via: gw1}" - - name: NSM_CIDR_PREFIX - value: "172.10.0.0/24" - - name: NSM_IPV6_PREFIX - value: "100:200::/64" - name: NSM_POINT2POINT value: "False" - name: NSM_REGISTER_SERVICE diff --git a/examples/remotevlan/README.md b/examples/remotevlan/README.md index 0c24805af1e6..7560f9abc450 100644 --- a/examples/remotevlan/README.md +++ b/examples/remotevlan/README.md @@ -1,6 +1,6 @@ # NSM Remote Vlan Examples -This setup can be used to check remote vlan mechanism. Contain basic setup for NSM that includes `nsmgr`, `registry-k8s`, `admission-webhook-k8s`, `nse-remote-vlan`. The `nse-remote-vlan` belongs to the nsm-system since does not have role in data-plane connection. +This setup can be used to check remote vlan mechanism with both OVS and VPP forwarder. Contain basic setup for NSM that includes `nsmgr`, `registry-k8s`, `admission-webhook-k8s`, `nse-remote-vlan`. The `nse-remote-vlan` belongs to the nsm-system since does not have role in data-plane connection. ## Requires @@ -8,73 +8,100 @@ This setup can be used to check remote vlan mechanism. Contain basic setup for N ## Includes +- [Remote VLAN mechanism using forwarder-ovs](./rvlanovs) - [Remote VLAN mechanism using forwarder-vpp](./rvlanvpp) ## Run -1. Create secondary bridge network and connect kind-worker nodes: - - ```bash - docker network create bridge-2 - docker network connect bridge-2 kind-worker - docker network connect bridge-2 kind-worker2 - ``` - -2. Rename the newly generated interface to eth1 in both kind-workers: - - ```bash - ifw1=$(echo $(docker exec kind-worker ip link | tail -2 | head -1) | cut -f1 -d"@" | cut -f2 -d" ") - docker exec kind-worker ip link set $ifw1 down - docker exec kind-worker ip link set $ifw1 name eth1 - docker exec kind-worker ip link set eth1 up - ifw2=$(echo $(docker exec kind-worker2 ip link | tail -2 | head -1) | cut -f1 -d"@" | cut -f2 -d" ") - docker exec kind-worker2 ip link set $ifw2 down - docker exec kind-worker2 ip link set $ifw2 name eth1 - docker exec kind-worker2 ip link set eth1 up - ``` - -3. Create ns for deployments: - - ```bash - kubectl create ns nsm-system - ``` - -4. Apply NSM resources for basic tests: - - ```bash - kubectl apply -k . - ``` - -5. Wait for NSE application: - - ```bash - kubectl -n nsm-system wait --for=condition=ready --timeout=2m pod -l app=nse-remote-vlan - ``` - -6. Wait for admission-webhook-k8s: - - ```bash - WH=$(kubectl get pods -l app=admission-webhook-k8s -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}') - kubectl wait --for=condition=ready --timeout=1m pod ${WH} -n nsm-system - ``` +Create secondary bridge network and connect kind-worker nodes: + +```bash +docker network create bridge-2 +docker network connect bridge-2 kind-worker +docker network connect bridge-2 kind-worker2 +``` + +Rename the newly generated interface to eth1 in both kind-workers: + +```bash +ifw1=$(echo $(docker exec kind-worker ip link | tail -2 | head -1) | cut -f1 -d"@" | cut -f2 -d" ") +docker exec kind-worker ip link set $ifw1 down +docker exec kind-worker ip link set $ifw1 name eth1 +docker exec kind-worker ip link set eth1 up +ifw2=$(echo $(docker exec kind-worker2 ip link | tail -2 | head -1) | cut -f1 -d"@" | cut -f2 -d" ") +docker exec kind-worker2 ip link set $ifw2 down +docker exec kind-worker2 ip link set $ifw2 name eth1 +docker exec kind-worker2 ip link set eth1 up +``` + +Create ns for deployments: + +```bash +kubectl create ns nsm-system +``` + +Create NSE patch: + +```bash +cat > patch-nse.yaml < first-iperf-s.yaml < kustomization.yaml < Dockerfile < first-iperf-s.yaml < kustomization.yaml < ns-1/first-client.yaml < ns-1/patch-nse.yaml < ns-1/kustomization.yaml < ns-2/second-client.yaml < ns-2/third-client.yaml < ns-2/patch-nse.yaml < ns-2/kustomization.yaml < client.yaml < Dockerfile <