-
Notifications
You must be signed in to change notification settings - Fork 36
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
Add replaceNSEName chain element #1328
Conversation
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
@@ -1,4 +1,4 @@ | |||
// Copyright (c) 2021 Doc.ai and/or its affiliates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we return this?
There was a problem hiding this comment.
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(), |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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>
…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>
…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>
…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>
…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>
…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>
…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>
…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>
…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>
…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>
…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>
…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>
…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>
* 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>
Signed-off-by: Artem Glazychev artem.glazychev@xored.com
Description
Split
replacelabels
chain element toreplacelabels
andreplaceNSEName
We need to use already discovered NSE on refresh
Issue link
networkservicemesh/deployments-k8s#6305
How Has This Been Tested?
Types of changes