diff options
author | Christian Pointner <equinox@spreadspace.org> | 2022-08-29 23:26:37 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2022-08-29 23:30:14 +0200 |
commit | f7c796cb94cf2b1909fb0124e5c49e88ef6f31ee (patch) | |
tree | 79d40d0686573cf6db13a925ad1b308767cd0e50 | |
parent | kubernetes/addon/nfd: make worker configurable (diff) |
kubernetes/nfd: some more tests and improvements
3 files changed, 38 insertions, 3 deletions
diff --git a/inventory/group_vars/k8s-emc/vars.yml b/inventory/group_vars/k8s-emc/vars.yml index efb944a5..31ccd4d9 100644 --- a/inventory/group_vars/k8s-emc/vars.yml +++ b/inventory/group_vars/k8s-emc/vars.yml @@ -71,8 +71,43 @@ kubernetes_openebs_zfs_storage_classes: kubernetes_cert_manager_version: 1.9.1 kubernetes_node_feature_discovery_version: 0.11.2 -kubernetes_node_feature_discovery_worker_config: +kubernetes_node_feature_discovery_worker_config: | core: labelSources: - "all" - "-cpu" + sources: + pci: + deviceClassWhitelist: ["03", "0b40", "12", "0400"] + custom: + - name: "intel.gpu" + labels: + "intel.feature.node.kubernetes.io/gpu": "true" + matchFeatures: + - feature: pci.device + matchExpressions: + vendor: {op: In, value: ["8086"]} + class: {op: In, value: ["0300", "0380"]} + - feature: kernel.loadedmodule + matchExpressions: + drm: {op: Exists} + - name: blackmagic.decklink" + labels: + "blackmagic.feature.node.kubernetes.io/decklink": "true" + matchAny: + - matchFeatures: + - feature: pci.device + matchExpressions: + vendor: {op: In, value: ["bdbd"]} + class: {op: In, value: ["0400"]} + - feature: kernel.loadedmodule + matchExpressions: + blackmagic: {op: Exists} + - matchFeatures: + - feature: pci.device + matchExpressions: + vendor: {op: In, value: ["bdbd"]} + class: {op: In, value: ["0400"]} + - feature: kernel.loadedmodule + matchExpressions: + blackmagic_io: {op: Exists} diff --git a/roles/kubernetes/addons/node-feature-discovery/defaults/main.yml b/roles/kubernetes/addons/node-feature-discovery/defaults/main.yml index f7dfb90a..6a9ec77c 100644 --- a/roles/kubernetes/addons/node-feature-discovery/defaults/main.yml +++ b/roles/kubernetes/addons/node-feature-discovery/defaults/main.yml @@ -1,4 +1,4 @@ --- # kubernetes_node_feature_discovery_version: 0.11.2 -kubernetes_node_feature_discovery_worker_config: {} +kubernetes_node_feature_discovery_worker_config: "" diff --git a/roles/kubernetes/addons/node-feature-discovery/templates/nfd-worker.conf.j2 b/roles/kubernetes/addons/node-feature-discovery/templates/nfd-worker.conf.j2 index 5a37beac..31441a38 100644 --- a/roles/kubernetes/addons/node-feature-discovery/templates/nfd-worker.conf.j2 +++ b/roles/kubernetes/addons/node-feature-discovery/templates/nfd-worker.conf.j2 @@ -1,2 +1,2 @@ # {{ ansible_managed }} -{{ kubernetes_node_feature_discovery_worker_config | to_nice_yaml(indent=2) }} +{{ kubernetes_node_feature_discovery_worker_config }} |