Skip to content

Commit

Permalink
Merge pull request #731 from Nordix/arpest_update_envs
Browse files Browse the repository at this point in the history
Align env vars
  • Loading branch information
denis-tingaikin authored May 14, 2024
2 parents 4fcba2f + 77f33a2 commit a94c0b0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
30 changes: 18 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,24 @@ Also it works as a device plugin server providing resources for the client pods.

`cmd-forwarder-sriov` accept following environment variables:

* `NSM_NAME` - A string value of forwarder network service endpoint name (default `sriov-forwarder`)
* `NSM_NS_NAME` - A string value of forwarder network service name (default `sriovns`)
* `NSM_CONNECT_TO` - A Network Service Manager connectTo URL (default `unix:///var/lib/networkservicemesh/nsm.io.sock`)
* `NSM_MAX_TOKEN_LIFETIME` - A token lifetime duration (default `24h`)
* `NSM_RESOURCE_POLL_TIMEOUT` - A timeout to poll device plugin resources usage from kubelet API (default `30s`)
* `NSM_DEVICE_PLUGIN_PATH` - Path to the device plugin directory (default `/var/lib/kubelet/device-plugins/`)
* `NSM_POD_RESOURCES_PATH` - Path to the pod resources directory (default `/var/lib/kubelet/pod-resources/`)
* `NSM_SRIOV_CONFIG_FILE` - Path to the config file (default `./pci.config`)
* `NSM_PCI_DEVICES_PATH` - Path to the PCI devices directory (default `/sys/bus/pci/devices`)
* `NSM_PCI_DRIVERS_PATH` - Path to the PCI drivers directory (default `/sys/bus/pci/drivers`)
* `NSM_CGROUP_PATH` - Path to the host `/sys/fs/cgroup/devices` directory (default `/host/sys/fs/cgroup/devices`)
* `NSM_VFIO_PATH` - Path to the host `/dev/vfio` directory (default `/host/dev/vfio`)
* `NSM_NAME` - A string value of forwarder network service endpoint name (default `sriov-forwarder`)
* `NSM_NSNAME` - A string value of forwarder network service name (default `sriovns`)
* `NSM_CONNECT_TO` - A Network Service Manager connectTo URL (default `unix:///var/lib/networkservicemesh/nsm.io.sock`)
* `NSM_MAX_TOKEN_LIFETIME` - A token lifetime duration (default `24h`)
* `NSM_RESOURCE_POLL_TIMEOUT` - A timeout to poll device plugin resources usage from kubelet API (default `30s`)
* `NSM_DEVICE_PLUGIN_PATH` - Path to the device plugin directory (default `/var/lib/kubelet/device-plugins/`)
* `NSM_POD_RESOURCES_PATH` - Path to the pod resources directory (default `/var/lib/kubelet/pod-resources/`)
* `NSM_SRIOV_CONFIG_FILE` - Path to the config file (default `./pci.config`)
* `NSM_PCI_DEVICES_PATH` - Path to the PCI devices directory (default `/sys/bus/pci/devices`)
* `NSM_PCI_DRIVERS_PATH` - Path to the PCI drivers directory (default `/sys/bus/pci/drivers`)
* `NSM_CGROUP_PATH` - Path to the host `/sys/fs/cgroup/devices` directory (default `/host/sys/fs/cgroup/devices`)
* `NSM_VFIO_PATH` - Path to the host `/dev/vfio` directory (default `/host/dev/vfio`)
* `NSM_DIAL_TIMEOUT` - Timeout for the dial the next endpoint
* `NSM_LABELS` - Labels related to this forwarder-sriov instance
* `NSM_LOG_LEVEL` - Log level
* `NSM_METRICS_EXPORT_INTERVAL` - interval between mertics exports
* `NSM_OPEN_TELEMETRY_ENDPOINT` - OpenTelemetry Collector Endpoint
* `NSM_REGISTRY_CLIENT_POLICIES` - paths to files and directories that contain registry client policies

## Config file

Expand Down
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
//
// Copyright (c) 2023 Cisco and/or its affiliates.
//
// Copyright (c) 2024 OpenInfra Foundation Europe. All rights reserved.
//
// SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -85,7 +87,7 @@ type Config struct {
CgroupPath string `default:"/host/sys/fs/cgroup/devices" desc:"path to the host cgroup directory" split_words:"true"`
VFIOPath string `default:"/host/dev/vfio" desc:"path to the host VFIO directory" split_words:"true"`
LogLevel string `default:"INFO" desc:"Log level" 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"`
}

Expand Down

0 comments on commit a94c0b0

Please sign in to comment.