From bb4b5017cd7022720598d39d72e753e9039e097f Mon Sep 17 00:00:00 2001 From: Arpad Kiss <158226216+arp-est@users.noreply.github.com> Date: Tue, 14 May 2024 12:22:20 +0200 Subject: [PATCH] Align env vars (#1105) Signed-off-by: Arpad Kiss --- README.md | 31 +++++++++++++++++++++++++++++++ internal/config/config.go | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6670bfda..edecd8e6 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/internal/config/config.go b/internal/config/config.go index 43a587ad..9e9c5498 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -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"`