diff --git a/deploy/helm/nfd-operator/values.yaml b/deploy/helm/nfd-operator/values.yaml index dc14e959..1663e635 100644 --- a/deploy/helm/nfd-operator/values.yaml +++ b/deploy/helm/nfd-operator/values.yaml @@ -16,7 +16,7 @@ namespaceOverride: "" enableNodeFeatureApi: false -nfd: +controller: image: repository: gcr.io/k8s-staging-nfd/node-feature-discovery tag: master \ No newline at end of file diff --git a/docs/advanced/index.md b/docs/advanced/index.md index 5c2e189d..38528611 100644 --- a/docs/advanced/index.md +++ b/docs/advanced/index.md @@ -1,9 +1,17 @@ --- title: "Advanced" layout: default -sort: 2 +sort: 3 --- # Advanced Advanced topics and reference. + +Continue to: + +- **[Developer guide](/developer-guide)** for instructions on how to + develop and test NFD-Operator. + +- **[NodeFeatureDiscovery](/NodeFeatureDiscovery)** for more information + about the NodeFeatureDiscovery CRD. diff --git a/docs/contributing/index.md b/docs/contributing/index.md index 09d91e69..49c0f558 100644 --- a/docs/contributing/index.md +++ b/docs/contributing/index.md @@ -1,7 +1,7 @@ --- title: "Contributing" layout: default -sort: 3 +sort: 4 --- # Contributing diff --git a/docs/deployment/cleanup.md b/docs/deployment/cleanup.md new file mode 100644 index 00000000..98804dd0 --- /dev/null +++ b/docs/deployment/cleanup.md @@ -0,0 +1,23 @@ +--- +title: "Cleanup" +layout: default +sort: 4 +--- + +# Removing feature labels + +From the [Operand repository][nfd] NFD-Master has a special `-prune` command +line flag for removing all nfd-related node labels, annotations and extended +resources from the cluster. + +In order to remove all feature labels from the cluster, run the following +command: + +```bash +kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/prune?ref={{ site.release }} +kubectl -n node-feature-discovery wait job.batch/nfd-master --for=condition=complete && \ + kubectl delete -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/prune?ref={{ site.release }} +``` + + +[nfd]: https://github.com/kubernetes-sigs/node-feature-discovery diff --git a/docs/deployment/helm.md b/docs/deployment/helm.md new file mode 100644 index 00000000..48c5a882 --- /dev/null +++ b/docs/deployment/helm.md @@ -0,0 +1,112 @@ +--- +title: "Helm" +layout: default +sort: 1 +--- + +# Deployment with Helm + +{: .no_toc} + +## Table of contents + +{: .no_toc .text-delta} + +1. TOC +{:toc} + +--- + +Helm chart allow to easily deploy and manage the NFD-operator. + +> NOTE: NFD-operator is not ideal for other Helm charts to depend on as that +> may result in multiple parallel NFD-operator deployments in the same cluster +> which is not fully supported by the NFD-operator Helm chart. + +## Prerequisites + +[Helm package manager](https://helm.sh/) should be installed. + +## Deployment + +To install the latest stable version: + +```bash +export NFD_O_NS=nfd-operator +helm repo add nfd-operator https://kubernetes-sigs.github.io/node-feature-discovery-operator/charts +helm repo update +helm install nfd-operator/nfd-operator --namespace $NFD_O_NS --create-namespace --generate-name +``` + +To install the latest development version you need to clone the NFD-Operator Git +repository and install from there. + +```bash +git clone https://github.com/kubernetes-sigs/node-feature-discovery-operator/ +cd node-feature-discovery-operator/deployment/helm +export NFD_O_NS=nfd-operator +helm install nfd-operator ./nfd-operator/ --namespace $NFD_O_NS --create-namespace +``` + +See the [configuration](#configuration) section below for instructions how to +alter the deployment parameters. + +In order to deploy the [minimal](image-variants.md#minimal) image you need to +override the image tag: + +```bash +helm install nfd-operator ./nfd-operator/ --set image.tag={{ site.release }}-minimal --namespace $NFD_O_NS --create-namespace +``` + +## Configuration + +You can override values from `values.yaml` and provide a file with custom values: + +```bash +export NFD_O_NS=nfd-operator +helm install nfd-operator/nfd-operator -f --namespace $NFD_O_NS --create-namespace +``` + +To specify each parameter separately you can provide them to helm install command: + +```bash +export NFD_O_NS=nfd-operator +helm install nfd-operator/nfd-operator --set nameOverride=NFDinstance --namespace $NFD_O_NS --create-namespace +``` + +## Uninstalling the chart + +To uninstall the `nfd-operator` deployment: + +```bash +export NFD_O_NS=nfd-operator +helm uninstall nfd-operator --namespace $NFD_O_NS +``` + +The command removes all the Kubernetes components associated with the chart and +deletes the release. + +## Chart parameters + +In order to tailor the deployment of the Node Feature Discovery to your cluster needs +We have introduced the following Chart parameters. + +### General parameters + +| Name | Type | Default | description | +| ---- | ---- | ------- | ----------- | +| `image.repository` | string | `{{ site.container_image | split: ":" | first }}` | NFD image repository | +| `image.tag` | string | `{{ site.release }}` | NFD image tag | +| `image.pullPolicy` | string | `Always` | Image pull policy | +| `imagePullSecrets` | list | [] | ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. [More info](https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod) | +| `nameOverride` | string | | Override the name of the chart | +| `fullnameOverride` | string | | Override a default fully qualified app name | + +### Controller deployment parameters + +| Name | Type | Default | description | +| ---- | ---- | ------- | ----------- | +| `controller.image.repository` | string | `{{ site.container_image | split: ":" | first }}` | NFD-Operator image repository | +| `controller.image.tag` | string | `{{ site.release }}` | NFD-Operator image tag | + +[rbac]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/ diff --git a/docs/deployment/image-variants.md b/docs/deployment/image-variants.md new file mode 100644 index 00000000..1a03a14c --- /dev/null +++ b/docs/deployment/image-variants.md @@ -0,0 +1,39 @@ +--- +title: "Image variants" +layout: default +sort: 3 +--- + +# Image variants + +{: .no_toc} + +## Table of contents + +{: .no_toc .text-delta} + +1. TOC +{:toc} + +--- + +# Image variants + +Node-Feautre-Discovery-Operator currently offers two variants +of the container image. The "full" variant is currently +deployed by default. + +## Default + +This is a minimal image based on: +[gcr.io/distroless/base](https://github.com/GoogleContainerTools/distroless/blob/master/base/README.md) + +The container image tag has suffix `-minimal` +(e.g. `{{ site.container_image }}-minimal`) +and the image is deployed by default. + +## Full + +This image is based on +[debian:buster-slim](https://hub.docker.com/_/debian) and contains a full Linux +system for doing live debugging and diagnosis of the operator. diff --git a/docs/deployment/index.md b/docs/deployment/index.md new file mode 100644 index 00000000..6bff538e --- /dev/null +++ b/docs/deployment/index.md @@ -0,0 +1,19 @@ +--- +title: "Deployment" +layout: default +sort: 2 +--- + +# Deployment + +[Installation](manual) provides instructions for installing NFD-Operator to a +cluster. + +[Uninstallation](manual) provides instructions for removing NFD-Operator from a +cluster. + +[Using Helm](helm) provides easy management of NFD-Operator deployments with +nice configuration management and easy upgrades. + +See [Image variants](image-variants) for description of the different NFD-Operator +container images available. diff --git a/docs/get-started/quick-start.md b/docs/deployment/manual.md similarity index 71% rename from docs/get-started/quick-start.md rename to docs/deployment/manual.md index a9d99e49..2d6efbea 100644 --- a/docs/get-started/quick-start.md +++ b/docs/deployment/manual.md @@ -1,16 +1,28 @@ --- -title: "Quick start" +title: "Manual deployment" layout: default sort: 2 --- +# Manual deployment + +{: .no_toc} + +## Table of contents + +{: .no_toc .text-delta} + +1. TOC +{:toc} + +--- # Requirements 1. Linux (x86_64/Arm64/Arm) 1. [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl) (properly set up and configured to work with your Kubernetes cluster) -# Quick start +# Manual deployment Get the source code @@ -41,27 +53,6 @@ Create a NodeFeatureDiscovery instance kubectl apply -f config/samples/nfd.kubernetes.io_v1_nodefeaturediscovery.yaml ``` -## Image variants - -Node-Feautre-Discovery-Operator currently offers two variants -of the container image. The "full" variant is currently -deployed by default. - -### Full - -This image is based on -[debian:buster-slim](https://hub.docker.com/_/debian) and contains a full Linux -system for doing live debugging and diagnosis of the operator. - -### Minimal - -This is a minimal image based on -[gcr.io/distroless/base](https://github.com/GoogleContainerTools/distroless/blob/master/base/README.md) -and only supports running statically linked binaries. - -The container image tag has suffix `-minimal` -(e.g. `{{ site.container_image }}-minimal`) - ## Verify The Operator will deploy NFD based on the information @@ -88,3 +79,26 @@ $ kubectl get no -o json | jq .items[].metadata.labels "kubernetes.io/os": "linux", ... ``` + +# Uninstallation + +If you followed the deployment instructions from the above you +can simply do: + +```bash +kubectl -n nfd-operator delete NodeFeatureDiscovery my-nfd-deployment +``` + +Optionally, you can also remove the namespace: + +```bash +kubectl delete ns nfd-operator +``` + +See the [node-feature-discovery-operator][nfd-operator] and [OLM][OLM] project +documentation for instructions for uninstalling the operator and operator +lifecycle manager, respectively. + + +[nfd-operator]: https://github.com/kubernetes-sigs/node-feature-discovery-operator +[OLM]: https://github.com/operator-framework/operator-lifecycle-manager diff --git a/docs/get-started/index.md b/docs/get-started/index.md deleted file mode 100644 index 2ef74ba5..00000000 --- a/docs/get-started/index.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: "Get Started" -layout: default -sort: 1 ---- - -# Node Feature Discovery Operator - -Welcome to Node Feature Discovery Operator – an Operator -Framework implementation around the Node Feature Discovery project to enable -detecting hardware features and system configuration! - -Continue to: - -- **[Introduction](introduction.md)** for more details on the - project. - -- **[Quick start](quick-start.md)** for quick step-by-step - instructions on how to get NFD running on your cluster. diff --git a/docs/index.html b/docs/index.html index f22e68ef..2f858e06 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/get-started/introduction.md b/docs/introduction/index.md similarity index 59% rename from docs/get-started/introduction.md rename to docs/introduction/index.md index a44df65d..b01ad6e0 100644 --- a/docs/get-started/introduction.md +++ b/docs/introduction/index.md @@ -4,6 +4,20 @@ layout: default sort: 1 --- +# Node Feature Discovery Operator + +Welcome to Node Feature Discovery Operator – an Operator +Framework implementation around the Node Feature Discovery project to enable +detecting hardware features and system configuration! + +Continue to: + +- **[Deployment](/deployment)** for instructions on how to + deploy NFD-Operator to a cluster. + +- **[Advanced](/advanced)** for more advanced topics and + reference. + # Introduction The Node Feature Discovery Operator manages the detection