Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add priorityMechanisms chain element #1384

Merged

Conversation

glazychev-art
Copy link
Contributor

Signed-off-by: Artem Glazychev artem.glazychev@xored.com

Description

This PR adds priorityMechanisms chain element.
The input is a list of mechanisms by priority. On the Request, the chain element sorts the mechanism preferences according to these priorities.

This element will be used on the forwarder.

Issue link

networkservicemesh/sdk-vpp#638

How Has This Been Tested?

  • Added unit testing to cover
  • Tested manually
  • Tested by integration testing
  • Have not tested

Types of changes

  • Bug fix
  • New functionallity
  • Documentation
  • Refactoring
  • CI

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
"github.com/networkservicemesh/sdk/pkg/networkservice/core/next"
)

type priorityMechanismsClient struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we plan to use this in forwarder-vpp app?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We add it to the forwarder's chain, for example after filtermechanisms - https://github.com/networkservicemesh/sdk-vpp/blob/main/pkg/networkservice/chains/forwarder/server.go#L152
To pass values, we will use NSM_MECHANISM_PRIORITY env that is a prioritized list ([]string) - the first value has the highest priority.

For example, if we have

            - name: NSM_MECHANISM_PRIORITY
              value: ipsec

this means that the mechanismPreferences order will be: { IPSec, Wireguard }

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

/cc @edwarnicke

@glazychev-art glazychev-art force-pushed the prioritize_mechanism branch 2 times, most recently from 517f416 to a89233e Compare November 24, 2022 06:15
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
@denis-tingaikin denis-tingaikin merged commit 77ae7ab into networkservicemesh:main Dec 6, 2022
nsmbot pushed a commit to networkservicemesh/cmd-map-ip-k8s that referenced this pull request Dec 6, 2022
…k@main

PR link: networkservicemesh/sdk#1384

Commit: 77ae7ab
Author: Artem Glazychev
Date: 2022-12-06 16:30:00 +0700
Message:
  - Add priorityMechanisms chain element (#1384)
* Add priorityMechanisms chain element

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>

* Fix review comments

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/sdk-kernel that referenced this pull request Dec 6, 2022
…k@main

PR link: networkservicemesh/sdk#1384

Commit: 77ae7ab
Author: Artem Glazychev
Date: 2022-12-06 16:30:00 +0700
Message:
  - Add priorityMechanisms chain element (#1384)
* Add priorityMechanisms chain element

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>

* Fix review comments

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-ipam-vl3 that referenced this pull request Dec 6, 2022
…k@main

PR link: networkservicemesh/sdk#1384

Commit: 77ae7ab
Author: Artem Glazychev
Date: 2022-12-06 16:30:00 +0700
Message:
  - Add priorityMechanisms chain element (#1384)
* Add priorityMechanisms chain element

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>

* Fix review comments

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsmgr-proxy that referenced this pull request Dec 6, 2022
…k@main

PR link: networkservicemesh/sdk#1384

Commit: 77ae7ab
Author: Artem Glazychev
Date: 2022-12-06 16:30:00 +0700
Message:
  - Add priorityMechanisms chain element (#1384)
* Add priorityMechanisms chain element

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>

* Fix review comments

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nse-remote-vlan that referenced this pull request Dec 6, 2022
…k@main

PR link: networkservicemesh/sdk#1384

Commit: 77ae7ab
Author: Artem Glazychev
Date: 2022-12-06 16:30:00 +0700
Message:
  - Add priorityMechanisms chain element (#1384)
* Add priorityMechanisms chain element

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>

* Fix review comments

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsc-init that referenced this pull request Dec 6, 2022
…k@main

PR link: networkservicemesh/sdk#1384

Commit: 77ae7ab
Author: Artem Glazychev
Date: 2022-12-06 16:30:00 +0700
Message:
  - Add priorityMechanisms chain element (#1384)
* Add priorityMechanisms chain element

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>

* Fix review comments

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nse-vfio that referenced this pull request Dec 6, 2022
…k@main

PR link: networkservicemesh/sdk#1384

Commit: 77ae7ab
Author: Artem Glazychev
Date: 2022-12-06 16:30:00 +0700
Message:
  - Add priorityMechanisms chain element (#1384)
* Add priorityMechanisms chain element

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>

* Fix review comments

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-registry-proxy-dns that referenced this pull request Dec 6, 2022
…k@main

PR link: networkservicemesh/sdk#1384

Commit: 77ae7ab
Author: Artem Glazychev
Date: 2022-12-06 16:30:00 +0700
Message:
  - Add priorityMechanisms chain element (#1384)
* Add priorityMechanisms chain element

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>

* Fix review comments

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-admission-webhook-k8s that referenced this pull request Dec 6, 2022
…k@main

PR link: networkservicemesh/sdk#1384

Commit: 77ae7ab
Author: Artem Glazychev
Date: 2022-12-06 16:30:00 +0700
Message:
  - Add priorityMechanisms chain element (#1384)
* Add priorityMechanisms chain element

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>

* Fix review comments

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-cluster-info-k8s that referenced this pull request Dec 6, 2022
…k@main

PR link: networkservicemesh/sdk#1384

Commit: 77ae7ab
Author: Artem Glazychev
Date: 2022-12-06 16:30:00 +0700
Message:
  - Add priorityMechanisms chain element (#1384)
* Add priorityMechanisms chain element

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>

* Fix review comments

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-registry-memory that referenced this pull request Dec 6, 2022
…k@main

PR link: networkservicemesh/sdk#1384

Commit: 77ae7ab
Author: Artem Glazychev
Date: 2022-12-06 16:30:00 +0700
Message:
  - Add priorityMechanisms chain element (#1384)
* Add priorityMechanisms chain element

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>

* Fix review comments

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsmgr that referenced this pull request Dec 6, 2022
…k@main

PR link: networkservicemesh/sdk#1384

Commit: 77ae7ab
Author: Artem Glazychev
Date: 2022-12-06 16:30:00 +0700
Message:
  - Add priorityMechanisms chain element (#1384)
* Add priorityMechanisms chain element

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>

* Fix review comments

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/sdk-k8s that referenced this pull request Dec 6, 2022
…k@main

PR link: networkservicemesh/sdk#1384

Commit: 77ae7ab
Author: Artem Glazychev
Date: 2022-12-06 16:30:00 +0700
Message:
  - Add priorityMechanisms chain element (#1384)
* Add priorityMechanisms chain element

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>

* Fix review comments

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants