Skip to content

Commit 4a920ee

Browse files
committed
chore: add upgrade steps
1 parent 0aad54c commit 4a920ee

File tree

1 file changed

+65
-4
lines changed

1 file changed

+65
-4
lines changed

content/nap-waf/v5/admin-guide/deploy-with-helm.md

Lines changed: 65 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,71 @@ To use the *mTLS Configuration* options, read the [Secure Traffic Between NGINX
324324
325325
## Upgrade the chart
326326
327-
To upgrade the release `<release-name>`:
328-
```
329-
helm upgrade <release-name> .
330-
```
327+
1. Login to the registry:
328+
329+
```shell
330+
helm registry login --username=<JWT Token> --password=none private-registry.nginx.com
331+
```
332+
333+
1. Pull the new version of the helm chart:
334+
335+
```shell
336+
helm pull oci://private-registry.nginx.com/nap/nginx-app-protect --version <release-version> --untar
337+
```
338+
339+
1. Change your working directory to nginx-app-protect:
340+
341+
```shell
342+
cd nginx-app-protect
343+
```
344+
345+
1. Create a new folder on the cluster machine. This folder will include all shared files and resources between pods and containers in the deployment. It will also be used for the PV binding later:
346+
347+
```shell
348+
mkdir -p /mnt/nap5_bundles_pv_data/
349+
chown 101:101 /mnt/nap5_bundles_pv_data/
350+
```
351+
352+
1. Create a new Persistent Volume for your storage. The PV will be detached from the helm deployment, and must have the name `<release-name>-shared-bundles-pv`.
353+
354+
Create a YAML file `pv-hostpath.yaml` with the PV file content:
355+
```yaml
356+
apiVersion: v1
357+
kind: PersistentVolume
358+
metadata:
359+
name: nginx-app-protect-shared-bundles-pv
360+
labels:
361+
type: local
362+
spec:
363+
accessModes:
364+
- ReadWriteMany
365+
capacity:
366+
storage: "2Gi"
367+
hostPath:
368+
path: "/mnt/nap5_bundles_pv_data"
369+
persistentVolumeReclaimPolicy: Retain
370+
storageClassName: manual
371+
```
372+
373+
Apply the `pv-hostpath.yaml` file to create the new PV:
374+
```shell
375+
kubectl apply -f pv-hostpath.yaml
376+
```
377+
378+
1. Enable/Disable the Policy Controller pod deployment.
379+
380+
The Policy Controller option is enabled by default (`appprotect.policyController.enable: true`). Helm will also install the required custom resource definitions (CRDs) required by the policy controller pod.
381+
382+
**Important**: Before applying the Policy Controller, the required Custom Resource Definitions (CRDs) must be installed first. If the CRDs are not installed, the Policy Controller pod will fail to start and show CRD-related errors in the logs.
383+
384+
If you do not use the custom resources that require those CRDs (With `appprotect.policyController.enable` set to false), the installation of the CRDs can be skipped by specifying --skip-crds in your helm install command. Please also note that when upgrading helm charts, the current CRDs will need to be deleted and the new ones will be vreated as part of the helm install of the new version.
385+
386+
If you wish to pull security updates from the NGINX repository (with APSignatures CRD), you should set the `appprotect.nginxRepo` value in values.yaml file.
387+
388+
1. Upgrade the release `<release-name>`:
389+
```
390+
helm upgrade <release-name> .
391+
```
331392
332393
## Uninstall the chart
333394

0 commit comments

Comments
 (0)