Upgrading to DefectDojo Version 2.53.x
Helm Chart Changes
- This release introduces an important change to the Helm chart configuration for the initializer job.
- DefectDojo
2.52.0replaced Redis with Valkey indocker-composedeployment. DefectDojo2.53.0(chart1.9.0) is replacing it in HELM charts. - Add support for HPA and PDB
HPA & PDA
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
Breaking changes
Valkey
Renamed values
HELM values had been changed to the following:
createRedisSecret→createValkeySecretredis.enabled→valkey.enabledredis.auth.existingSecret→valkey.auth.existingSecret, plus value is pointing to secretdefectdojo-valkey-specificnowredis.auth.existingSecretPasswordKey→valkey.auth.existingSecretPasswordKey, plus value is pointing to secretvalkey-passwordnowredis.auth.password→valkey.auth.passwordredis.master.service.ports.redis→valkey.service.portredis.sentinel...→valkey.sentinel...redis.tls...→valkey.tls...
The whole subchart is based on cloudpirates-valkey, so all additional values can be found there.
If an external Redis instance is being used, set the parameter valkey.enabled to False. The parameters redisServer and redisParams remain available and function as before. Additionally, redisScheme and redisPort have been introduced to accommodate users requiring these configurations.
How to migrate to Valkey
- As always, perform a backup of your instance
- 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)
0. Perform the following steps with your previous version of HELM chart (not with the upgraded one - you might lose your data)
- Downscale all producers of async tasks:
- Set
django.replicasto 0 (if you used HPA, adjust it based on your needs) - Set
celery.beat.replicasto 0 (if you used HPA, adjust it based on your needs) - Do not change
celery.worker.replicas(they are responsible for processing your async tasks)
- Set
- Wait until the processing queue is empty (choose one of the following methods):
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)kubectl logs deployment/defectdojo-celery-worker -c celery --all-pods=true --follow– should stop outputting new task logs
- Downscale all producers of async tasks:
- 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/createValkeySecretpassword will be regenerated. If you stored this password somewhere else, it will not be valid anymore. - Enjoy DefectDojo
Initializer Annotation Handling
- Renamed initializer annotations: The
initializer.annotationsfield has been renamed toinitializer.podAnnotationsfor clarity and consistency with other DefectDojo resources. - Merged annotation support: Global
extraAnnotationsare now automatically merged with the initializer’spodAnnotationsto ensure consistent annotation handling across all resources.
The previous implementation did not merge global
extraAnnotationswith the initializer job’s pod annotations, causing inconsistencies in annotation management.
Moved values
The following Helm chart values have been modified in this release:
initializer.annotations→initializer.podAnnotations(applies to Pod template metadata within the Job)
Note: initializer.jobAnnotations affects the Job spec metadata, while initializer.podAnnotations affects the Pod template metadata within the Job.
Migration
If you were using:
initializer:
annotations:
foo: barUpdate to:
initializer:
podAnnotations:
foo: barBoth extraAnnotations and initializer.podAnnotations will now be properly applied to the initializer pod.
Reimport updates fields fix_available and fix_version
Reimport will update existing findings fix_available and fix_version fields based on the incoming scan report.
There are no other special instructions for upgrading to 2.53.x. Check the Release Notes for the contents of the release.
