From 2cb8fc353b6d5c7905fd24d950beb2957f1efe5e Mon Sep 17 00:00:00 2001
From: Alex ubuntu vm <alexdecb@yahoo.es>
Date: Mon, 19 Feb 2024 14:55:08 +0100
Subject: [PATCH] examples: updated l2sm-network use guide

Following recent changes around the usage of l2sm-network, the ping pong example has been updated to showcase how the networks are defined
---
 examples/ping-pong/network.yaml | 9 +++------
 examples/ping-pong/ping.yaml    | 4 ++--
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/examples/ping-pong/network.yaml b/examples/ping-pong/network.yaml
index b7d2df2..b96a334 100644
--- a/examples/ping-pong/network.yaml
+++ b/examples/ping-pong/network.yaml
@@ -1,9 +1,6 @@
-apiVersion: "k8s.cni.cncf.io/v1"
-kind: NetworkAttachmentDefinition
+apiVersion: l2sm.k8s.local/v1
+kind: L2SMNetwork
 metadata:
   name: ping-network
 spec:
-  config: '{
-      "cniVersion": "0.3.0",
-      "type": "l2sm"
-    }'
+  type: vnet
\ No newline at end of file
diff --git a/examples/ping-pong/ping.yaml b/examples/ping-pong/ping.yaml
index dc86712..665ec1d 100644
--- a/examples/ping-pong/ping.yaml
+++ b/examples/ping-pong/ping.yaml
@@ -5,7 +5,7 @@ metadata:
   labels:
     app: ping-pong
   annotations:
-    k8s.v1.cni.cncf.io/networks: ping-network
+    l2sm/networks: ping-network
 spec:
   containers:
   - name: router
@@ -15,4 +15,4 @@ spec:
       capabilities:
         add: ["NET_ADMIN"]
   # Use this parameter if you want to place the pod in a specific node
-  #nodeName: masterk8s
+  nodeName: l2sm1
-- 
GitLab