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

NSM Uplift to 1.4.0 #231

Merged
merged 3 commits into from
Jun 8, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions cmd/proxy/internal/client/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
"github.com/networkservicemesh/sdk/pkg/networkservice/common/authorize"
"github.com/networkservicemesh/sdk/pkg/networkservice/common/heal"
"github.com/networkservicemesh/sdk/pkg/networkservice/common/mechanisms/sendfd"
"github.com/networkservicemesh/sdk/pkg/networkservice/connectioncontext/dnscontext"
"github.com/nordix/meridio/pkg/nsm"
)

Expand All @@ -46,8 +45,6 @@ func expirationTimeIsNull(expirationTime *timestamp.Timestamp) bool {
func newClient(ctx context.Context, name string, nsmAPIClient *nsm.APIClient, additionalFunctionality ...networkservice.NetworkServiceClient) networkservice.NetworkServiceClient {
additionalFunctionality = append(additionalFunctionality,
sendfd.NewClient(),
dnscontext.NewClient(dnscontext.WithChainContext(ctx)),
// excludedprefixes.NewClient(),
)

return client.NewClient(ctx,
Expand Down
3 changes: 0 additions & 3 deletions cmd/tapa/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import (
"github.com/networkservicemesh/sdk/pkg/networkservice/common/mechanisms"
"github.com/networkservicemesh/sdk/pkg/networkservice/common/mechanisms/kernel"
"github.com/networkservicemesh/sdk/pkg/networkservice/common/mechanisms/sendfd"
"github.com/networkservicemesh/sdk/pkg/networkservice/connectioncontext/dnscontext"
"github.com/networkservicemesh/sdk/pkg/networkservice/core/chain"
"github.com/networkservicemesh/sdk/pkg/tools/log"
ambassadorAPI "github.com/nordix/meridio/api/ambassador/v1"
Expand Down Expand Up @@ -141,8 +140,6 @@ func main() {
kernelmech.MECHANISM: chain.NewNetworkServiceClient(kernel.NewClient(kernel.WithInterfaceName("nsc"))),
}),
sendfd.NewClient(),
dnscontext.NewClient(dnscontext.WithChainContext(ctx)),
// excludedprefixes.NewClient(),
}

networkServiceClient := client.NewClient(ctx,
Expand Down
2 changes: 2 additions & 0 deletions deployments/helm/templates/load-balancer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ spec:
value: {{ .Values.maxTokenLifetime }}
- name: NSM_LOG_LEVEL
value: "TRACE"
- name: NSM_LIVENESSCHECKENABLED
value: "false"
volumeMounts:
- name: spire-agent-socket
mountPath: /run/spire/sockets
Expand Down
10 changes: 4 additions & 6 deletions deployments/helm/templates/nse-vlan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ spec:
- name: NSM_SERVICES
value: "{{ template "meridio.vlan.networkServiceName" . }} { vlan: {{ .Values.vlan.id }}; via: {{ .Values.vlan.interface }} }"
- name: NSM_CIDR_PREFIX
value: "{{ .Values.vlan.ipv4Prefix }}"
- name: NSM_IPV6_PREFIX
value: "{{ .Values.vlan.ipv6Prefix }}"
value: "{{ .Values.vlan.ipv4Prefix }},{{ .Values.vlan.ipv6Prefix }}"
- name: NSM_POINT2POINT
value: "False"
- name: NSM_REGISTER_SERVICE
Expand All @@ -62,10 +60,10 @@ spec:
readOnly: false
resources:
requests:
cpu: 100m
limits:
memory: 40Mi
cpu: 200m
limits:
memory: 100Mi
cpu: 400m
volumes:
- name: spire-agent-socket
hostPath:
Expand Down
4 changes: 2 additions & 2 deletions deployments/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ subnetPool:

vlanNSE:
image: cmd-nse-remote-vlan
version: v1.3.1
version: v1.4.0-rc.2
probe:
addr: :5003
spiffe: true

vlanNSC:
image: cmd-nsc
version: v1.3.1
version: v1.4.0-rc.2

vlan:
networkServiceName: external-vlan
Expand Down
2 changes: 1 addition & 1 deletion docs/demo/deployments/nsm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

tag: v1.3.1
tag: v1.4.0-rc.2
pullPolicy: IfNotPresent

registry: ghcr.io
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ require (
github.com/google/nftables v0.0.0-20210916140115-16a134723a96
github.com/google/uuid v1.2.0
github.com/kelseyhightower/envconfig v1.4.0
github.com/networkservicemesh/api v1.3.1
github.com/networkservicemesh/sdk v1.3.1
github.com/networkservicemesh/sdk-sriov v1.3.1
github.com/networkservicemesh/api v1.4.0-rc.2
github.com/networkservicemesh/sdk v1.4.0-rc.2
github.com/networkservicemesh/sdk-sriov v1.4.0-rc.2
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.17.0
github.com/pkg/errors v0.9.1
Expand Down
19 changes: 12 additions & 7 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL9
github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg=
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
github.com/go-ping/ping v1.0.0/go.mod h1:35JbSyV/BYqHwwRA6Zr1uVDm1637YlNOU61wI797NPI=
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
Expand Down Expand Up @@ -470,6 +471,7 @@ github.com/mdlayher/netlink v0.0.0-20190409211403-11939a169225/go.mod h1:eQB3mZE
github.com/mdlayher/netlink v0.0.0-20191009155606-de872b0d824b h1:W3er9pI7mt2gOqOWzwvx20iJ8Akiqz1mUMTxU6wdvl8=
github.com/mdlayher/netlink v0.0.0-20191009155606-de872b0d824b/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/miekg/dns v1.1.49/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME=
github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
Expand Down Expand Up @@ -511,13 +513,13 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi
github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4=
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/nats-io/stan.go v0.10.2/go.mod h1:vo2ax8K2IxaR3JtEMLZRFKIdoK/3o1/PKueapB7ezX0=
github.com/networkservicemesh/api v1.3.1 h1:dxe+6ezXle0TczQpfZJztHf1+3UcQkj0kyfzirXfL4s=
github.com/networkservicemesh/api v1.3.1/go.mod h1:B6meq/SWjWR6bGXZdXPfbOeaBK+T1JayLdtEJQCsXKU=
github.com/networkservicemesh/sdk v1.3.1 h1:SGuhONUtEvRvNyHtYIJGnyIvW1bZ6yQHPHoTCsYOdKg=
github.com/networkservicemesh/sdk v1.3.1/go.mod h1:E7EduCLfioJBrMyucSFiTZSkZjwxAQVByb5rtcCmjWM=
github.com/networkservicemesh/sdk-kernel v1.3.1/go.mod h1:iDh5SbUN6IYzhhnwjqdbk9PRRNdpySeyrbyrOQcV9gE=
github.com/networkservicemesh/sdk-sriov v1.3.1 h1:sW54Vyhu5Pa9hVD5dO/c5c0CvYo40WCGbWxglSr58XM=
github.com/networkservicemesh/sdk-sriov v1.3.1/go.mod h1:xmZn7irt7X0oYBIP/d/txlLkDaYdRoVVkW3y4ujWfIw=
github.com/networkservicemesh/api v1.4.0-rc.2 h1:4gqmhVHfu3ZPjWROpN6aUfpeMzaSepWvMoq6fDwmkQk=
github.com/networkservicemesh/api v1.4.0-rc.2/go.mod h1:hOF2844BSstH1311oDMDgqqXS+kdc77htZNPRKl9mf8=
github.com/networkservicemesh/sdk v1.4.0-rc.2 h1:31UaiEH7npSHJYTsRlIHOndWhNwr6WEWoVHeSYrmrPo=
github.com/networkservicemesh/sdk v1.4.0-rc.2/go.mod h1:kLoLTb1acAGmO0uByJYHQi8+sSSsplWeBPktSAzRVJg=
github.com/networkservicemesh/sdk-kernel v1.4.0-rc.2/go.mod h1:dpNpVU77JyI919KKOSjFA1r55e38y9xSkf70VemUJYo=
github.com/networkservicemesh/sdk-sriov v1.4.0-rc.2 h1:wGXDgzOQ3V3lZ6z6dTec8c0MPkbClRdLkL7FgCLbDIo=
github.com/networkservicemesh/sdk-sriov v1.4.0-rc.2/go.mod h1:E91Hg2Dt0dTxQJeB7yInIv5ZZ3s8BVc4kWWGMe+1eOs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
Expand Down Expand Up @@ -892,6 +894,7 @@ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
Expand All @@ -903,6 +906,7 @@ golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLd
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
Expand Down Expand Up @@ -1102,6 +1106,7 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM=
golang.org/x/tools v0.1.9 h1:j9KsMiaP1c3B0OTQGth0/k+miLGTgLsAFUCrF2vLcF8=
golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
Expand Down
8 changes: 4 additions & 4 deletions pkg/nsm/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/networkservicemesh/api/pkg/api/networkservice"
"github.com/networkservicemesh/api/pkg/api/registry"
registryclient "github.com/networkservicemesh/sdk/pkg/registry/chains/client"
registrysendfd "github.com/networkservicemesh/sdk/pkg/registry/common/sendfd"
"github.com/networkservicemesh/sdk/pkg/registry/common/sendfd"
"github.com/networkservicemesh/sdk/pkg/tools/grpcutils"
"github.com/networkservicemesh/sdk/pkg/tools/spiffejwt"
"github.com/networkservicemesh/sdk/pkg/tools/token"
Expand Down Expand Up @@ -85,18 +85,18 @@ func (apiClient *APIClient) setNetworkServiceEndpointRegistryClient() {
clientOptions := apiClient.GetClientOptions()
apiClient.NetworkServiceEndpointRegistryClient = registryclient.NewNetworkServiceEndpointRegistryClient(
apiClient.context,
&apiClient.Config.ConnectTo,
registryclient.WithClientURL(&apiClient.Config.ConnectTo),
registryclient.WithDialOptions(clientOptions...),
registryclient.WithNSEAdditionalFunctionality(
registrysendfd.NewNetworkServiceEndpointRegistryClient(),
sendfd.NewNetworkServiceEndpointRegistryClient(),
))
}

func (apiClient *APIClient) setNetworkServiceRegistryClient() {
clientOptions := apiClient.GetClientOptions()
apiClient.NetworkServiceRegistryClient = registryclient.NewNetworkServiceRegistryClient(
apiClient.context,
&apiClient.Config.ConnectTo,
registryclient.WithClientURL(&apiClient.Config.ConnectTo),
registryclient.WithDialOptions(clientOptions...))
}

Expand Down