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

Update vpphelper manually #271

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,20 @@ docker build .

## Environment config

* `NSM_NAME` - Name of docker client
* `NSM_REQUEST_TIMEOUT` - timeout to request NSE
* `NSM_CONNECT_TO` - url to connect to
* `NSM_DIAL_TIMEOUT` - timeout to dial
* `NSM_MAX_TOKEN_LIFETIME` - maximum lifetime of tokens
* `NSM_TUNNEL_IP` - IP to use for tunnels
* `NSM_LABELS` - A list of client labels with format key1=val1,key2=val2, will be used a primary list for network services
* `NSM_NETWORK_SERVICES` - A list of Network Service Requests
* `NSM_FEDERATES_WITH` - Name of the federated domain
* `NSM_TRUST_DOMAIN` - Name of the trust domain
* `NSM_LOG_LEVEL` - Log level
* `NSM_PPROF_ENABLED` - is pprof enabled (default: "false")
* `NSM_PPROF_LISTEN_ON` - pprof URL to ListenAndServe (default: "localhost:6060")
* `NSM_NAME` - Name of docker client
* `NSM_REQUEST_TIMEOUT` - timeout to request NSE
* `NSM_CONNECT_TO` - url to connect to
* `NSM_DIAL_TIMEOUT` - timeout to dial
* `NSM_MAX_TOKEN_LIFETIME` - maximum lifetime of tokens
* `NSM_TUNNEL_IP` - IP to use for tunnels
* `NSM_LABELS` - A list of client labels with format key1=val1,key2=val2, will be used a primary list for network services
* `NSM_NETWORK_SERVICES` - A list of Network Service Requests
* `NSM_FEDERATES_WITH` - Name of the federated domain
* `NSM_TRUST_DOMAIN` - Name of the trust domain
* `NSM_LOG_LEVEL` - Log level
* `NSM_PPROF_ENABLED` - is pprof enabled (default: "false")
* `NSM_PPROF_LISTEN_ON` - pprof URL to ListenAndServe (default: "localhost:6060")
* `NSM_VPP_MIN_OPERATION_TIMEOUT` - minimum timeout for every vpp operation

# Testing

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/networkservicemesh/sdk v0.5.1-0.20241227223757-422abe9bfbdd
github.com/networkservicemesh/sdk-kernel v0.0.0-20241227224026-3bba51753247
github.com/networkservicemesh/sdk-vpp v0.0.0-20241227224413-166396795a3c
github.com/networkservicemesh/vpphelper v0.0.0-20240115135903-e2b961f768b6
github.com/networkservicemesh/vpphelper v0.0.0-20241209033247-bcb5c25a9f29
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.9.3
github.com/spiffe/go-spiffe/v2 v2.1.7
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ github.com/networkservicemesh/sdk-kernel v0.0.0-20241227224026-3bba51753247 h1:Z
github.com/networkservicemesh/sdk-kernel v0.0.0-20241227224026-3bba51753247/go.mod h1:BEcSP25b0qmilHCYv5QtGtADOI4sU8eX/lJskK5O5fc=
github.com/networkservicemesh/sdk-vpp v0.0.0-20241227224413-166396795a3c h1:sLos0zvQuAqbTjvIM0ZIJ+w0XE/RCDgrWfEz5N8zmPA=
github.com/networkservicemesh/sdk-vpp v0.0.0-20241227224413-166396795a3c/go.mod h1:UeWHbi3ozPYRxoA2nlZNWsSDnsMCr4PM5abgtJO93iM=
github.com/networkservicemesh/vpphelper v0.0.0-20240115135903-e2b961f768b6 h1:o+enN5yCikNXZN+hO+JjE+aLxBWq9+GMVF9GSQtpwMI=
github.com/networkservicemesh/vpphelper v0.0.0-20240115135903-e2b961f768b6/go.mod h1:n6+8PnoDvWj6WMryfU3J8HOCusgysFjQ0kGLfrcsDEM=
github.com/networkservicemesh/vpphelper v0.0.0-20241209033247-bcb5c25a9f29 h1:hqYoTeQ9mFOIoKUMBXg779SU2yJWrrapucKgoPNZ1co=
github.com/networkservicemesh/vpphelper v0.0.0-20241209033247-bcb5c25a9f29/go.mod h1:Qc5x5poZk5cVzcHk4ZIL6+NMC95uoitsmmnl7X9V/Yw=
github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=
github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
github.com/open-policy-agent/opa v0.44.0 h1:sEZthsrWBqIN+ShTMJ0Hcz6a3GkYsY4FaB2S/ou2hZk=
Expand Down
1 change: 1 addition & 0 deletions internal/imports/imports_linux.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ import (
"github.com/sirupsen/logrus"
"github.com/spiffe/go-spiffe/v2/spiffetls/tlsconfig"
"github.com/spiffe/go-spiffe/v2/workloadapi"
"go.fd.io/govpp/api"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"

"github.com/networkservicemesh/vpphelper"
"github.com/networkservicemesh/vpphelper/extendtimeout"

"github.com/networkservicemesh/api/pkg/api/networkservice"
"github.com/networkservicemesh/sdk/pkg/networkservice/chains/client"
Expand Down Expand Up @@ -98,6 +100,8 @@ type Config struct {

PprofEnabled bool `default:"false" desc:"is pprof enabled" split_words:"true"`
PprofListenOn string `default:"localhost:6060" desc:"pprof URL to ListenAndServe" split_words:"true"`

VPPMinOperationTimeout time.Duration `default:"2s" desc:"minimum timeout for every vpp operation" split_words:"true"`
}

// Process prints and processes env to config
Expand Down Expand Up @@ -203,6 +207,7 @@ func main() {
<-vppErrCh
}()
config.TunnelIP = vppinit.Must(vppinit.LinkToAfPacket(ctx, vppConn, config.TunnelIP))
vppConn = extendtimeout.NewConnection(vppConn, config.VPPMinOperationTimeout)

// ********************************************************************************
log.FromContext(ctx).Info("executing phase 3: start spire-server and spire-agent")
Expand Down Expand Up @@ -321,7 +326,7 @@ func main() {
<-vppErrCh
}

func createForwarder(ctx context.Context, cancel context.CancelFunc, config *Config, vppConn vpphelper.Connection, source *workloadapi.X509Source, tlsServerConfig *tls.Config, dialOptions ...grpc.DialOption) *url.URL {
func createForwarder(ctx context.Context, cancel context.CancelFunc, config *Config, vppConn api.Connection, source *workloadapi.X509Source, tlsServerConfig *tls.Config, dialOptions ...grpc.DialOption) *url.URL {
gRPCOptions := append(
tracing.WithTracing(),
grpc.Creds(
Expand Down
Loading