Skip to content

Commit

Permalink
Align env vars (#1105)
Browse files Browse the repository at this point in the history
Signed-off-by: Arpad Kiss <[email protected]>
  • Loading branch information
arp-est authored May 14, 2024
1 parent 798ceaf commit bb4b501
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,37 @@ You can build the docker container by running:
docker build .
```

# Usage

## Environment config

* `NSM_NAME` - Name of Endpoint
* `NSM_LABELS` - Labels related to this forwarder-vpp instance
* `NSM_NSNAME` - Name of Network Service to Register with Registry
* `NSM_CONNECT_TO` - url to connect to
* `NSM_LISTEN_ON` - url to listen on
* `NSM_MAX_TOKEN_LIFETIME` - maximum lifetime of tokens
* `NSM_REGISTRY_CLIENT_POLICIES` - paths to files and directories that contain registry client policies
* `NSM_LOG_LEVEL` - Log level
* `NSM_DIAL_TIMEOUT` - Timeout for the dial the next endpoint
* `NSM_OPEN_TELEMETRY_ENDPOINT` - OpenTelemetry Collector Endpoint
* `NSM_METRICS_EXPORT_INTERVAL` - interval between mertics exports
* `NSM_TUNNEL_IP` - IP to use for tunnels
* `NSM_VXLAN_PORT` - VXLAN port to use
* `NSM_VPP_API_SOCKET` - filename of socket to connect to existing VPP instance.
* `NSM_VPP_INIT` - type of VPP initialization. Must be AF_XDP, AF_PACKET or NONE
* `NSM_VPP_INIT_PARAMS` - Configuration file path containing VPP API parameters for initialization
* `NSM_RESOURCE_POLL_TIMEOUT` - device plugin polling timeout
* `NSM_DEVICE_PLUGIN_PATH` - path to the device plugin directory
* `NSM_POD_RESOURCES_PATH` - path to the pod resources directory
* `NSM_DEVICE_SELECTOR_FILE` - config file for device name to label matching
* `NSM_SRIOV_CONFIG_FILE` - PCI resources config path
* `NSM_PCI_DEVICES_PATH` - path to the PCI devices directory
* `NSM_PCI_DRIVERS_PATH` - path to the PCI drivers directory
* `NSM_CGROUP_PATH` - path to the host cgroup directory
* `NSM_VFIO_PATH` - path to the host VFIO directory
* `NSM_MECHANISM_PRIORITY` - sets priorities for mechanisms

# Testing

## Testing Docker container
Expand Down
2 changes: 1 addition & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type Config struct {
RegistryClientPolicies []string `default:"etc/nsm/opa/common/.*.rego,etc/nsm/opa/registry/.*.rego,etc/nsm/opa/client/.*.rego" desc:"paths to files and directories that contain registry client policies" split_words:"true"`
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"`
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"`

TunnelIP net.IP `desc:"IP to use for tunnels" split_words:"true"`
Expand Down

0 comments on commit bb4b501

Please sign in to comment.