1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00

Add documentation for topology garbage collector

Signed-off-by: PiotrProkop <pprokop@nvidia.com>
This commit is contained in:
PiotrProkop 2023-01-10 17:50:31 +01:00
parent 59afae50ba
commit 3143faf0ab
7 changed files with 105 additions and 3 deletions

View file

@ -173,5 +173,24 @@ We have introduced the following Chart parameters.
| `topologyUpdater.affinity` | dict | {} | Topology updater pod [affinity](https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/) | | `topologyUpdater.affinity` | dict | {} | Topology updater pod [affinity](https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/) |
| `topologyUpdater.config` | dict | | [configuration](../reference/topology-updater-configuration-reference) | | `topologyUpdater.config` | dict | | [configuration](../reference/topology-updater-configuration-reference) |
### Topology garbage collector parameters
| Name | Type | Default | description |
|-----------------------------------------------|--------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `topologyGC.*` | dict | | NFD Topology Garbage Collector configuration |
| `topologyGC.enable` | bool | true | Specifies whether the NFD Topology Garbage Collector should be created |
| `topologyGC.serviceAccount.create` | bool | true | Specifies whether the service account for topology garbage collector should be created |
| `topologyGC.serviceAccount.annotations` | dict | {} | Annotations to add to the service account for topology garbage collector |
| `topologyGC.serviceAccount.name` | string | | The name of the service account for topology garbage collector to use. If not set and create is true, a name is generated using the fullname template and `-topology-gc` suffix |
| `topologyGC.rbac.create` | bool | false | Specifies whether to create [RBAC][rbac] configuration for topology garbage collector |
| `topologyGC.interval` | string | 1h | Time between periodic garbage collector runs |
| `topologyGC.podSecurityContext` | dict | {} | [PodSecurityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) holds pod-level security attributes and common container settings |
| `topologyGC.securityContext` | dict | {} | Container [security settings](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) |
| `topologyGC.resources` | dict | {} | Topology garbage collector pod [resources management](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) |
| `topologyGC.nodeSelector` | dict | {} | Topology garbage collector pod [node selector](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) |
| `topologyGC.tolerations` | dict | {} | Topology garbage collector pod [node tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) |
| `topologyGC.annotations` | dict | {} | Topology garbage collector pod [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) |
| `topologyGC.affinity` | dict | {} | Topology garbage collector pod [affinity](https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/) |
<!-- Links --> <!-- Links -->
[rbac]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/ [rbac]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/

View file

@ -47,6 +47,14 @@ creates or updates a
resource object specific to this node. One instance of nfd-topology-updater is resource object specific to this node. One instance of nfd-topology-updater is
supposed to be running on each node of the cluster. supposed to be running on each node of the cluster.
## NFD-Topology-Garbage-Collector
NFD-Topology-Garbage-Collector is a daemon responsible for cleaning obsolete
[NodeResourceTopology](../usage/custom-resources#noderesourcetopology) objects,
obsolete means that there is no corresponding worker node.
One instance of nfd-topology-gc is supposed to be running in the cluster.
## Feature Discovery ## Feature Discovery
Feature discovery is divided into domain-specific feature sources: Feature discovery is divided into domain-specific feature sources:

View file

@ -0,0 +1,46 @@
---
title: "Topology Garbage Collector Cmdline Reference"
layout: default
sort: 6
---
# NFD-Topology-Garbage-Collector Commandline Flags
{: .no_toc }
## Table of Contents
{: .no_toc .text-delta }
1. TOC
{:toc}
---
To quickly view available command line flags execute `nfd-topology-gc -help`.
In a docker container:
```bash
docker run {{ site.container_image }} \
nfd-topology-gc -help
```
### -h, -help
Print usage and exit.
### -version
Print version and exit.
### -gc-interval
The `-gc-interval` specifies the interval between periodic garbage collector runs.
Default: 1h
Example:
```bash
nfd-topology-gc -gc-interval=1h
```

View file

@ -1,7 +1,7 @@
--- ---
title: "CRDs" title: "CRDs"
layout: default layout: default
sort: 6 sort: 7
--- ---
# Custom Resources # Custom Resources

View file

@ -1,7 +1,7 @@
--- ---
title: "Customization guide" title: "Customization guide"
layout: default layout: default
sort: 7 sort: 8
--- ---
# Customization guide # Customization guide

View file

@ -1,7 +1,7 @@
--- ---
title: "Examples and demos" title: "Examples and demos"
layout: default layout: default
sort: 8 sort: 9
--- ---
# Examples and demos # Examples and demos

View file

@ -0,0 +1,29 @@
---
title: "NFD-Topology-Garbage-Collector"
layout: default
sort: 6
---
# NFD-Topology-Garbage-Collector
{: .no_toc}
---
NFD-Topology-Garbage-Collector is preferably run as a Kubernetes deployment
with one replica. It makes sure that all
[NodeResourceTopology](custom-resources#noderesourcetopology)
have corresponding worker nodes and removes stale objects for worker nodes
which are no longer part of Kubernetes cluster.
This service watches for Node deletion events and removes NodeResourceTopology
objects upon them. It is also running periodically to make sure no event was
missed or NodeResourceTopology object was created without corresponding worker
node. The default garbage collector interval is set to 1h which is the value
when no -gc-interval is specified.
## Topology-Garbage-Collector Configuration
In Helm deployments,
(see [Topology Garbage Collector](../deployment/helm.md#topology-garbage-collector-parameters)
for parameters). NFD-Topology-Garbage-Collector will only be deployed when
topologyUpdater.enable is set to true.