2021-01-20 21:49:41 +00:00
|
|
|
---
|
|
|
|
title: "Topology Updater Cmdline Reference"
|
|
|
|
layout: default
|
2023-03-05 21:56:46 +00:00
|
|
|
sort: 5
|
2021-01-20 21:49:41 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# NFD-Topology-Updater Commandline Flags
|
|
|
|
{: .no_toc }
|
|
|
|
|
|
|
|
## Table of Contents
|
|
|
|
{: .no_toc .text-delta }
|
|
|
|
|
|
|
|
1. TOC
|
|
|
|
{:toc}
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
To quickly view available command line flags execute `nfd-topology-updater -help`.
|
|
|
|
In a docker container:
|
|
|
|
|
|
|
|
```bash
|
2022-11-09 17:25:58 +00:00
|
|
|
docker run {{ site.container_image }} \
|
|
|
|
nfd-topology-updater -help
|
2021-01-20 21:49:41 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
### -h, -help
|
|
|
|
|
|
|
|
Print usage and exit.
|
|
|
|
|
|
|
|
### -version
|
|
|
|
|
|
|
|
Print version and exit.
|
|
|
|
|
2022-11-09 17:25:58 +00:00
|
|
|
### -config
|
|
|
|
|
|
|
|
The `-config` flag specifies the path of the nfd-topology-updater
|
|
|
|
configuration file to use.
|
|
|
|
|
|
|
|
Default: /etc/kubernetes/node-feature-discovery/nfd-topology-updater.conf
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
nfd-topology-updater -config=/opt/nfd/nfd-topology-updater.conf
|
|
|
|
```
|
|
|
|
|
2021-01-20 21:49:41 +00:00
|
|
|
### -no-publish
|
|
|
|
|
2024-01-22 12:21:02 +00:00
|
|
|
The `-no-publish` flag makes for a "dry-run" flag for nfd-topology-updater.
|
|
|
|
NFD-Topology-Updater runs resource hardware topology detection normally, but
|
|
|
|
[NodeResourceTopology](../usage/custom-resources.md#noderesourcetopology)
|
|
|
|
objects are not created or updated.
|
2021-01-20 21:49:41 +00:00
|
|
|
|
|
|
|
Default: *false*
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
nfd-topology-updater -no-publish
|
|
|
|
```
|
|
|
|
|
|
|
|
### -oneshot
|
|
|
|
|
|
|
|
The `-oneshot` flag causes nfd-topology-updater to exit after one pass of
|
|
|
|
resource hardware topology detection.
|
|
|
|
|
|
|
|
Default: *false*
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
nfd-topology-updater -oneshot -no-publish
|
|
|
|
```
|
|
|
|
|
2023-08-04 13:17:11 +00:00
|
|
|
### -metrics
|
|
|
|
|
|
|
|
The `-metrics` flag specifies the port on which to expose
|
|
|
|
[Prometheus](https://prometheus.io/) metrics. Setting this to 0 disables the
|
|
|
|
metrics server on nfd-topology-updater.
|
|
|
|
|
|
|
|
Default: 8081
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
nfd-topology-updater -metrics=12345
|
|
|
|
```
|
|
|
|
|
2021-01-20 21:49:41 +00:00
|
|
|
### -sleep-interval
|
|
|
|
|
|
|
|
The `-sleep-interval` specifies the interval between resource hardware
|
2023-01-23 16:44:54 +00:00
|
|
|
topology re-examination (and CR updates). zero means no CR updates on interval basis.
|
2021-01-20 21:49:41 +00:00
|
|
|
|
|
|
|
Default: 60s
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
nfd-topology-updater -sleep-interval=1h
|
|
|
|
```
|
|
|
|
|
|
|
|
### -watch-namespace
|
|
|
|
|
|
|
|
The `-watch-namespace` specifies the namespace to ensure that resource
|
|
|
|
hardware topology examination only happens for the pods running in the
|
|
|
|
specified namespace. Pods that are not running in the specified namespace
|
|
|
|
are not considered during resource accounting. This is particularly useful
|
|
|
|
for testing/debugging purpose. A "*" value would mean that all the pods would
|
|
|
|
be considered during the accounting process.
|
|
|
|
|
|
|
|
Default: "*"
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
nfd-topology-updater -watch-namespace=rte
|
|
|
|
```
|
|
|
|
|
2022-11-07 11:58:40 +00:00
|
|
|
### -kubelet-config-uri
|
2021-01-20 21:49:41 +00:00
|
|
|
|
2022-11-07 11:58:40 +00:00
|
|
|
The `-kubelet-config-uri` specifies the path to the Kubelet's configuration.
|
|
|
|
Note that the URi could either be a local host file or an HTTP endpoint.
|
2021-01-20 21:49:41 +00:00
|
|
|
|
2023-05-05 09:35:44 +00:00
|
|
|
Default: `https://${NODE_ADDRESS}:10250/configz`
|
2021-01-20 21:49:41 +00:00
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```bash
|
2022-11-07 11:58:40 +00:00
|
|
|
nfd-topology-updater -kubelet-config-uri=file:///var/lib/kubelet/config.yaml
|
|
|
|
```
|
|
|
|
|
|
|
|
### -api-auth-token-file
|
|
|
|
|
|
|
|
The `-api-auth-token-file` specifies the path to the api auth token file
|
|
|
|
which is used to retrieve Kubelet's configuration from Kubelet secure port,
|
|
|
|
only taking effect when `-kubelet-config-uri` is https.
|
|
|
|
Note that this token file must bind to a role that has the `get` capability to
|
|
|
|
`nodes/proxy` resources.
|
|
|
|
|
|
|
|
Default: `/var/run/secrets/kubernetes.io/serviceaccount/token`
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
nfd-topology-updater -token-file=/var/run/secrets/kubernetes.io/serviceaccount/token
|
2021-01-20 21:49:41 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
### -podresources-socket
|
|
|
|
|
|
|
|
The `-podresources-socket` specifies the path to the Unix socket where kubelet
|
|
|
|
exports a gRPC service to enable discovery of in-use CPUs and devices, and to
|
|
|
|
provide metadata for them.
|
|
|
|
|
2021-11-12 12:23:29 +00:00
|
|
|
Default: /host-var/lib/kubelet/pod-resources/kubelet.sock
|
2021-01-20 21:49:41 +00:00
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
nfd-topology-updater -podresources-socket=/var/lib/kubelet/pod-resources/kubelet.sock
|
|
|
|
```
|
2023-02-01 11:41:09 +00:00
|
|
|
|
|
|
|
### -pods-fingerprint
|
|
|
|
|
2023-02-21 15:09:04 +00:00
|
|
|
Enables compute and report the pod set fingerprint in the NRT.
|
2023-02-01 11:41:09 +00:00
|
|
|
A pod fingerprint is a compact representation of the "node state" regarding resources.
|
|
|
|
|
|
|
|
Default: `false`
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
nfd-topology-updater -pods-fingerprint
|
|
|
|
```
|
2023-02-21 15:09:04 +00:00
|
|
|
|
|
|
|
### -kubelet-state-dir
|
|
|
|
|
|
|
|
The `-kubelet-state-dir` specifies the path to the Kubelet state directory,
|
|
|
|
where state and checkpoint files are stored.
|
|
|
|
The files are mount as read-only and cannot be change by the updater.
|
2023-02-21 19:43:43 +00:00
|
|
|
Enabled by default.
|
|
|
|
Passing an empty string will disable the watching.
|
2023-02-21 15:09:04 +00:00
|
|
|
|
|
|
|
Default: /host-var/lib/kubelet
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
nfd-topology-updater -kubelet-state-dir=/var/lib/kubelet
|
|
|
|
```
|