// Module included in the following assemblies:
//
// * hardware_enablement/psap-node-feature-discovery-operator.adoc

:_mod-docs-content-type: REFERENCE
[id="nfd-topology-updater-command-line-flags_{context}"]
= NFD Topology Updater command-line flags

To view available command-line flags, run the `nfd-topology-updater -help` command. For example, in a podman container, run the following command:

[source,terminal]
----
$ podman run gcr.io/k8s-staging-nfd/node-feature-discovery:master nfd-topology-updater -help
----


[id="nfd-topology-updater-ca-file_{context}"]
== -ca-file

The `-ca-file` flag is one of the three flags, together with the `-cert-file` and `-key-file`flags, that controls the mutual TLS authentication on the NFD Topology Updater. This flag specifies the TLS root certificate that is used for verifying the authenticity of nfd-master.

Default: empty

[IMPORTANT]
====
The `-ca-file` flag must be specified together with the `-cert-file` and `-key-file` flags.
====

.Example
[source,terminal]
----
$ nfd-topology-updater -ca-file=/opt/nfd/ca.crt -cert-file=/opt/nfd/updater.crt -key-file=/opt/nfd/updater.key
----


[id="nfd-topology-updater-cert-file_{context}"]
== -cert-file

The `-cert-file` flag is one of the three flags, together with the `-ca-file` and `-key-file flags`, that controls mutual TLS authentication on the NFD Topology Updater. This flag specifies the TLS certificate presented for authenticating outgoing requests.

Default: empty

[IMPORTANT]
====
The `-cert-file` flag must be specified together with the `-ca-file` and `-key-file` flags.
====

.Example
[source,terminal]
----
$ nfd-topology-updater -cert-file=/opt/nfd/updater.crt -key-file=/opt/nfd/updater.key -ca-file=/opt/nfd/ca.crt
----


[id="nfd-topology-updater-help_{context}"]
== -h, -help

Print usage and exit.


[id="nfd-topology-updater-key-file_{context}"]
== -key-file

The `-key-file` flag is one of the three flags, together with the `-ca-file` and `-cert-file` flags, that controls the mutual TLS authentication on the NFD Topology Updater. This flag specifies the private key corresponding the given certificate file, or `-cert-file`, that is used for authenticating outgoing requests.

Default: empty

[IMPORTANT]
====
The `-key-file` flag must be specified together with the `-ca-file` and `-cert-file` flags.
====

.Example
[source,terminal]
----
$ nfd-topology-updater -key-file=/opt/nfd/updater.key -cert-file=/opt/nfd/updater.crt -ca-file=/opt/nfd/ca.crt
----


[id="nfd-topology-updater-kubelet-config-file_{context}"]
== -kubelet-config-file

The `-kubelet-config-file` specifies the path to the Kubelet's configuration
file.

Default: `/host-var/lib/kubelet/config.yaml`

.Example
[source,terminal]
----
$ nfd-topology-updater -kubelet-config-file=/var/lib/kubelet/config.yaml
----


[id="nfd-topology-updater-no-publish_{context}"]
== -no-publish

The `-no-publish` flag disables all communication with the nfd-master, making it a dry run flag for nfd-topology-updater. NFD Topology Updater runs resource hardware topology detection normally, but no CR requests are sent to nfd-master.

Default: `false`

.Example
[source,terminal]
----
$ nfd-topology-updater -no-publish
----

[id="nfd-topology-updater-oneshot_{context}"]
== -oneshot

The `-oneshot` flag causes the NFD Topology Updater to exit after one pass of resource hardware topology detection.

Default: `false`

.Example
[source,terminal]
----
$ nfd-topology-updater -oneshot -no-publish
----


[id="nfd-topology-updater-podresources-socket_{context}"]
== -podresources-socket

The `-podresources-socket` flag 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.

Default: `/host-var/liblib/kubelet/pod-resources/kubelet.sock`

.Example
[source,terminal]
----
$ nfd-topology-updater -podresources-socket=/var/lib/kubelet/pod-resources/kubelet.sock
----


[id="nfd-topology-updater-server_{context}"]
== -server

The `-server` flag specifies the address of the nfd-master endpoint to connect to.

Default: `localhost:8080`

.Example
[source,terminal]
----
$ nfd-topology-updater -server=nfd-master.nfd.svc.cluster.local:443
----


[id="nfd-topology-updater-server-name-override_{context}"]
== -server-name-override

The `-server-name-override` flag specifies the common name (CN) which to expect from the nfd-master TLS certificate. This flag is mostly intended for development and debugging purposes.

Default: empty

.Example
[source,terminal]
----
$ nfd-topology-updater -server-name-override=localhost
----


[id="nfd-topology-updater-sleep-interval_{context}"]
== -sleep-interval

The `-sleep-interval` flag specifies the interval between resource hardware topology re-examination and custom resource updates. A non-positive value implies infinite sleep interval and no re-detection is done.

Default: `60s`

.Example
[source,terminal]
----
$ nfd-topology-updater -sleep-interval=1h
----


[id="nfd-topology-updater-version_{context}"]
== -version

Print version and exit.


[id="nfd-topology-updater-watch-namespace_{context}"]
== -watch-namespace

The `-watch-namespace` flag 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 and debugging purposes. A `*` value means that all of the pods across all namespaces are considered during the accounting process.

Default: `*`

.Example
[source,terminal]
----
$ nfd-topology-updater -watch-namespace=rte
----
