Skip to content

Commit 3e940ba

Browse files
authored
Merge pull request #186 from ArangoGutierrez/helm_docs
Helm docs
2 parents e736b48 + 9d5c81a commit 3e940ba

File tree

11 files changed

+256
-46
lines changed

11 files changed

+256
-46
lines changed

deploy/helm/nfd-operator/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespaceOverride: ""
1616

1717
enableNodeFeatureApi: false
1818

19-
nfd:
19+
controller:
2020
image:
2121
repository: gcr.io/k8s-staging-nfd/node-feature-discovery
2222
tag: master

docs/advanced/index.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
---
22
title: "Advanced"
33
layout: default
4-
sort: 2
4+
sort: 3
55
---
66

77
# Advanced
88

99
Advanced topics and reference.
10+
11+
Continue to:
12+
13+
- **[Developer guide](/developer-guide)** for instructions on how to
14+
develop and test NFD-Operator.
15+
16+
- **[NodeFeatureDiscovery](/NodeFeatureDiscovery)** for more information
17+
about the NodeFeatureDiscovery CRD.

docs/contributing/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Contributing"
33
layout: default
4-
sort: 3
4+
sort: 4
55
---
66

77
# Contributing

docs/deployment/cleanup.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: "Cleanup"
3+
layout: default
4+
sort: 4
5+
---
6+
7+
# Removing feature labels
8+
9+
From the [Operand repository][nfd] NFD-Master has a special `-prune` command
10+
line flag for removing all nfd-related node labels, annotations and extended
11+
resources from the cluster.
12+
13+
In order to remove all feature labels from the cluster, run the following
14+
command:
15+
16+
```bash
17+
kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/prune?ref={{ site.release }}
18+
kubectl -n node-feature-discovery wait job.batch/nfd-master --for=condition=complete && \
19+
kubectl delete -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/prune?ref={{ site.release }}
20+
```
21+
22+
<!-- Links -->
23+
[nfd]: https://github.com/kubernetes-sigs/node-feature-discovery

docs/deployment/helm.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
---
2+
title: "Helm"
3+
layout: default
4+
sort: 1
5+
---
6+
7+
# Deployment with Helm
8+
9+
{: .no_toc}
10+
11+
## Table of contents
12+
13+
{: .no_toc .text-delta}
14+
15+
1. TOC
16+
{:toc}
17+
18+
---
19+
20+
Helm chart allow to easily deploy and manage the NFD-operator.
21+
22+
> NOTE: NFD-operator is not ideal for other Helm charts to depend on as that
23+
> may result in multiple parallel NFD-operator deployments in the same cluster
24+
> which is not fully supported by the NFD-operator Helm chart.
25+
26+
## Prerequisites
27+
28+
[Helm package manager](https://helm.sh/) should be installed.
29+
30+
## Deployment
31+
32+
To install the latest stable version:
33+
34+
```bash
35+
export NFD_O_NS=nfd-operator
36+
helm repo add nfd-operator https://kubernetes-sigs.github.io/node-feature-discovery-operator/charts
37+
helm repo update
38+
helm install nfd-operator/nfd-operator --namespace $NFD_O_NS --create-namespace --generate-name
39+
```
40+
41+
To install the latest development version you need to clone the NFD-Operator Git
42+
repository and install from there.
43+
44+
```bash
45+
git clone https://github.com/kubernetes-sigs/node-feature-discovery-operator/
46+
cd node-feature-discovery-operator/deployment/helm
47+
export NFD_O_NS=nfd-operator
48+
helm install nfd-operator ./nfd-operator/ --namespace $NFD_O_NS --create-namespace
49+
```
50+
51+
See the [configuration](#configuration) section below for instructions how to
52+
alter the deployment parameters.
53+
54+
In order to deploy the [minimal](image-variants.md#minimal) image you need to
55+
override the image tag:
56+
57+
```bash
58+
helm install nfd-operator ./nfd-operator/ --set image.tag={{ site.release }}-minimal --namespace $NFD_O_NS --create-namespace
59+
```
60+
61+
## Configuration
62+
63+
You can override values from `values.yaml` and provide a file with custom values:
64+
65+
```bash
66+
export NFD_O_NS=nfd-operator
67+
helm install nfd-operator/nfd-operator -f <path/to/custom/values.yaml> --namespace $NFD_O_NS --create-namespace
68+
```
69+
70+
To specify each parameter separately you can provide them to helm install command:
71+
72+
```bash
73+
export NFD_O_NS=nfd-operator
74+
helm install nfd-operator/nfd-operator --set nameOverride=NFDinstance --namespace $NFD_O_NS --create-namespace
75+
```
76+
77+
## Uninstalling the chart
78+
79+
To uninstall the `nfd-operator` deployment:
80+
81+
```bash
82+
export NFD_O_NS=nfd-operator
83+
helm uninstall nfd-operator --namespace $NFD_O_NS
84+
```
85+
86+
The command removes all the Kubernetes components associated with the chart and
87+
deletes the release.
88+
89+
## Chart parameters
90+
91+
In order to tailor the deployment of the Node Feature Discovery to your cluster needs
92+
We have introduced the following Chart parameters.
93+
94+
### General parameters
95+
96+
| Name | Type | Default | description |
97+
| ---- | ---- | ------- | ----------- |
98+
| `image.repository` | string | `{{ site.container_image | split: ":" | first }}` | NFD image repository |
99+
| `image.tag` | string | `{{ site.release }}` | NFD image tag |
100+
| `image.pullPolicy` | string | `Always` | Image pull policy |
101+
| `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) |
102+
| `nameOverride` | string | | Override the name of the chart |
103+
| `fullnameOverride` | string | | Override a default fully qualified app name |
104+
105+
### Controller deployment parameters
106+
107+
| Name | Type | Default | description |
108+
| ---- | ---- | ------- | ----------- |
109+
| `controller.image.repository` | string | `{{ site.container_image | split: ":" | first }}` | NFD-Operator image repository |
110+
| `controller.image.tag` | string | `{{ site.release }}` | NFD-Operator image tag |
111+
112+
[rbac]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/

docs/deployment/image-variants.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: "Image variants"
3+
layout: default
4+
sort: 3
5+
---
6+
7+
# Image variants
8+
9+
{: .no_toc}
10+
11+
## Table of contents
12+
13+
{: .no_toc .text-delta}
14+
15+
1. TOC
16+
{:toc}
17+
18+
---
19+
20+
# Image variants
21+
22+
Node-Feautre-Discovery-Operator currently offers two variants
23+
of the container image. The "full" variant is currently
24+
deployed by default.
25+
26+
## Default
27+
28+
This is a minimal image based on:
29+
[gcr.io/distroless/base](https://github.com/GoogleContainerTools/distroless/blob/master/base/README.md)
30+
31+
The container image tag has suffix `-minimal`
32+
(e.g. `{{ site.container_image }}-minimal`)
33+
and the image is deployed by default.
34+
35+
## Full
36+
37+
This image is based on
38+
[debian:buster-slim](https://hub.docker.com/_/debian) and contains a full Linux
39+
system for doing live debugging and diagnosis of the operator.

docs/deployment/index.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: "Deployment"
3+
layout: default
4+
sort: 2
5+
---
6+
7+
# Deployment
8+
9+
[Installation](manual) provides instructions for installing NFD-Operator to a
10+
cluster.
11+
12+
[Uninstallation](manual) provides instructions for removing NFD-Operator from a
13+
cluster.
14+
15+
[Using Helm](helm) provides easy management of NFD-Operator deployments with
16+
nice configuration management and easy upgrades.
17+
18+
See [Image variants](image-variants) for description of the different NFD-Operator
19+
container images available.

docs/get-started/quick-start.md renamed to docs/deployment/manual.md

Lines changed: 37 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,28 @@
11
---
2-
title: "Quick start"
2+
title: "Manual deployment"
33
layout: default
44
sort: 2
55
---
66

7+
# Manual deployment
8+
9+
{: .no_toc}
10+
11+
## Table of contents
12+
13+
{: .no_toc .text-delta}
14+
15+
1. TOC
16+
{:toc}
17+
18+
---
719
# Requirements
820

921
1. Linux (x86_64/Arm64/Arm)
1022
1. [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl)
1123
(properly set up and configured to work with your Kubernetes cluster)
1224

13-
# Quick start
25+
# Manual deployment
1426

1527
Get the source code
1628

@@ -41,27 +53,6 @@ Create a NodeFeatureDiscovery instance
4153
kubectl apply -f config/samples/nfd.kubernetes.io_v1_nodefeaturediscovery.yaml
4254
```
4355

44-
## Image variants
45-
46-
Node-Feautre-Discovery-Operator currently offers two variants
47-
of the container image. The "full" variant is currently
48-
deployed by default.
49-
50-
### Full
51-
52-
This image is based on
53-
[debian:buster-slim](https://hub.docker.com/_/debian) and contains a full Linux
54-
system for doing live debugging and diagnosis of the operator.
55-
56-
### Minimal
57-
58-
This is a minimal image based on
59-
[gcr.io/distroless/base](https://github.com/GoogleContainerTools/distroless/blob/master/base/README.md)
60-
and only supports running statically linked binaries.
61-
62-
The container image tag has suffix `-minimal`
63-
(e.g. `{{ site.container_image }}-minimal`)
64-
6556
## Verify
6657

6758
The Operator will deploy NFD based on the information
@@ -88,3 +79,26 @@ $ kubectl get no -o json | jq .items[].metadata.labels
8879
"kubernetes.io/os": "linux",
8980
...
9081
```
82+
83+
# Uninstallation
84+
85+
If you followed the deployment instructions from the above you
86+
can simply do:
87+
88+
```bash
89+
kubectl -n nfd-operator delete NodeFeatureDiscovery my-nfd-deployment
90+
```
91+
92+
Optionally, you can also remove the namespace:
93+
94+
```bash
95+
kubectl delete ns nfd-operator
96+
```
97+
98+
See the [node-feature-discovery-operator][nfd-operator] and [OLM][OLM] project
99+
documentation for instructions for uninstalling the operator and operator
100+
lifecycle manager, respectively.
101+
102+
<!-- Links -->
103+
[nfd-operator]: https://github.com/kubernetes-sigs/node-feature-discovery-operator
104+
[OLM]: https://github.com/operator-framework/operator-lifecycle-manager

docs/get-started/index.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<meta http-equiv="refresh" content="0; URL='get-started/index.html'" />
1+
<meta http-equiv="refresh" content="0; URL='introduction/index.html'" />

0 commit comments

Comments
 (0)