From 744e3698073bc8ba389a9afb6618c615270cfafd Mon Sep 17 00:00:00 2001 From: Ivan Kolodiazhnyi Date: Tue, 23 Feb 2021 13:46:40 +0200 Subject: [PATCH] Use the latest NFD instance This patch also configures '--instance' option for nfd-master to be able to deploy several NFD instances in one cluster. Signed-off-by: Ivan Kolodiazhnyi --- .../charts/node-feature-discovery/Chart.yaml | 2 +- .../templates/master.yaml | 4 ++-- .../templates/nfd-worker-conf.yaml | 2 +- .../templates/worker.yaml | 3 +++ deployment/network-operator/values.yaml | 21 ++++++++++++------- 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/deployment/network-operator/charts/node-feature-discovery/Chart.yaml b/deployment/network-operator/charts/node-feature-discovery/Chart.yaml index 42323324..2615eda8 100644 --- a/deployment/network-operator/charts/node-feature-discovery/Chart.yaml +++ b/deployment/network-operator/charts/node-feature-discovery/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: master +appVersion: v0.6.0-233-g3e00bfb description: | Detects hardware features available on each node in a Kubernetes cluster, and advertises those features using node labels. diff --git a/deployment/network-operator/charts/node-feature-discovery/templates/master.yaml b/deployment/network-operator/charts/node-feature-discovery/templates/master.yaml index 38e6cf0d..20106ae2 100644 --- a/deployment/network-operator/charts/node-feature-discovery/templates/master.yaml +++ b/deployment/network-operator/charts/node-feature-discovery/templates/master.yaml @@ -61,9 +61,9 @@ spec: resources: {{- toYaml .Values.master.resources | nindent 12 }} args: - { { - if .Values.master.instance | empty | not } } + {{- if .Values.master.instance | empty | not }} - "--instance={{ .Values.master.instance }}" - { { - end } } + {{- end }} ## Enable TLS authentication ## The example below assumes having the root certificate named ca.crt stored in ## a ConfigMap named nfd-ca-cert, and, the TLS authentication credentials stored diff --git a/deployment/network-operator/charts/node-feature-discovery/templates/nfd-worker-conf.yaml b/deployment/network-operator/charts/node-feature-discovery/templates/nfd-worker-conf.yaml index a16f17bb..ed22d9ee 100644 --- a/deployment/network-operator/charts/node-feature-discovery/templates/nfd-worker-conf.yaml +++ b/deployment/network-operator/charts/node-feature-discovery/templates/nfd-worker-conf.yaml @@ -1,5 +1,5 @@ {{/* - Copyright 2020 NVIDIA + Copyright 2021 NVIDIA Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/deployment/network-operator/charts/node-feature-discovery/templates/worker.yaml b/deployment/network-operator/charts/node-feature-discovery/templates/worker.yaml index a0434854..33723024 100644 --- a/deployment/network-operator/charts/node-feature-discovery/templates/worker.yaml +++ b/deployment/network-operator/charts/node-feature-discovery/templates/worker.yaml @@ -59,6 +59,9 @@ spec: args: - "--sleep-interval=60s" - "--server={{ include "node-feature-discovery.fullname" . }}-master:{{ .Values.master.service.port }}" + {{- with .Values.worker.options }} + - --options={{- toJson . }} + {{- end }} ## Enable TLS authentication (1/3) ## The example below assumes having the root certificate named ca.crt stored in ## a ConfigMap named nfd-ca-cert, and, the TLS authentication credentials stored diff --git a/deployment/network-operator/values.yaml b/deployment/network-operator/values.yaml index 27f8be29..f8181cd4 100644 --- a/deployment/network-operator/values.yaml +++ b/deployment/network-operator/values.yaml @@ -24,6 +24,10 @@ sriovNetworkOperator: # Node Feature discovery chart related values node-feature-discovery: + image: + pullPolicy: IfNotPresent + master: + instance: "nvidia.networking" worker: tolerations: - key: "node-role.kubernetes.io/master" @@ -34,15 +38,16 @@ node-feature-discovery: operator: "Equal" value: "present" effect: "NoSchedule" - options: + config: | sources: - pci: - deviceClassWhitelist: - - "02" - - "0200" - - "0207" - deviceLabelFields: - - vendor + pci: + deviceClassWhitelist: + - "02" + - "0200" + - "0207" + deviceLabelFields: + - vendor + # General Operator related values # The operator element allows to deploy network operator from an alternate location