From e3661bda30d679993e1a2ead57914f9201d167e0 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Tue, 25 Jan 2022 10:11:50 +0200 Subject: [PATCH] docs: use new custom rule format in worker config reference Also, update the reference linking to the documentation of the custom source to point to the customization guide. --- .../worker-configuration-reference.md | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/docs/advanced/worker-configuration-reference.md b/docs/advanced/worker-configuration-reference.md index 92b347bcc..85dccb14d 100644 --- a/docs/advanced/worker-configuration-reference.md +++ b/docs/advanced/worker-configuration-reference.md @@ -408,20 +408,25 @@ With the example config above NFD would publish labels like: List of rules to process in the custom feature source to create user-specific labels. Refer to the documentation of the -[custom feature source](../get-started/features.html#custom) for details of -the available rules and their configuration. +[custom feature source](customization-guide.html#custom-feature-source) for +details of the available rules and their configuration. Default: *empty* Example: ```yaml -source: +sources: custom: - - name: "my.custom.feature" - matchOn: - - loadedKMod: ["e1000e"] - - pciId: - class: ["0200"] - vendor: ["8086"] + - name: "my custom rule" + labels: + my-custom-feature: "true" + matchFeatures: + - feature: kernel.loadedmodule + matchExpressions: + e1000e: {op: Exists} + - feature: pci.device + matchExpressions: + class: {op: In, value: ["0200"]} + vendor: {op: In, value: ["8086"]} ```