diff --git a/cmd/proxy/internal/client/utils.go b/cmd/proxy/internal/client/utils.go index b9654658..fdd1642c 100644 --- a/cmd/proxy/internal/client/utils.go +++ b/cmd/proxy/internal/client/utils.go @@ -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" ) @@ -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, diff --git a/cmd/tapa/main.go b/cmd/tapa/main.go index fb51b637..782ca30a 100644 --- a/cmd/tapa/main.go +++ b/cmd/tapa/main.go @@ -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" @@ -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, diff --git a/deployments/helm/templates/load-balancer.yaml b/deployments/helm/templates/load-balancer.yaml index 3a79d4a2..bbbdf6e9 100644 --- a/deployments/helm/templates/load-balancer.yaml +++ b/deployments/helm/templates/load-balancer.yaml @@ -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 diff --git a/deployments/helm/templates/nse-vlan.yaml b/deployments/helm/templates/nse-vlan.yaml index b2858df1..15248305 100644 --- a/deployments/helm/templates/nse-vlan.yaml +++ b/deployments/helm/templates/nse-vlan.yaml @@ -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 @@ -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: diff --git a/deployments/helm/values.yaml b/deployments/helm/values.yaml index bdd0567a..f86566bc 100644 --- a/deployments/helm/values.yaml +++ b/deployments/helm/values.yaml @@ -94,14 +94,14 @@ subnetPool: vlanNSE: image: cmd-nse-remote-vlan - version: v1.3.1 + version: v1.4.0 probe: addr: :5003 spiffe: true vlanNSC: image: cmd-nsc - version: v1.3.1 + version: v1.4.0 vlan: networkServiceName: external-vlan diff --git a/docs/demo/deployments/nsm/values.yaml b/docs/demo/deployments/nsm/values.yaml index 20eca475..36ef6552 100644 --- a/docs/demo/deployments/nsm/values.yaml +++ b/docs/demo/deployments/nsm/values.yaml @@ -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 pullPolicy: IfNotPresent registry: ghcr.io diff --git a/go.mod b/go.mod index f2670310..94f0334f 100644 --- a/go.mod +++ b/go.mod @@ -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 + github.com/networkservicemesh/sdk v1.4.0 + github.com/networkservicemesh/sdk-sriov v1.4.0 github.com/onsi/ginkgo v1.16.5 github.com/onsi/gomega v1.17.0 github.com/pkg/errors v0.9.1 diff --git a/go.sum b/go.sum index d6d9442c..2ce80704 100644 --- a/go.sum +++ b/go.sum @@ -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= @@ -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= @@ -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 h1:a7V5C760AtDKhygGOeWvl2Mx4X1wcKtrp9PIoMDSCGg= +github.com/networkservicemesh/api v1.4.0/go.mod h1:hOF2844BSstH1311oDMDgqqXS+kdc77htZNPRKl9mf8= +github.com/networkservicemesh/sdk v1.4.0 h1:ipVjmmjWYhnYvpo4N78JEOg7tjLB+DhYyyKbsJf5wPg= +github.com/networkservicemesh/sdk v1.4.0/go.mod h1:7cS1AlEYjHHUP60XvWBEv0tmVnIXaxMFgounaZgDmQk= +github.com/networkservicemesh/sdk-kernel v1.4.0/go.mod h1:piALeJBWjLDvghKG9r27ThFXSuYtRfFnTgBEZG4A7Yg= +github.com/networkservicemesh/sdk-sriov v1.4.0 h1:JFFUpQ+z1OLqTa+P7RtCQprNaJg4nLFYTCjKNfTZh3Y= +github.com/networkservicemesh/sdk-sriov v1.4.0/go.mod h1:umjPum97SQsB96sCAgdfoTU8GcHsE83sux7TKFlUeDQ= 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= @@ -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= @@ -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= @@ -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= diff --git a/pkg/nsm/client.go b/pkg/nsm/client.go index 6efaedc3..11b6f9e1 100644 --- a/pkg/nsm/client.go +++ b/pkg/nsm/client.go @@ -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" @@ -85,10 +85,10 @@ 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(), )) } @@ -96,7 +96,7 @@ func (apiClient *APIClient) setNetworkServiceRegistryClient() { clientOptions := apiClient.GetClientOptions() apiClient.NetworkServiceRegistryClient = registryclient.NewNetworkServiceRegistryClient( apiClient.context, - &apiClient.Config.ConnectTo, + registryclient.WithClientURL(&apiClient.Config.ConnectTo), registryclient.WithDialOptions(clientOptions...)) }