/node-feature-discovery-operator

Operator for managing Node Feature Discovery deployment

Primary LanguageGoApache License 2.0Apache-2.0

Node Feature Discovery Operator

The Node Feature Discovery operator manages detection of hardware features and configuration in a kubernetes cluster. The operator orchestrates all resources needed to run the Node-Feature-Discovery DaemonSet

Community, discussion, contribution, and support

Learn how to engage with the Kubernetes community on the community page.

You can reach the maintainers of this project at:

Building the operator

Checkout the sources

$ git clone https://github.com/kubernetes-sigs/node-feature-discovery-operator

Build the operator image

IMAGE_REGISTRY=<my registry>
make image 

Optionally you can push it to your image repo

IMAGE_REGISTRY=<my registry>
make push

Alternatively, instead of specifying variables on the command line, you can edit the Makefile to permanently change parameter defaults like name of the image or namespace where the operator is deployed.

Manual deploy of the operator

The default NodeFeatureDiscovery CR will create the operand (NFD) in the node-feature-discovery-operator namespace, also an empty nfd-worker-conf, the CR can be edited to choose another namespace, image, imagePullPolicy and nfd-worker-conf. See the manifests/0700_cr.yaml for the default values.

IMAGE_REGISTRY=<my registry>
make deploy 

The operator will use the operand node-feature-discovery image built from: https://github.com/kubernetes-sigs/node-feature-discovery

To uninstall the operator run

make undeploy

Extending Node-feature-discovery with sidecar containers and hooks

First see upstream documentation of the hook feature and how to create a correct hook file:

https://github.com/kubernetes-sigs/node-feature-discovery#local-user-specific-features.

The DaemonSet running on the workers will mount the hostPath: /etc/kubernetes/node-feature-discovery/source.d. Additional hooks can than be provided by a sidecar container that is as well running on the workers and mounting the same hostpath and writing the hook executable (shell-script, compiled code, ...) to this directory.

NFD will execute any file in this directory, if one needs any configuration for the hook, a separate configuration directory can be created under /etc/kubernetes/node-feature-discovery/source.d e.g. /etc/kubernetes/node-feature-discovery/source.d/own-hook-conf, NFD will not recurse deeper into the file hierarchy.

Code of conduct

Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.