1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-14 20:56:42 +00:00

Merge pull request #396 from marquiz/docs/custom-source

docs: improve documentation of the custom source
This commit is contained in:
Kubernetes Prow Robot 2020-11-20 03:02:51 -08:00 committed by GitHub
commit b0c02455d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -124,7 +124,10 @@ capability might be supported but not enabled.
The Custom feature source allows the user to define features based on a mix of
predefined rules. A rule is provided input witch affects its process of
matching for a defined feature.
matching for a defined feature. The rules are specified in the
nfd-worker configuration file. See
[configuration](deployment-and-usage.md#configuration) for instructions and
examples how to set-up and manage the worker configuration.
To aid in making Custom Features clearer, we define a general and a per rule
nomenclature, keeping things as consistent as possible.
@ -139,8 +142,13 @@ Matcher :A composition of Rules, each Matcher may be composed of at most one
#### Custom Features Format (using the Nomenclature defined above)
Rules are specified under `sources.custom` in the nfd-worker configuration
file.
```yaml
- name: <feature name>
sources:
custom:
- name: <feature name>
matchOn:
- <Rule-1>: <Rule-1 Input>
[<Rule-2>: <Rule-2 Input>]
@ -148,10 +156,10 @@ Matcher :A composition of Rules, each Matcher may be composed of at most one
- ...
- ...
- <Matcher-N>
- <custom feature 2>
- ...
- ...
- <custom feature M>
- <custom feature 2>
- ...
- ...
- <custom feature M>
```
#### Matching process