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 replaceNSEName chain element #1328

Merged

Conversation

glazychev-art
Copy link
Contributor

@glazychev-art glazychev-art commented Jul 19, 2022

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

Description

Split replacelabels chain element to replacelabels and replaceNSEName
We need to use already discovered NSE on refresh

Issue link

networkservicemesh/deployments-k8s#6305

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>
@@ -1,4 +1,4 @@
// Copyright (c) 2021 Doc.ai and/or its affiliates.
Copy link
Member

Choose a reason for hiding this comment

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

Should we return this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, done

@@ -795,6 +796,7 @@ func additionalFunctionalityChain(ctx context.Context, clientURL *url.URL, clien
client.WithAdditionalFunctionality(
mechanismtranslation.NewClient(),
replacelabels.NewClient(labels),
replacensename.NewClient(),
Copy link
Member

@denis-tingaikin denis-tingaikin Jul 20, 2022

Choose a reason for hiding this comment

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

Im mostly sure that we could face with the similar issue in future (when we need to replace something in pass through requests)

Should we create a pkg like passthrough and concatenate all needed replace elements?

Something like

package passthrough

func NewClient(labels map[string]string) networkservice.NetworkServiceClient {
return chain.NewClient(
          replacelabels.NewClient(labels),
          replacensename.NewClient(),
     )

}

And use passthrough chain in firewall nses?

/cc @edwarnicke

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a good idea, thanks!
Done

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
@denis-tingaikin denis-tingaikin merged commit 7349b1f into networkservicemesh:main Jul 20, 2022
nsmbot pushed a commit to networkservicemesh/cmd-admission-webhook-k8s that referenced this pull request Jul 20, 2022
…k@main

PR link: networkservicemesh/sdk#1328

Commit: 7349b1f
Author: Artem Glazychev
Date: 2022-07-20 16:29:51 +0700
Message:
  - Add replaceNSEName chain element (#1328)
* Add replaceNSEName chain element

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

* Create passthrough chain element

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsc-init that referenced this pull request Jul 20, 2022
…k@main

PR link: networkservicemesh/sdk#1328

Commit: 7349b1f
Author: Artem Glazychev
Date: 2022-07-20 16:29:51 +0700
Message:
  - Add replaceNSEName chain element (#1328)
* Add replaceNSEName chain element

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

* Create passthrough chain element

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/sdk-kernel that referenced this pull request Jul 20, 2022
…k@main

PR link: networkservicemesh/sdk#1328

Commit: 7349b1f
Author: Artem Glazychev
Date: 2022-07-20 16:29:51 +0700
Message:
  - Add replaceNSEName chain element (#1328)
* Add replaceNSEName chain element

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

* Create passthrough chain element

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsmgr that referenced this pull request Jul 20, 2022
…k@main

PR link: networkservicemesh/sdk#1328

Commit: 7349b1f
Author: Artem Glazychev
Date: 2022-07-20 16:29:51 +0700
Message:
  - Add replaceNSEName chain element (#1328)
* Add replaceNSEName chain element

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

* Create passthrough chain element

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsmgr-proxy that referenced this pull request Jul 20, 2022
…k@main

PR link: networkservicemesh/sdk#1328

Commit: 7349b1f
Author: Artem Glazychev
Date: 2022-07-20 16:29:51 +0700
Message:
  - Add replaceNSEName chain element (#1328)
* Add replaceNSEName chain element

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

* Create passthrough chain element

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-map-ip-k8s that referenced this pull request Jul 20, 2022
…k@main

PR link: networkservicemesh/sdk#1328

Commit: 7349b1f
Author: Artem Glazychev
Date: 2022-07-20 16:29:51 +0700
Message:
  - Add replaceNSEName chain element (#1328)
* Add replaceNSEName chain element

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

* Create passthrough chain element

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nse-vfio that referenced this pull request Jul 20, 2022
…k@main

PR link: networkservicemesh/sdk#1328

Commit: 7349b1f
Author: Artem Glazychev
Date: 2022-07-20 16:29:51 +0700
Message:
  - Add replaceNSEName chain element (#1328)
* Add replaceNSEName chain element

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

* Create passthrough chain element

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nse-remote-vlan that referenced this pull request Jul 20, 2022
…k@main

PR link: networkservicemesh/sdk#1328

Commit: 7349b1f
Author: Artem Glazychev
Date: 2022-07-20 16:29:51 +0700
Message:
  - Add replaceNSEName chain element (#1328)
* Add replaceNSEName chain element

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

* Create passthrough chain element

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-ipam-vl3 that referenced this pull request Jul 20, 2022
…k@main

PR link: networkservicemesh/sdk#1328

Commit: 7349b1f
Author: Artem Glazychev
Date: 2022-07-20 16:29:51 +0700
Message:
  - Add replaceNSEName chain element (#1328)
* Add replaceNSEName chain element

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

* Create passthrough chain element

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/sdk-k8s that referenced this pull request Jul 20, 2022
…k@main

PR link: networkservicemesh/sdk#1328

Commit: 7349b1f
Author: Artem Glazychev
Date: 2022-07-20 16:29:51 +0700
Message:
  - Add replaceNSEName chain element (#1328)
* Add replaceNSEName chain element

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

* Create passthrough chain element

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-registry-proxy-dns that referenced this pull request Jul 20, 2022
…k@main

PR link: networkservicemesh/sdk#1328

Commit: 7349b1f
Author: Artem Glazychev
Date: 2022-07-20 16:29:51 +0700
Message:
  - Add replaceNSEName chain element (#1328)
* Add replaceNSEName chain element

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

* Create passthrough chain element

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-registry-memory that referenced this pull request Jul 20, 2022
…k@main

PR link: networkservicemesh/sdk#1328

Commit: 7349b1f
Author: Artem Glazychev
Date: 2022-07-20 16:29:51 +0700
Message:
  - Add replaceNSEName chain element (#1328)
* Add replaceNSEName chain element

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

* Create passthrough chain element

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
anastasia-malysheva pushed a commit to anastasia-malysheva/sdk that referenced this pull request Jul 27, 2022
* Add replaceNSEName chain element

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

* Create passthrough chain element

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Signed-off-by: anastasia.malysheva <anastasia.malysheva@xored.com>
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