deployments-k8s icon indicating copy to clipboard operation
deployments-k8s copied to clipboard

Feature: configure datapath for networkservice via defined forwarder interface

Open barby1138 opened this issue 1 year ago • 3 comments

Hi guys Another feature is missing for me is subj My vision for implementation: Example:

we have ability to configure selector in forwarder: for node/cluster1

---
interfaces:
  - name: int1
    matches:
       - labelSelector:
           - via: gw1

for node/cluster2

---
interfaces:
  - name: int2
    matches:
       - labelSelector:
           - via: gw1

And Im aware that int1 coonected to int2 via router. So I want data path to be routed via those interfaces. So...

for networkservice declaration I want to add gw_selector field:

Example:

apiVersion: networkservicemesh.io/v1
kind: NetworkService
metadata:
  name: registry-local-endpoint
spec:
  payload: ETHERNET

  matches:
  - routes:
    - destination_selector:
        app: nse-1
    source_selector: null
    gw_selector: gw1

What do you think? Thank you!!! Have a nice day!!!

barby1138 avatar Oct 03 '23 13:10 barby1138

Hello @barby1138, Thanks for the report!

In fact, we have the opportunity to use any host interface for the forwarder: for this we need to specify the NSM_TUNNEL_IP env. For example:

            - name: NSM_TUNNEL_IP
              value: "192.168.0.2"

The forwarder will automatically select the interface that has this IP. (see also https://github.com/networkservicemesh/deployments-k8s/blob/main/apps/forwarder-vpp/forwarder.yaml#L32-L35)

But this interface will be used for all connections (any NetworkServices). Will this be enough for you? Or do you want to use different interfaces for different services?

glazychev-art avatar Oct 24 '23 08:10 glazychev-art

Hi Artem

Yes exactly Ex usecase. I could have different "networks" for my services - like management plane and data plane. So for better/more optimal resource usage I d like to split paths. use kernel int for management and dpdk VF for data. Also data throughput could be too high to put to 1 interface so I d need to split data to several ints.

Thanks for your work!!! Have a good day!!!

barby1138 avatar Oct 24 '23 08:10 barby1138

@barby1138 Its interesting you arrived at this problem. I'd sort of thought of something similar before, where the forwarder connects to some set of 'network services' and you reach another network service 'via' one of those. Does that way of thinking of things match where you are going? Its a bit more abstract than just being interface or network oriented... but can scoop up those use cases :)

edwarnicke avatar Oct 30 '23 18:10 edwarnicke