Skip to content

Commit e76aada

Browse files
authored
Merge pull request #2301 from marquiz/devel/docs-helm-oci
docs/deployment: instruct users to use the OCI Helm repo
2 parents ad3f4d8 + 09a476a commit e76aada

File tree

3 files changed

+47
-27
lines changed

3 files changed

+47
-27
lines changed

docs/_config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,7 @@ scss: |
5757
# in the sidebar (top left corner of the page)
5858
release: master
5959

60-
# Container image which to point to in the documentation
60+
# Container image and OCI Helm repo which to point to in the documentation
6161
container_image: gcr.io/k8s-staging-nfd/node-feature-discovery:master
62+
helm_oci_repo: oci://gcr.io/k8s-staging-nfd/charts/node-feature-discovery
63+
helm_chart_version: 0.0.0-master

docs/deployment/helm.md

Lines changed: 42 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -29,42 +29,62 @@ Node Feature Discovery provides a Helm chart to manage its deployment.
2929

3030
## Deployment
3131

32+
### OCI Helm repository
33+
34+
The NFD project provides Helm charts in an OCI compliant repository. Install
35+
NFD with the default configuration
36+
37+
```bash
38+
helm install nfd --namespace node-feature-discovery --create-namespace {{ site.helm_oci_repo }} --version {{ site.helm_chart_version }}
39+
```
40+
41+
See the [configuration](#configuration) section below for instructions how to
42+
alter the deployment parameters.
43+
44+
### Legacy Helm repository
45+
46+
For the time being, the NFD project still provides Helm charts in a legacy
47+
(HTTP) Helm repository, too.
48+
49+
> **NOTE:** This repository will be deprecated in the future. It is recommended
50+
> for users to switch to use the OCI Helm repository.
51+
52+
#### Stable version
53+
3254
To install the latest stable version:
3355

3456
```bash
35-
export NFD_NS=node-feature-discovery
3657
helm repo add nfd https://kubernetes-sigs.github.io/node-feature-discovery/charts
3758
helm repo update
38-
helm install nfd/node-feature-discovery --namespace $NFD_NS --create-namespace --generate-name
59+
helm install nfd nfd/node-feature-discovery --namespace node-feature-discovery --create-namespace
3960
```
4061

62+
See the [configuration](#configuration) section below for instructions how to
63+
alter the deployment parameters.
64+
65+
### Latest development version
66+
4167
To install the latest development version you need to clone the NFD Git
4268
repository and install from there.
4369

4470
```bash
4571
git clone https://github.com/kubernetes-sigs/node-feature-discovery/
4672
cd node-feature-discovery/deployment/helm
47-
export NFD_NS=node-feature-discovery
48-
helm install node-feature-discovery ./node-feature-discovery/ --namespace $NFD_NS --create-namespace
73+
helm install nfd ./node-feature-discovery/ --namespace node-feature-discovery --create-namespace
4974
```
5075

51-
See the [configuration](#configuration) section below for instructions how to
52-
alter the deployment parameters.
53-
5476
## Configuration
5577

5678
You can override values from `values.yaml` and provide a file with custom values:
5779

5880
```bash
59-
export NFD_NS=node-feature-discovery
60-
helm install nfd/node-feature-discovery -f <path/to/custom/values.yaml> --namespace $NFD_NS --create-namespace
81+
helm install -f <path/to/custom/values.yaml> --namespace nfd --create-namespace nfd {{ site.helm_oci_repo }} --version {{ site.helm_chart_version }}
6182
```
6283

6384
To specify each parameter separately you can provide them to helm install command:
6485

6586
```bash
66-
export NFD_NS=node-feature-discovery
67-
helm install nfd/node-feature-discovery --set nameOverride=NFDinstance --set master.replicaCount=2 --namespace $NFD_NS --create-namespace
87+
helm install --set nameOverride=NFDinstance --set master.replicaCount=2 --namespace nfd --create-namespace nfd {{ site.helm_oci_repo }} --version {{ site.helm_chart_version }}
6888
```
6989

7090
## Upgrading the chart
@@ -83,16 +103,15 @@ Helm deployment of NFD was introduced in v0.8.0.
83103

84104
```bash
85105
export NFD_NS=node-feature-discovery
106+
export HELM_INSTALL_NAME=nfd
86107
# Uninstall the old NFD deployment
87-
helm uninstall node-feature-discovery --namespace $NFD_NS
88-
# Update Helm repository
89-
helm repo update
108+
helm uninstall $HELM_INSTALL_NAME --namespace $NFD_NS
90109
# Install the new NFD deployment
91-
helm upgrade --install node-feature-discovery nfd/node-feature-discovery --namespace $NFD_NS --set master.enable=false
110+
helm install $HELM_INSTALL_NAME {{ site.helm_oci_repo }} --version {{ site.helm_chart_version }} --namespace $NFD_NS --set master.enable=false
92111
# Wait for NFD Worker to be ready
93112
kubectl wait --timeout=-1s --for=condition=ready pod -l app.kubernetes.io/name=node-feature-discovery --namespace $NFD_NS
94113
# Enable the NFD Master
95-
helm upgrade --install node-feature-discovery nfd/node-feature-discovery --namespace $NFD_NS --set master.enable=true
114+
helm upgrade $HELM_INSTALL_NAME {{ site.helm_oci_repo }} --version {{ site.helm_chart_version }} --namespace $NFD_NS --set master.enable=true
96115
```
97116

98117
### From v0.12 - v0.13
@@ -102,16 +121,15 @@ The API was not enabled by default.
102121

103122
```bash
104123
export NFD_NS=node-feature-discovery
105-
# Update Helm repository
106-
helm repo update
124+
export HELM_INSTALL_NAME=nfd
107125
# Install and upgrade CRD's
108-
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/node-feature-discovery/master/deployment/base/nfd-crds/nfd-api-crds.yaml
126+
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/node-feature-discovery/{{ site.release }}/deployment/base/nfd-crds/nfd-api-crds.yaml
109127
# Install the new NFD deployment
110-
helm upgrade node-feature-discovery nfd/node-feature-discovery --namespace $NFD_NS --set master.enable=false
128+
helm upgrade $HELM_INSTALL_NAME {{ site.helm_oci_repo }} --version {{ site.helm_chart_version }} --namespace $NFD_NS --set master.enable=false
111129
# Wait for NFD Worker to be ready
112130
kubectl wait --timeout=-1s --for=condition=ready pod -l app.kubernetes.io/name=node-feature-discovery --namespace $NFD_NS
113131
# Enable the NFD Master
114-
helm upgrade node-feature-discovery nfd/node-feature-discovery --namespace $NFD_NS --set master.enable=true
132+
helm upgrade $HELM_INSTALL_NAME {{ site.helm_oci_repo }} --version {{ site.helm_chart_version }} --namespace $NFD_NS --set master.enable=true
115133
```
116134

117135
### From v0.14+
@@ -121,21 +139,19 @@ and the CRD `NodeFeature` is enabled by default.
121139

122140
```bash
123141
export NFD_NS=node-feature-discovery
124-
# Update Helm repository
125-
helm repo update
142+
export HELM_INSTALL_NAME=nfd
126143
# Install and upgrade CRD's
127144
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/node-feature-discovery/{{ site.release }}/deployment/base/nfd-crds/nfd-api-crds.yaml
128145
# Install the new NFD deployment
129-
helm upgrade node-feature-discovery nfd/node-feature-discovery --namespace $NFD_NS
146+
helm upgrade $HELM_INSTALL_NAME {{ site.helm_oci_repo }} --version {{ site.helm_chart_version }} --namespace $NFD_NS
130147
```
131148

132149
## Uninstalling the chart
133150

134151
To uninstall the `node-feature-discovery` deployment:
135152

136153
```bash
137-
export NFD_NS=node-feature-discovery
138-
helm uninstall node-feature-discovery --namespace $NFD_NS
154+
helm uninstall nfd --namespace node-feature-discovery
139155
```
140156

141157
The command removes all the Kubernetes components associated with the chart and

hack/prepare-release.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ if [ -z "$no_patching" ]; then
113113
echo Patching docs/_config.yml
114114
sed -e s"/release:.*/release: $release/" \
115115
-e s"/version:.*/version: $docs_version/" \
116+
-e s"/helm_chart_version:.*/helm_chart_version: $semver/" \
116117
-e s"!container_image:.*!container_image: registry.k8s.io/nfd/node-feature-discovery:$release!" \
118+
-e s"!helm_oci_repo:.*!helm_oci_repo: oci://registry.k8s.io/nfd/charts/node-feature-discovery!" \
117119
-i docs/_config.yml
118120

119121
# Patch README

0 commit comments

Comments
 (0)