From 4dba8b58274be473caeb020cd6a2b7388f5158b7 Mon Sep 17 00:00:00 2001
From: Alex ubuntu vm <alexdecb@yahoo.es>
Date: Wed, 29 Nov 2023 12:27:47 +0100
Subject: [PATCH] refactored code

---
 K8s/README.md                                 |  19 --
 K8s/provision/veth.sh                         |  11 -
 {operator/src => build}/controller/Dockerfile |   0
 .../controller/l2sm-controller-app-1.0.oar    | Bin
 .../controller/setup_controller.sh            |   0
 {operator/src => build}/operator/Dockerfile   |   0
 .../src => build}/operator/l2sm-operator.py   |   0
 {operator/src => build}/switch/Dockerfile     |   0
 {operator/src => build}/switch/go.mod         |   0
 {operator/src => build}/switch/main.go        |   0
 .../src => build}/switch/setup_switch.sh      |   0
 .../src => build}/switch/vswitch.ovsschema    |   0
 .../src/switch => configs}/sampleFile.json    |   0
 {operator => deployments}/README.md           |   0
 .../config/account.yaml                       |   0
 .../config/binding.yaml                       |   0
 .../deployController.yaml                     |   0
 .../custom-installation}/deployOperator.yaml  |   0
 .../custom-installation/deploySwitch.yaml     |   0
 .../interfaces_definitions/vhost1.yaml        |   0
 .../interfaces_definitions/vhost10.yaml       |   0
 .../interfaces_definitions/vhost2.yaml        |   0
 .../interfaces_definitions/vhost3.yaml        |   0
 .../interfaces_definitions/vhost4.yaml        |   0
 .../interfaces_definitions/vhost5.yaml        |   0
 .../interfaces_definitions/vhost6.yaml        |   0
 .../interfaces_definitions/vhost7.yaml        |   0
 .../interfaces_definitions/vhost8.yaml        |   0
 .../interfaces_definitions/vhost9.yaml        |   0
 .../custom-installation}/mysql/mysql-pv.yaml  |   0
 .../custom-installation}/mysql/mysql-pvc.yaml |   0
 deployments/l2sm-deployment.yaml              | 298 ++++++++++++++++++
 descriptors/networks/myfirstnetwork.yaml      |  10 -
 descriptors/networks/mysecondnetwork.yaml     |  10 -
 {descriptors => examples}/README.md           |   0
 .../ping-pong}/network.yaml                   |   0
 .../ping-pong}/ping.yaml                      |   0
 .../ping-pong}/pong.yaml                      |   0
 operator/daemonset/l2sm-switch-arm64.yaml     |  45 ---
 39 files changed, 298 insertions(+), 95 deletions(-)
 delete mode 100644 K8s/README.md
 delete mode 100755 K8s/provision/veth.sh
 rename {operator/src => build}/controller/Dockerfile (100%)
 rename {operator/src => build}/controller/l2sm-controller-app-1.0.oar (100%)
 rename {operator/src => build}/controller/setup_controller.sh (100%)
 rename {operator/src => build}/operator/Dockerfile (100%)
 rename {operator/src => build}/operator/l2sm-operator.py (100%)
 rename {operator/src => build}/switch/Dockerfile (100%)
 rename {operator/src => build}/switch/go.mod (100%)
 rename {operator/src => build}/switch/main.go (100%)
 rename {operator/src => build}/switch/setup_switch.sh (100%)
 rename {operator/src => build}/switch/vswitch.ovsschema (100%)
 rename {operator/src/switch => configs}/sampleFile.json (100%)
 rename {operator => deployments}/README.md (100%)
 rename {operator/deploy => deployments}/config/account.yaml (100%)
 rename {operator/deploy => deployments}/config/binding.yaml (100%)
 rename {operator/deploy/controller => deployments/custom-installation}/deployController.yaml (100%)
 rename {operator/deploy => deployments/custom-installation}/deployOperator.yaml (100%)
 rename operator/daemonset/l2sm-switch-amd64.yaml => deployments/custom-installation/deploySwitch.yaml (100%)
 rename {K8s => deployments/custom-installation}/interfaces_definitions/vhost1.yaml (100%)
 rename {K8s => deployments/custom-installation}/interfaces_definitions/vhost10.yaml (100%)
 rename {K8s => deployments/custom-installation}/interfaces_definitions/vhost2.yaml (100%)
 rename {K8s => deployments/custom-installation}/interfaces_definitions/vhost3.yaml (100%)
 rename {K8s => deployments/custom-installation}/interfaces_definitions/vhost4.yaml (100%)
 rename {K8s => deployments/custom-installation}/interfaces_definitions/vhost5.yaml (100%)
 rename {K8s => deployments/custom-installation}/interfaces_definitions/vhost6.yaml (100%)
 rename {K8s => deployments/custom-installation}/interfaces_definitions/vhost7.yaml (100%)
 rename {K8s => deployments/custom-installation}/interfaces_definitions/vhost8.yaml (100%)
 rename {K8s => deployments/custom-installation}/interfaces_definitions/vhost9.yaml (100%)
 rename {operator/deploy => deployments/custom-installation}/mysql/mysql-pv.yaml (100%)
 rename {operator/deploy => deployments/custom-installation}/mysql/mysql-pvc.yaml (100%)
 create mode 100644 deployments/l2sm-deployment.yaml
 delete mode 100644 descriptors/networks/myfirstnetwork.yaml
 delete mode 100644 descriptors/networks/mysecondnetwork.yaml
 rename {descriptors => examples}/README.md (100%)
 rename {descriptors/networks => examples/ping-pong}/network.yaml (100%)
 rename {descriptors/deployments => examples/ping-pong}/ping.yaml (100%)
 rename {descriptors/deployments => examples/ping-pong}/pong.yaml (100%)
 delete mode 100644 operator/daemonset/l2sm-switch-arm64.yaml

diff --git a/K8s/README.md b/K8s/README.md
deleted file mode 100644
index 9221c7a..0000000
--- a/K8s/README.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# How does L2S-M work?
-
-L2S-M takes a different approach to K8s networking in comparison with other solutions available, which mostly implement CNI plugins to be used as the main connectivity basis for a cluster. L2S-M is deployed as a complementary solution to these CNI Plugins, since it allows the creation and management of virtual networks in a K8s cluster in order to provide workloads with one (or several) interface(s) to communicate with other workloads attached to the same network(s) at the link-layer. The main CNI Plugin interface in these pods remains intact, allowing the standard K8s functionalities to still be available for the pods (services, communications using the main interface, etc.).
-
-The following figure outlines a high-level overview of L2S-M, with an illustrative example of a K8s cluster with L2S-M installed and running. L2S-M builds a programmable data plane using SDN switches over a K8s infrastructure. These switches can be either virtual (deployed by the L2S-M operator) or physical (such as those that can be found in a classic datacentre infrastructure). 
-
-![alt text](https://github.com/Networks-it-uc3m/L2S-M/blob/main/v1_architecture.png?raw=true)
-
-**NOTE**: The current version of L2S-M utilizes an infrastructure of virtual switches based on [Open Virtual Switch (OVS)](http://www.openvswitch.org). The integration of physical switches is currently ongoing.
-
-In L2S-M, a k8s node deploys a virtual SDN switch or is connected to a physical SDN switch. Virtual switches are interconnected through point-to-point links. These links are established using IP tunnels (based on VXLAN technologies). This way, SDN switches build an overlay network that interconnects all the K8s nodes. L2S-M uses an SDN controller to install forwarding rules on the virtual/physical switches. This way, data traffic among workloads is appropriately distributed through isolated virtual networks (i.e., the SDN controller instructs the switches which ports should be used to forward and/or block incoming/outgoing traffic).
-
-Specifically for K8s clusters, the element in charge of managing the creation, deletion and management of virtual networks is the L2S-M operator. This operator treats virtual networks as Multus CRDs, using the K8s events to detect the instances where a pod wants to attach/detach from a virtual network. In the former case, the operator will select one of the available interfaces in the SDN switch, and associate it with the virtual network that wants to be used. This interface will appear in the pod as a secondary interface that can be used to communicate with other pods attached to the network, which will be seen as if they were deployed in the same Local Area Network (LAN). The CNI interface remains intact.
-
-To provide isolation among virtual networks, the operator interacts with the SDN controller component to communicate which ports are associated with each virtual network, updating its status every time a pod is deployed/deleted. Using this information, the SDN controller injects the corresponding rules in the switches, forwarding and/or blocking traffic according to the virtual networks being used at each moment.
-
-**NOTE**: The current version of L2S-M utilizes a simple-switch implementation based on the [RYU](https://ryu.readthedocs.io/en/latest/) SDN controller. An SDN application to specifically support virtual network isolation is currently under implementation.
-
-More information on how to deploy virtualise workloads attached to virtual networks can be seen in the [ping-pong](https://github.com/Networks-it-uc3m/L2S-M/tree/main/descriptors) example.
diff --git a/K8s/provision/veth.sh b/K8s/provision/veth.sh
deleted file mode 100755
index 96fe2d9..0000000
--- a/K8s/provision/veth.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-ip link add dev vpod1 mtu 1400 type veth peer name vhost1 mtu 1450
-ip link add dev vpod2 mtu 1400 type veth peer name vhost2 mtu 1450
-ip link add dev vpod3 mtu 1400 type veth peer name vhost3 mtu 1450
-ip link add dev vpod4 mtu 1400 type veth peer name vhost4 mtu 1450
-ip link add dev vpod5 mtu 1400 type veth peer name vhost5 mtu 1450
-ip link add dev vpod6 mtu 1400 type veth peer name vhost6 mtu 1450
-ip link add dev vpod7 mtu 1400 type veth peer name vhost7 mtu 1450
-ip link add dev vpod8 mtu 1400 type veth peer name vhost8 mtu 1450
-ip link add dev vpod9 mtu 1400 type veth peer name vhost9 mtu 1450
-ip link add dev vpod10 mtu 1400 type veth peer name vhost10 mtu 1450
diff --git a/operator/src/controller/Dockerfile b/build/controller/Dockerfile
similarity index 100%
rename from operator/src/controller/Dockerfile
rename to build/controller/Dockerfile
diff --git a/operator/src/controller/l2sm-controller-app-1.0.oar b/build/controller/l2sm-controller-app-1.0.oar
similarity index 100%
rename from operator/src/controller/l2sm-controller-app-1.0.oar
rename to build/controller/l2sm-controller-app-1.0.oar
diff --git a/operator/src/controller/setup_controller.sh b/build/controller/setup_controller.sh
similarity index 100%
rename from operator/src/controller/setup_controller.sh
rename to build/controller/setup_controller.sh
diff --git a/operator/src/operator/Dockerfile b/build/operator/Dockerfile
similarity index 100%
rename from operator/src/operator/Dockerfile
rename to build/operator/Dockerfile
diff --git a/operator/src/operator/l2sm-operator.py b/build/operator/l2sm-operator.py
similarity index 100%
rename from operator/src/operator/l2sm-operator.py
rename to build/operator/l2sm-operator.py
diff --git a/operator/src/switch/Dockerfile b/build/switch/Dockerfile
similarity index 100%
rename from operator/src/switch/Dockerfile
rename to build/switch/Dockerfile
diff --git a/operator/src/switch/go.mod b/build/switch/go.mod
similarity index 100%
rename from operator/src/switch/go.mod
rename to build/switch/go.mod
diff --git a/operator/src/switch/main.go b/build/switch/main.go
similarity index 100%
rename from operator/src/switch/main.go
rename to build/switch/main.go
diff --git a/operator/src/switch/setup_switch.sh b/build/switch/setup_switch.sh
similarity index 100%
rename from operator/src/switch/setup_switch.sh
rename to build/switch/setup_switch.sh
diff --git a/operator/src/switch/vswitch.ovsschema b/build/switch/vswitch.ovsschema
similarity index 100%
rename from operator/src/switch/vswitch.ovsschema
rename to build/switch/vswitch.ovsschema
diff --git a/operator/src/switch/sampleFile.json b/configs/sampleFile.json
similarity index 100%
rename from operator/src/switch/sampleFile.json
rename to configs/sampleFile.json
diff --git a/operator/README.md b/deployments/README.md
similarity index 100%
rename from operator/README.md
rename to deployments/README.md
diff --git a/operator/deploy/config/account.yaml b/deployments/config/account.yaml
similarity index 100%
rename from operator/deploy/config/account.yaml
rename to deployments/config/account.yaml
diff --git a/operator/deploy/config/binding.yaml b/deployments/config/binding.yaml
similarity index 100%
rename from operator/deploy/config/binding.yaml
rename to deployments/config/binding.yaml
diff --git a/operator/deploy/controller/deployController.yaml b/deployments/custom-installation/deployController.yaml
similarity index 100%
rename from operator/deploy/controller/deployController.yaml
rename to deployments/custom-installation/deployController.yaml
diff --git a/operator/deploy/deployOperator.yaml b/deployments/custom-installation/deployOperator.yaml
similarity index 100%
rename from operator/deploy/deployOperator.yaml
rename to deployments/custom-installation/deployOperator.yaml
diff --git a/operator/daemonset/l2sm-switch-amd64.yaml b/deployments/custom-installation/deploySwitch.yaml
similarity index 100%
rename from operator/daemonset/l2sm-switch-amd64.yaml
rename to deployments/custom-installation/deploySwitch.yaml
diff --git a/K8s/interfaces_definitions/vhost1.yaml b/deployments/custom-installation/interfaces_definitions/vhost1.yaml
similarity index 100%
rename from K8s/interfaces_definitions/vhost1.yaml
rename to deployments/custom-installation/interfaces_definitions/vhost1.yaml
diff --git a/K8s/interfaces_definitions/vhost10.yaml b/deployments/custom-installation/interfaces_definitions/vhost10.yaml
similarity index 100%
rename from K8s/interfaces_definitions/vhost10.yaml
rename to deployments/custom-installation/interfaces_definitions/vhost10.yaml
diff --git a/K8s/interfaces_definitions/vhost2.yaml b/deployments/custom-installation/interfaces_definitions/vhost2.yaml
similarity index 100%
rename from K8s/interfaces_definitions/vhost2.yaml
rename to deployments/custom-installation/interfaces_definitions/vhost2.yaml
diff --git a/K8s/interfaces_definitions/vhost3.yaml b/deployments/custom-installation/interfaces_definitions/vhost3.yaml
similarity index 100%
rename from K8s/interfaces_definitions/vhost3.yaml
rename to deployments/custom-installation/interfaces_definitions/vhost3.yaml
diff --git a/K8s/interfaces_definitions/vhost4.yaml b/deployments/custom-installation/interfaces_definitions/vhost4.yaml
similarity index 100%
rename from K8s/interfaces_definitions/vhost4.yaml
rename to deployments/custom-installation/interfaces_definitions/vhost4.yaml
diff --git a/K8s/interfaces_definitions/vhost5.yaml b/deployments/custom-installation/interfaces_definitions/vhost5.yaml
similarity index 100%
rename from K8s/interfaces_definitions/vhost5.yaml
rename to deployments/custom-installation/interfaces_definitions/vhost5.yaml
diff --git a/K8s/interfaces_definitions/vhost6.yaml b/deployments/custom-installation/interfaces_definitions/vhost6.yaml
similarity index 100%
rename from K8s/interfaces_definitions/vhost6.yaml
rename to deployments/custom-installation/interfaces_definitions/vhost6.yaml
diff --git a/K8s/interfaces_definitions/vhost7.yaml b/deployments/custom-installation/interfaces_definitions/vhost7.yaml
similarity index 100%
rename from K8s/interfaces_definitions/vhost7.yaml
rename to deployments/custom-installation/interfaces_definitions/vhost7.yaml
diff --git a/K8s/interfaces_definitions/vhost8.yaml b/deployments/custom-installation/interfaces_definitions/vhost8.yaml
similarity index 100%
rename from K8s/interfaces_definitions/vhost8.yaml
rename to deployments/custom-installation/interfaces_definitions/vhost8.yaml
diff --git a/K8s/interfaces_definitions/vhost9.yaml b/deployments/custom-installation/interfaces_definitions/vhost9.yaml
similarity index 100%
rename from K8s/interfaces_definitions/vhost9.yaml
rename to deployments/custom-installation/interfaces_definitions/vhost9.yaml
diff --git a/operator/deploy/mysql/mysql-pv.yaml b/deployments/custom-installation/mysql/mysql-pv.yaml
similarity index 100%
rename from operator/deploy/mysql/mysql-pv.yaml
rename to deployments/custom-installation/mysql/mysql-pv.yaml
diff --git a/operator/deploy/mysql/mysql-pvc.yaml b/deployments/custom-installation/mysql/mysql-pvc.yaml
similarity index 100%
rename from operator/deploy/mysql/mysql-pvc.yaml
rename to deployments/custom-installation/mysql/mysql-pvc.yaml
diff --git a/deployments/l2sm-deployment.yaml b/deployments/l2sm-deployment.yaml
new file mode 100644
index 0000000..2ae0edc
--- /dev/null
+++ b/deployments/l2sm-deployment.yaml
@@ -0,0 +1,298 @@
+
+apiVersion: "k8s.cni.cncf.io/v1"
+kind: NetworkAttachmentDefinition
+metadata:
+  name: veth1
+spec:
+  config: '{
+      "cniVersion": "0.3.0",
+      "type": "bridge",
+      "device": "veth1"
+    }'
+---
+apiVersion: "k8s.cni.cncf.io/v1"
+kind: NetworkAttachmentDefinition
+metadata:
+  name: veth2
+spec:
+  config: '{
+      "cniVersion": "0.3.0",
+      "type": "bridge",
+      "device": "veth2"
+    }'
+---
+apiVersion: "k8s.cni.cncf.io/v1"
+kind: NetworkAttachmentDefinition
+metadata:
+  name: veth3
+spec:
+  config: '{
+      "cniVersion": "0.3.0",
+      "type": "bridge",
+      "device": "veth3"
+    }'
+---
+apiVersion: "k8s.cni.cncf.io/v1"
+kind: NetworkAttachmentDefinition
+metadata:
+  name: veth4
+spec:
+  config: '{
+      "cniVersion": "0.3.0",
+      "type": "bridge",
+      "device": "veth4"
+    }'
+---
+apiVersion: "k8s.cni.cncf.io/v1"
+kind: NetworkAttachmentDefinition
+metadata:
+  name: veth5
+spec:
+  config: '{
+      "cniVersion": "0.3.0",
+      "type": "bridge",
+      "device": "veth5"
+    }'
+---
+apiVersion: "k8s.cni.cncf.io/v1"
+kind: NetworkAttachmentDefinition
+metadata:
+  name: veth6
+spec:
+  config: '{
+      "cniVersion": "0.3.0",
+      "type": "bridge",
+      "device": "veth6"
+    }'
+---
+
+apiVersion: "k8s.cni.cncf.io/v1"
+kind: NetworkAttachmentDefinition
+metadata:
+  name: veth7
+spec:
+  config: '{
+      "cniVersion": "0.3.0",
+      "type": "bridge",
+      "device": "veth7"
+    }'
+---
+apiVersion: "k8s.cni.cncf.io/v1"
+kind: NetworkAttachmentDefinition
+metadata:
+  name: veth8
+spec:
+  config: '{
+      "cniVersion": "0.3.0",
+      "type": "bridge",
+      "device": "veth8"
+    }'
+---
+apiVersion: "k8s.cni.cncf.io/v1"
+kind: NetworkAttachmentDefinition
+metadata:
+  name: veth9
+spec:
+  config: '{
+      "cniVersion": "0.3.0",
+      "type": "bridge",
+      "device": "veth9"
+    }'
+---
+apiVersion: "k8s.cni.cncf.io/v1"
+kind: NetworkAttachmentDefinition
+metadata:
+  name: veth10
+spec:
+  config: '{
+      "cniVersion": "0.3.0",
+      "type": "bridge",
+      "device": "veth10"
+    }'
+---
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: l2sm-operator
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+  name: l2sm-operator
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: ClusterRole
+  name: cluster-admin
+subjects:
+  - kind: ServiceAccount
+    name: l2sm-operator
+    namespace: default
+---
+apiVersion: v1
+kind: PersistentVolume
+metadata:
+  name: mysql-pv
+  labels:
+    type: local
+spec:
+  storageClassName: manual
+  capacity:
+    storage: 2Gi
+  accessModes:
+    - ReadWriteOnce
+  hostPath:
+    path: "/mnt/data"
+---
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+  name: mysql-pv-claim
+spec:
+  storageClassName: manual
+  accessModes:
+    - ReadWriteOnce
+  resources:
+    requests:
+      storage: 2Gi
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: l2sm-controller
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: l2sm-controller
+  template:
+    metadata:
+      labels:
+        app: l2sm-controller
+    spec:
+      containers:
+      - name: l2sm-controller
+        image: alexdecb/l2sm-controller:latest
+        # readinessProbe:
+        #   httpGet:
+        #     path: /onos/v1/l2sm/networks/status   
+        #     port: 8181   
+        ports:
+        - containerPort: 6633
+        - containerPort: 8181
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: l2sm-controller-service
+spec:
+  selector:
+    app: l2sm-controller
+  ports:
+  - name: of13-port
+    protocol: TCP
+    port: 6633
+    targetPort: 6633
+  - name: http-port
+    protocol: TCP
+    port: 8181
+    targetPort: 8181
+  type: ClusterIP
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: l2sm-operator
+spec:
+  replicas: 1
+  strategy:
+    type: Recreate
+  selector:
+    matchLabels:
+      l2sm-component: l2sm-opt
+  template:
+    metadata:
+      labels:
+        l2sm-component: l2sm-opt
+    spec:
+      serviceAccountName: l2sm-operator
+      containers:
+      - image: alexdecb/l2sm-operator:2.1
+        name: l2sm-opt-pod
+        env:
+          - name: CONTROLLER_IP
+            value: l2sm-controller-service
+        #command: ["sleep","infinity"]
+      - image: mysql/mysql-server:5.7
+        name: mysql
+        env:
+          - name: MYSQL_ROOT_PASSWORD
+            value: password
+          - name: MYSQL_DATABASE
+            value: L2SM
+          - name: MYSQL_USER
+            value: l2sm
+          - name: MYSQL_PASSWORD
+            value: l2sm;
+        ports:
+          - containerPort: 3306
+            name: mysql
+        volumeMounts:
+          - name: mysql-persistent-storage
+            mountPath: /var/lib/mysql
+      volumes:
+        - name: mysql-persistent-storage
+          persistentVolumeClaim:
+            claimName: mysql-pv-claim
+      nodeSelector:
+        dedicated: master
+      tolerations:
+      - key: dedicated
+        operator: Equal
+        value: master
+        effect: NoSchedule
+---
+apiVersion: apps/v1
+kind: DaemonSet
+metadata:
+  name: l2sm-switch
+  #namespace: kube-system
+  labels:
+    l2sm-component: l2sm-switch
+spec:
+  selector:
+    matchLabels:
+      l2sm-component: l2sm-switch
+  template:
+    metadata:
+      labels:
+        l2sm-component: l2sm-switch
+      annotations:
+        k8s.v1.cni.cncf.io/networks: veth1, veth2, veth3, veth4, veth5, veth6, veth7, veth8, veth9, veth10
+    spec:
+      tolerations:
+      # this toleration is to have the daemonset runnable on master nodes
+      # remove it if your masters can't run pods
+      - key: node-role.kubernetes.io/master
+        operator: Exists
+        effect: NoSchedule
+      containers:
+      - name: l2sm-switch
+        image: alexdecb/l2sm-switch:2.1
+        command: ["/bin/sh","-c"]
+        args: ["setup_switch.sh && sleep infinity"]
+        env:
+        - name: NODENAME
+          valueFrom:
+            fieldRef:
+              fieldPath: spec.nodeName
+        - name: NVETHS
+          value: "10"  
+        - name: CONTROLLERIP
+          value: "l2sm-controller-service"
+        securityContext:
+          capabilities:
+            add: ["NET_ADMIN"]
+      nodeSelector:
+        kubernetes.io/arch: amd64
+
+
diff --git a/descriptors/networks/myfirstnetwork.yaml b/descriptors/networks/myfirstnetwork.yaml
deleted file mode 100644
index 484df5a..0000000
--- a/descriptors/networks/myfirstnetwork.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-apiVersion: "k8s.cni.cncf.io/v1"
-kind: NetworkAttachmentDefinition
-metadata:
-  name: my-first-network
-spec:
-  config: '{
-      "cniVersion": "0.3.0",
-      "type": "host-device",
-      "device": "l2sm-vNet"
-    }'
diff --git a/descriptors/networks/mysecondnetwork.yaml b/descriptors/networks/mysecondnetwork.yaml
deleted file mode 100644
index 948b050..0000000
--- a/descriptors/networks/mysecondnetwork.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-apiVersion: "k8s.cni.cncf.io/v1"
-kind: NetworkAttachmentDefinition
-metadata:
-  name: my-second-network
-spec:
-  config: '{
-      "cniVersion": "0.3.0",
-      "type": "host-device",
-      "device": "l2sm-vNet"
-    }'
diff --git a/descriptors/README.md b/examples/README.md
similarity index 100%
rename from descriptors/README.md
rename to examples/README.md
diff --git a/descriptors/networks/network.yaml b/examples/ping-pong/network.yaml
similarity index 100%
rename from descriptors/networks/network.yaml
rename to examples/ping-pong/network.yaml
diff --git a/descriptors/deployments/ping.yaml b/examples/ping-pong/ping.yaml
similarity index 100%
rename from descriptors/deployments/ping.yaml
rename to examples/ping-pong/ping.yaml
diff --git a/descriptors/deployments/pong.yaml b/examples/ping-pong/pong.yaml
similarity index 100%
rename from descriptors/deployments/pong.yaml
rename to examples/ping-pong/pong.yaml
diff --git a/operator/daemonset/l2sm-switch-arm64.yaml b/operator/daemonset/l2sm-switch-arm64.yaml
deleted file mode 100644
index 537a64b..0000000
--- a/operator/daemonset/l2sm-switch-arm64.yaml
+++ /dev/null
@@ -1,45 +0,0 @@
-apiVersion: apps/v1
-kind: DaemonSet
-metadata:
-  name: l2-ps-arm64
-  #namespace: kube-system
-  labels:
-    l2sm-component: l2-ps
-spec:
-  selector:
-    matchLabels:
-      l2sm-component: l2-ps
-  template:
-    metadata:
-      labels:
-        l2sm-component: l2-ps
-      annotations:
-        k8s.v1.cni.cncf.io/networks: vhost1@vhost1, vhost2@vhost2, vhost3@vhost3, vhost4@vhost4, vhost5@vhost5, vhost6@vhost6, vhost7@vhost7, vhost8@vhost8, vhost9@vhost9, vhost10@vhost10, vxlan1@vxlan1, vxlan2@vxlan2, vxlan3@vxlan3, vxlan4@vxlan4, vxlan5@vxlan5, vxlan6@vxlan6, vxlan7@vxlan7, vxlan8@vxlan8, vxlan9@vxlan9, vxlan10@vxlan10
-    spec:
-      tolerations:
-      # this toleration is to have the daemonset runnable on master nodes
-      # remove it if your masters can't run pods
-      - key: node-role.kubernetes.io/master
-        operator: Exists
-        effect: NoSchedule
-      containers:
-      - name: l2-ps
-        image: lewisfelix24/l2sm-ovs:latest
-        command: ["/bin/sh", "-c"]
-        args: ["ovsdb-server --remote=punix:/var/run/openvswitch/db.sock --remote=db:Open_vSwitch,Open_vSwitch,manager_options --pidfile=/var/run/openvswitch/ovsdb-server.pid 
-         --detach && ovs-vsctl --db=unix:/var/run/openvswitch/db.sock --no-wait init && ovs-vswitchd --pidfile=/var/run/openvswitch/ovs-vswitchd.pid --detach && 
-         ip link set vhost1 up && ip link set vhost2 up && ip link set vhost3 up && ip link set vhost4 up && ip link set vhost5 up && ip link set vhost6 up && ip link set vhost7 up && ip link set vhost8 up && 
-         ip link set vhost9 up && ip link set vhost10 up && ip link set vxlan1 up && ip link set vxlan2 up && ip link set vxlan3 up && ip link set vxlan4 up && ip link set vxlan5 up && ip link set vxlan6 up && 
-         ip link set vxlan7 up && ip link set vxlan8 up && ip link set vxlan9 up && ip link set vxlan10 up && 
-         ovs-vsctl add-br brtun && ip link set brtun up &&
-         ovs-vsctl add-port brtun vhost1 && ovs-vsctl add-port brtun vhost2 && ovs-vsctl add-port brtun vhost3 && ovs-vsctl add-port brtun vhost4 && ovs-vsctl add-port brtun vhost5 &&
-         ovs-vsctl add-port brtun vhost6 && ovs-vsctl add-port brtun vhost7 && ovs-vsctl add-port brtun vhost8 && ovs-vsctl add-port brtun vhost9 && ovs-vsctl add-port brtun vhost10 &&
-         ovs-vsctl add-port brtun vxlan1 && ovs-vsctl add-port brtun vxlan2 && ovs-vsctl add-port brtun vxlan3 && ovs-vsctl add-port brtun vxlan4 && ovs-vsctl add-port brtun vxlan5 &&
-         ovs-vsctl add-port brtun vxlan6 && ovs-vsctl add-port brtun vxlan7 && ovs-vsctl add-port brtun vxlan8 && ovs-vsctl add-port brtun vxlan9 && ovs-vsctl add-port brtun vxlan10 &&
-         /bin/sleep 3650d"]
-        imagePullPolicy: IfNotPresent
-        securityContext:
-          capabilities:
-            add: ["NET_ADMIN"]
-      nodeSelector:
-        kubernetes.io/arch: arm64
-- 
GitLab