Skip to content

Commit

Permalink
DOCS: Add deployment/uninstallation
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
  • Loading branch information
ArangoGutierrez committed Mar 14, 2023
1 parent 2bdb963 commit 361881d
Show file tree
Hide file tree
Showing 8 changed files with 110 additions and 47 deletions.
2 changes: 1 addition & 1 deletion docs/advanced/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Advanced"
layout: default
sort: 2
sort: 3
---

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

**NOTE:** You must run prune before removing the RBAC rules (serviceaccount,
clusterrole and clusterrolebinding).

<!-- Links -->
[nfd-operator]: https://github.com/kubernetes-sigs/node-feature-discovery-operator
[nfd]: https://github.com/kubernetes-sigs/node-feature-discovery
[OLM]: https://github.com/operator-framework/operator-lifecycle-manager
12 changes: 7 additions & 5 deletions docs/deployment/helm.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
---
title: "Helm"
layout: default
sort: 2
sort: 1
---

# Deployment with Helm

{: .no_toc}

## Table of contents

{: .no_toc .text-delta}

1. TOC
Expand All @@ -17,9 +19,9 @@ sort: 2

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.
> 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

Expand Down Expand Up @@ -107,4 +109,4 @@ We have introduced the following Chart parameters.
| `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/
[rbac]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/
31 changes: 16 additions & 15 deletions docs/deployment/image-variants.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@
---
title: "Image variants"
layout: default
sort: 1
sort: 3
---

# Image variants

{: .no_toc}

## Table of contents

{: .no_toc .text-delta}

1. TOC
{:toc}

---

NFD-Operator currently offers two variants of the container image. The "minimal" variant is
currently deployed by default. Released container images are available for
x86_64 and Arm64 architectures.
# Image variants

## Minimal
Node-Feautre-Discovery-Operator currently offers two variants
of the container image. The "full" variant is currently
deployed by default.

This is a minimal image based on
## Default

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.

For backwards compatibility a container image tag with suffix `-minimal`
(e.g. `{{ site.container_image }}-minimal`) is provided.
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:bullseye-slim](https://hub.docker.com/_/debian)
and contains a full Linux system for running shell-based nfd-worker hooks and
doing live debugging and diagnosis of the NFD-Operator images.

The container image tag has suffix `-full`
(e.g. `{{ site.container_image }}-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.
56 changes: 33 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,22 @@ $ 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.
7 changes: 5 additions & 2 deletions docs/get-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@ 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.
- **[Deployment](deployment/index.md)** for instructions on how to
deploy NFD-Operator to a cluster.

- **[Advanced](advanced/index.md)** for more advanced topics and
reference.

0 comments on commit 361881d

Please sign in to comment.