-
Notifications
You must be signed in to change notification settings - Fork 20
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
make endpoint to honor sriov token #286
Conversation
main.go
Outdated
endpoint.WithAdditionalFunctionality( | ||
sriovTokens := tokens.FromEnv(os.Environ()) | ||
|
||
var additionalFunc endpoint.Option |
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.
var additionalFunc endpoint.Option | |
var tokenServer networkservice.NetworkServiceServer | |
switch len(sriovTokens) { | |
case 0: | |
tokenServer = null.NewServer() | |
case 1: | |
var tokenKey string | |
for tokenKey = range sriovTokens { | |
break | |
} | |
tokenServer = token.NewServer(tokenKey) | |
default: | |
log.FromContext(ctx).Fatalf("endpoint must be configured with none or only one sriov resource") | |
} |
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.
done.
@pperiyasamy Could you rebase this PR? :) |
d6caa1e
to
484b69b
Compare
done. |
I wondered if we should create a separate cmd repository for sriov supported endpoint. Benefits of this directions are:
@edwarnicke What do you think? |
484b69b
to
0800781
Compare
@denis-tingaikin we just add this sriov token server chain element conditionally and this can be decided with pod spec.
so do you really think we need another repo just for this ? |
@pperiyasamy Yes, as I said #286 (comment) separate repo makes sense to me, but I'm fine if @edwarnicke agree to merge this PR :) |
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@est.tech>
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@est.tech>
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@est.tech>
2c01671
to
0c37690
Compare
…k-sriov@main PR link: networkservicemesh/sdk-sriov#286 Commit: e344c25 Author: Ed Warnicke Date: 2021-10-19 12:50:08 -0500 Message: - Merge pull request #286 from networkservicemesh/update/networkservicemesh/sdk-kernel Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
aims to use sriov device for client connection using kernel mechanism.
Fixes #281 and Depends on this PR
Signed-off-by: Periyasamy Palanisamy periyasamy.palanisamy@est.tech