You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/en/open_source/upgrading/2.53.md
+40-6Lines changed: 40 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,36 +2,68 @@
2
2
title: 'Upgrading to DefectDojo Version 2.53.x'
3
3
toc_hide: true
4
4
weight: -20251103
5
-
description: Helm chart changes
6
-
5
+
description: "Helm chart: changes for initializer annotations + Replaced Redis with Valkey + HPA & PDB support"
7
6
---
8
7
9
8
## Helm Chart Changes
10
9
11
-
This release introduces an important change to the Helm chart configuration for the initializer job and support for HPA and PDB.
10
+
- This release introduces an important change to the Helm chart configuration for the initializer job.
11
+
- DefectDojo `2.52.0` replaced Redis with Valkey in `docker-compose` deployment. DefectDojo `2.53.0` (chart `1.9.0`) is replacing it in HELM charts.
12
+
- Add support for HPA and PDB
12
13
13
-
###New values
14
+
#### HPA & PDA
14
15
15
16
Added Helm chart support for Celery and Django deployments for Horizontal Pod Autoscaler using `.autoscaling` fields under each section. And Pod Disruption Budget using `.podDisruptionBudget` for any of Celery Beat/Worker or Django deploy
16
17
17
18
### Breaking changes
18
19
20
+
#### Valkey
21
+
22
+
##### Renamed values
23
+
24
+
HELM values had been changed to the following:
25
+
-`createRedisSecret` → `createValkeySecret` (`createRedisSecret` is still in place to be able to correctly show error message, but it will be removed in the future)
26
+
-`redis.enabled` → `valkey.enabled`
27
+
-`redis.auth.existingSecret` → `valkey.auth.existingSecret`, plus value is pointing to secret `defectdojo-valkey-specific` now
28
+
-`redis.auth.existingSecretPasswordKey` → `valkey.auth.existingSecretPasswordKey`, plus value is pointing to secret `valkey-password` now
The whole subchart is based on [`cloudpirates-valkey`](https://artifacthub.io/packages/helm/cloudpirates-valkey/valkey), so all additional values can be found there.
35
+
36
+
##### How to migrate to Valkey
37
+
38
+
0. As always, perform a backup of your instance
39
+
1. If you would like to be 100% sure that you do not miss any async event (triggered deduplication, email notification, ...) it is recommended to perform the following substeps (if your system is not in production and/or you are willing to miss some notifications or postpone deduplication to a later time, feel free to skip these substeps)
40
+
0. Perform the following steps with your previous version of HELM chart (not with the upgraded one - you might lose your data)
41
+
1. Downscale all producers of async tasks:
42
+
- Set `django.replicas` to 0 (if you used HPA, adjust it based on your needs)
43
+
- Set `celery.beat.replicas` to 0 (if you used HPA, adjust it based on your needs)
44
+
- Do not change `celery.worker.replicas` (they are responsible for processing your async tasks)
45
+
2. Wait until the processing queue is empty (choose one of the following methods):
46
+
-``kubectl exec statefulset/defectdojo-redis-master -c redis -- redis-cli -a `kubectl get secret defectdojo-redis-specific -o go-template='{{index .data "redis-password" | base64decode}}'` llen celery`` -- should output 0 (if your HELM chart used a different name, adjust the command based on your environment)
47
+
-`kubectl logs deployment/defectdojo-celery-worker -c celery --all-pods=true --follow` -- should stop outputting new task logs
48
+
2. Replace values based on the _Renamed values_ part, update the chart version, and set the number of replicas back. Be aware that Valkey is using a password from the new location, and if you use `createRedisSecret`/`createValkeySecret` password will be regenerated. If you stored this password somewhere else, it will not be valid anymore.
49
+
3. Enjoy DefectDojo
50
+
19
51
#### Initializer Annotation Handling
20
52
21
53
-**Renamed initializer annotations**: The `initializer.annotations` field has been renamed to `initializer.podAnnotations` for clarity and consistency with other DefectDojo resources.
22
54
-**Merged annotation support**: Global `extraAnnotations` are now automatically merged with the initializer's `podAnnotations` to ensure consistent annotation handling across all resources.
23
55
24
56
> The previous implementation did not merge global `extraAnnotations` with the initializer job's pod annotations, causing inconsistencies in annotation management.
25
57
26
-
#### Moved values
58
+
#####Moved values
27
59
28
60
The following Helm chart values have been modified in this release:
29
61
30
62
-`initializer.annotations` → `initializer.podAnnotations` (applies to Pod template metadata within the Job)
31
63
32
64
Note: `initializer.jobAnnotations` affects the Job spec metadata, while `initializer.podAnnotations` affects the Pod template metadata within the Job.
33
65
34
-
#### Migration
66
+
#####Migration
35
67
36
68
If you were using:
37
69
@@ -54,3 +86,5 @@ Both `extraAnnotations` and `initializer.podAnnotations` will now be properly ap
54
86
## Reimport updates fields fix_available and fix_version
55
87
56
88
Reimport will update existing findings `fix_available` and `fix_version` fields based on the incoming scan report.
89
+
90
+
There are other special instructions for upgrading to 2.53.x. Check the [Release Notes](https://github.com/DefectDojo/django-DefectDojo/releases/tag/2.53.0) for the contents of the release.
# For high availability deploy multiple instances of Django, Celery and Redis
286
+
# For high availability deploy multiple instances of Django, Celery and Valkey
287
287
helm install \
288
288
defectdojo \
289
289
./helm/defectdojo \
@@ -292,9 +292,10 @@ helm install \
292
292
--set django.ingress.secretName="minikube-tls" \
293
293
--set django.replicas=3 \
294
294
--set celery.worker.replicas=3 \
295
-
--set redis.replicas=3 \
295
+
--set valkey.architecture=replication \
296
+
--set valkey.replicaCount=3 \
296
297
--set createSecret=true \
297
-
--set createRedisSecret=true \
298
+
--set createValkeySecret=true \
298
299
--set createPostgresqlSecret=true
299
300
300
301
# Run highly available PostgreSQL cluster
@@ -306,13 +307,14 @@ helm install \
306
307
--set host="defectdojo.${TLS_CERT_DOMAIN}" \
307
308
--set django.replicas=3 \
308
309
--set celery.worker.replicas=3 \
309
-
--set redis.replicas=3 \
310
+
--set valkey.architecture=replication \
311
+
--set valkey.replicaCount=3 \
310
312
--set django.ingress.secretName="minikube-tls" \
311
313
--set postgresql.enabled=true \
312
314
--set postgresql.replication.enabled=true \
313
315
--set postgresql.replication.slaveReplicas=3 \
314
316
--set createSecret=true \
315
-
--set createRedisSecret=true \
317
+
--set createValkeySecret=true \
316
318
--set createPostgresqlSecret=true
317
319
318
320
# Note: If you run `helm install defectdojo before, you will get an error
@@ -359,16 +361,13 @@ You will still need to set a host value as well.
359
361
360
362
If you want to use a redis-sentinel setup as the Celery broker, you will need to set the following.
361
363
362
-
1. Set redis.scheme to "sentinel" in values.yaml
364
+
1. Set valkey.scheme to "sentinel" in values.yaml
363
365
2. Set two additional extraEnv vars specifying the sentinel master name and port in values.yaml
364
366
365
367
```yaml
366
-
celery:
367
-
broker: 'redis'
368
-
369
-
redis:
370
-
redisServer: 'PutYourRedisSentinelAddress'
368
+
valkey:
371
369
scheme: 'sentinel'
370
+
redisServer: 'PutYourRedisSentinelAddress'
372
371
373
372
extraEnv:
374
373
- name: DD_CELERY_BROKER_TRANSPORT_OPTIONS
@@ -451,10 +450,10 @@ extraEnv:
451
450
452
451
#### Step 4: Deploy DefectDojo
453
452
454
-
After modifying the `values.yaml` file as needed, deploy DefectDojo using Helm. This command also generates the required secrets for the DefectDojo admin UI and Redis:
453
+
After modifying the `values.yaml` file as needed, deploy DefectDojo using Helm. This command also generates the required secrets for the DefectDojo admin UI and Valkey:
**NOTE**: It is important to highlight that this setup can also be utilized for achieving high availability (HA) in PostgreSQL. By placing a load balancer in front of the PostgreSQL cluster, read and write requests can be efficiently routed to the appropriate primary or standby servers as needed.
@@ -526,8 +525,8 @@ A Helm chart for Kubernetes to install DefectDojo
| createValkeySecret | bool | `false` | create valkey secret in defectdojo chart, outside of valkey chart |
608
606
| dbMigrationChecker.containerSecurityContext | object | `{}` | Container security context for the DB migration checker. |
609
607
| dbMigrationChecker.enabled | bool | `true` | Enable/disable the DB migration checker. |
610
608
| dbMigrationChecker.extraEnv | list | `[]` | Additional environment variables for DB migration checker. |
@@ -750,10 +748,7 @@ A Helm chart for Kubernetes to install DefectDojo
750
748
| postgresql.primary.podSecurityContext.enabled | bool | `true` | Default is true for K8s. Enabled needs to false for OpenShift restricted SCC and true for anyuid SCC |
751
749
| postgresql.primary.podSecurityContext.fsGroup | int | `1001` | fsGroup specification below is not applied if enabled=false. enabled=false is the required setting for OpenShift "restricted SCC" to work successfully. |
752
750
| postgresql.volumePermissions.containerSecurityContext | object | `{"runAsUser":1001}` | if using restricted SCC set runAsUser: "auto" and if running under anyuid SCC - runAsUser needs to match the line above |
753
-
| redis | object | `{"architecture":"standalone","auth":{"existingSecret":"defectdojo-redis-specific","existingSecretPasswordKey":"redis-password","password":""},"enabled":true,"sentinel":{"enabled":false},"tls":{"enabled":false}}` | For more advance options check the bitnami chart documentation: https://github.com/bitnami/charts/tree/main/bitnami/redis |
754
-
| redis.enabled | bool | `true` | To use an external instance, switch enabled to `false`` and set the address in `redisServer` below |
755
-
| redis.tls.enabled | bool | `false` | If TLS is enabled, the Redis broker will use the redis:// and optionally mount the certificates from an existing secret. |
756
-
| redisParams | string | `""` | Parameters attached to the redis connection string, defaults to "ssl_cert_reqs=optional" if `redis.tls.enabled` |
751
+
| redisParams | string | `""` | Parameters attached to the redis connection string, defaults to "ssl_cert_reqs=optional" if `valkey.tls.enabled` |
757
752
| redisServer | string | `nil` | To use an external Redis instance, set `redis.enabled` to false and set the address here: |
758
753
| revisionHistoryLimit | int | `10` | Allow overriding of revisionHistoryLimit across all deployments. |
| trackConfig | string | `"disabled"` | Track configuration (trackConfig): will automatically respin application pods in case of config changes detection can be: 1. disabled (default) 2. enabled, enables tracking configuration changes based on SHA256 |
768
+
| valkey | object | `{"auth":{"existingSecret":"defectdojo-valkey-specific","existingSecretPasswordKey":"valkey-password","password":""},"enabled":true,"sentinel":{"enabled":false},"service":{"port":6379},"tls":{"enabled":false}}` | For more advance options check the bitnami chart documentation: https://artifacthub.io/packages/helm/cloudpirates-valkey/valkey |
769
+
| valkey.enabled | bool | `true` | To use an external instance, switch enabled to `false` and set the address in `redisServer` below |
770
+
| valkey.service | object | `{"port":6379}` | To use a different port for Redis (default: 6379) |
771
+
| valkey.tls.enabled | bool | `false` | If TLS is enabled, the Redis broker will use the redis:// and optionally mount the certificates from an existing secret. |
773
772
774
773
----------------------------------------------
775
774
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
# For high availability deploy multiple instances of Django, Celery and Redis
286
+
# For high availability deploy multiple instances of Django, Celery and Valkey
287
287
helm install \
288
288
defectdojo \
289
289
./helm/defectdojo \
@@ -292,9 +292,10 @@ helm install \
292
292
--set django.ingress.secretName="minikube-tls" \
293
293
--set django.replicas=3 \
294
294
--set celery.worker.replicas=3 \
295
-
--set redis.replicas=3 \
295
+
--set valkey.architecture=replication \
296
+
--set valkey.replicaCount=3 \
296
297
--set createSecret=true \
297
-
--set createRedisSecret=true \
298
+
--set createValkeySecret=true \
298
299
--set createPostgresqlSecret=true
299
300
300
301
# Run highly available PostgreSQL cluster
@@ -306,13 +307,14 @@ helm install \
306
307
--set host="defectdojo.${TLS_CERT_DOMAIN}" \
307
308
--set django.replicas=3 \
308
309
--set celery.worker.replicas=3 \
309
-
--set redis.replicas=3 \
310
+
--set valkey.architecture=replication \
311
+
--set valkey.replicaCount=3 \
310
312
--set django.ingress.secretName="minikube-tls" \
311
313
--set postgresql.enabled=true \
312
314
--set postgresql.replication.enabled=true \
313
315
--set postgresql.replication.slaveReplicas=3 \
314
316
--set createSecret=true \
315
-
--set createRedisSecret=true \
317
+
--set createValkeySecret=true \
316
318
--set createPostgresqlSecret=true
317
319
318
320
# Note: If you run `helm install defectdojo before, you will get an error
@@ -359,16 +361,13 @@ You will still need to set a host value as well.
359
361
360
362
If you want to use a redis-sentinel setup as the Celery broker, you will need to set the following.
361
363
362
-
1. Set redis.scheme to "sentinel" in values.yaml
364
+
1. Set valkey.scheme to "sentinel" in values.yaml
363
365
2. Set two additional extraEnv vars specifying the sentinel master name and port in values.yaml
364
366
365
367
```yaml
366
-
celery:
367
-
broker: 'redis'
368
-
369
-
redis:
370
-
redisServer: 'PutYourRedisSentinelAddress'
368
+
valkey:
371
369
scheme: 'sentinel'
370
+
redisServer: 'PutYourRedisSentinelAddress'
372
371
373
372
extraEnv:
374
373
- name: DD_CELERY_BROKER_TRANSPORT_OPTIONS
@@ -451,10 +450,10 @@ extraEnv:
451
450
452
451
#### Step 4: Deploy DefectDojo
453
452
454
-
After modifying the `values.yaml` file as needed, deploy DefectDojo using Helm. This command also generates the required secrets for the DefectDojo admin UI and Redis:
453
+
After modifying the `values.yaml` file as needed, deploy DefectDojo using Helm. This command also generates the required secrets for the DefectDojo admin UI and Valkey:
0 commit comments