From 3984a18b18778a91b0e737dd23fd37bfcf7011b5 Mon Sep 17 00:00:00 2001 From: Justin Scott Date: Thu, 24 Oct 2019 16:35:47 -0700 Subject: [PATCH] Add node-feature-discovery (#236) This adds the node-feature-discovery component. Partialy implements #32 Signed-off-by: Justin Scott --- clr-k8s-examples/create_stack.sh | 14 +++++++++++++- .../overlays/v0.4.0/kustomization.yaml | 5 +++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 clr-k8s-examples/node-feature-discovery/overlays/v0.4.0/kustomization.yaml diff --git a/clr-k8s-examples/create_stack.sh b/clr-k8s-examples/create_stack.sh index 38740f9..3287547 100755 --- a/clr-k8s-examples/create_stack.sh +++ b/clr-k8s-examples/create_stack.sh @@ -24,6 +24,7 @@ METRICS_VER="${CLRK8S_METRICS_VER:-v0.3.5}" PROMETHEUS_VER="${CLRK8S_PROMETHEUS_VER:-f458e85e5d7675f7bc253072e1b4c8892b51af0f}" CNI=${CLRK8S_CNI:-"canal"} RUNNER=${CLRK8S_RUNNER:-"crio"} +NFD_VER="${CLRK8S_NFD_VER:-v0.4.0}" function print_usage_exit() { exit_code=${1:-0} @@ -264,7 +265,6 @@ function metallb() { kubectl apply -k "${METALLB_DIR}/overlays/${METALLB_VER}" } - function npd() { NPD_VER=${1:-v0.6.6} NPD_URL="https://github.com/kubernetes/node-problem-detector.git" @@ -274,6 +274,16 @@ function npd() { kubectl apply -k "${NPD_DIR}/overlays/${NPD_VER}" } +# node feature discovery +function nfd() { + NFD_VER=${1:-$NFD_VER} + NFD_URL="https://github.com/kubernetes-sigs/node-feature-discovery.git" + NFD_DIR="node-feature-discovery" + get_repo "${NFD_URL}" "${NFD_DIR}/overlays/${NFD_VER}" + set_repo_version "${NFD_VER}" "${NFD_DIR}/overlays/${NFD_VER}/node-feature-discovery" + kubectl apply -k "${NFD_DIR}/overlays/${NFD_VER}" +} + function miscellaneous() { # dashboard @@ -340,6 +350,7 @@ command_handlers[storage]=storage command_handlers[monitoring]=monitoring command_handlers[metallb]=metallb command_handlers[npd]=npd +command_handlers[nfd]=nfd declare -A command_help command_help[init]="Only inits a cluster using kubeadm" @@ -347,6 +358,7 @@ command_help[cni]="Setup network for running cluster" command_help[minimal]="init + cni + kata + metrics" command_help[all]="minimal + storage + monitoring + miscellaneous" command_help[help]="show this message" +command_help[nfd]="node feature discovery" cd "${SCRIPT_DIR}" diff --git a/clr-k8s-examples/node-feature-discovery/overlays/v0.4.0/kustomization.yaml b/clr-k8s-examples/node-feature-discovery/overlays/v0.4.0/kustomization.yaml new file mode 100644 index 0000000..0707336 --- /dev/null +++ b/clr-k8s-examples/node-feature-discovery/overlays/v0.4.0/kustomization.yaml @@ -0,0 +1,5 @@ +resources: + - node-feature-discovery/nfd-daemonset-combined.yaml.template + - node-feature-discovery/nfd-worker-daemonset.yaml.template + +