Skip to content

Commit

Permalink
Merge pull request #186 from ArangoGutierrez/helm_docs
Browse files Browse the repository at this point in the history
Helm docs
  • Loading branch information
k8s-ci-robot authored Mar 14, 2023
2 parents e736b48 + 9d5c81a commit 3e940ba
Show file tree
Hide file tree
Showing 11 changed files with 256 additions and 46 deletions.
2 changes: 1 addition & 1 deletion deploy/helm/nfd-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespaceOverride: ""

enableNodeFeatureApi: false

nfd:
controller:
image:
repository: gcr.io/k8s-staging-nfd/node-feature-discovery
tag: master
10 changes: 9 additions & 1 deletion docs/advanced/index.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion docs/contributing/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Contributing"
layout: default
sort: 3
sort: 4
---

# Contributing
Expand Down
23 changes: 23 additions & 0 deletions docs/deployment/cleanup.md
Original file line number Diff line number Diff line change
@@ -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 }}
```

<!-- Links -->
[nfd]: https://github.com/kubernetes-sigs/node-feature-discovery
112 changes: 112 additions & 0 deletions docs/deployment/helm.md
Original file line number Diff line number Diff line change
@@ -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 <path/to/custom/values.yaml> --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/
39 changes: 39 additions & 0 deletions docs/deployment/image-variants.md
Original file line number Diff line number Diff line change
@@ -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.
19 changes: 19 additions & 0 deletions docs/deployment/index.md
Original file line number Diff line number Diff line change
@@ -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.
60 changes: 37 additions & 23 deletions docs/get-started/quick-start.md → docs/deployment/manual.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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.
<!-- Links -->
[nfd-operator]: https://github.com/kubernetes-sigs/node-feature-discovery-operator
[OLM]: https://github.com/operator-framework/operator-lifecycle-manager
19 changes: 0 additions & 19 deletions docs/get-started/index.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<meta http-equiv="refresh" content="0; URL='get-started/index.html'" />
<meta http-equiv="refresh" content="0; URL='introduction/index.html'" />
14 changes: 14 additions & 0 deletions docs/get-started/introduction.md → docs/introduction/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3e940ba

Please sign in to comment.