Skip to content

Commit

Permalink
Align env vars (#677)
Browse files Browse the repository at this point in the history
Signed-off-by: Arpad Kiss <arpad.a.kiss@est.tech>
  • Loading branch information
arp-est authored May 14, 2024
1 parent ddef9a3 commit 515e54b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,23 @@ You can build the docker container by running:
docker build .
```

# Usage

## Environment config


* `NSM_NAME` - Name of Network service manager (default: "nmgr")
* `NSM_LISTEN_ON` - url to listen on. tcp:// one will be used a public to register NSM. (default: "unix:///var/lib/networkservicemesh/nsm.io.sock")
* `NSM_REGISTRY_URL` - A NSE registry url to use (default: "tcp://localhost:5001")
* `NSM_MAX_TOKEN_LIFETIME` - maximum lifetime of tokens (default: "10m")
* `NSM_REGISTRY_SERVER_POLICIES` - paths to files and directories that contain registry server policies (default: "etc/nsm/opa/common/.*.rego,etc/nsm/opa/registry/.*.rego,etc/nsm/opa/server/.*.rego")
* `NSM_REGISTRY_CLIENT_POLICIES` - paths to files and directories that contain registry client policies (default: "etc/nsm/opa/common/.*.rego,etc/nsm/opa/registry/.*.rego,etc/nsm/opa/client/.*.rego")
* `NSM_LOG_LEVEL` - Log level (default: "INFO")
* `NSM_DIAL_TIMEOUT` - Timeout for the dial the next endpoint (default: "750ms")
* `NSM_FORWARDER_NETWORK_SERVICE_NAME` - the default service name for forwarder discovering (default: "forwarder")
* `NSM_OPEN_TELEMETRY_ENDPOINT` - OpenTelemetry Collector Endpoint (default: "otel-collector.observability.svc.cluster.local:4317")
* `NSM_METRICS_EXPORT_INTERVAL` - interval between mertics exports (default: "10s")

# Testing

## Testing Docker container
Expand Down Expand Up @@ -82,4 +99,4 @@ through to the point of running nsmgr, you will not be able to attach a debugger

# Build Docker image compatible with integration testing suite:

`docker build . -t networkservicemeshci/cmd-nsmgr:master && kind load docker-image networkservicemeshci/cmd-nsmgr:master`
`docker build . -t networkservicemeshci/cmd-nsmgr:master && kind load docker-image networkservicemeshci/cmd-nsmgr:master`
2 changes: 1 addition & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ type Config struct {
LogLevel string `default:"INFO" desc:"Log level" split_words:"true"`
DialTimeout time.Duration `default:"750ms" desc:"Timeout for the dial the next endpoint" split_words:"true"`
ForwarderNetworkServiceName string `default:"forwarder" desc:"the default service name for forwarder discovering" split_words:"true"`
OpenTelemetryEndpoint string `default:"otel-collector.observability.svc.cluster.local:4317" desc:"OpenTelemetry Collector Endpoint"`
OpenTelemetryEndpoint string `default:"otel-collector.observability.svc.cluster.local:4317" desc:"OpenTelemetry Collector Endpoint" split_words:"true"`
MetricsExportInterval time.Duration `default:"10s" desc:"interval between mertics exports" split_words:"true"`
}

0 comments on commit 515e54b

Please sign in to comment.