Skip to content

Commit 4f07742

Browse files
chore: move external db values to separate fields, add release notes
1 parent 3f502ad commit 4f07742

4 files changed

Lines changed: 62 additions & 13 deletions

File tree

docs/content/en/open_source/upgrading/2.50.md

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,49 @@
22
title: 'Upgrading to DefectDojo Version 2.50.x'
33
toc_hide: true
44
weight: -20250804
5-
description: No special instructions.
5+
description: Helm chart changes.
66
---
7-
There are no special instructions for upgrading to 2.50.x. Check the [Release Notes](https://github.com/DefectDojo/django-DefectDojo/releases/tag/2.50.0) for the contents of the release.
7+
8+
## Helm Chart Changes
9+
10+
This release introduces several important changes to the Helm chart configuration:
11+
12+
## Breaking changes
13+
14+
### Volume Management Improvements
15+
16+
- **Streamlined volume configuration**: The existing volume logic has been removed and replaced with more flexible `extraVolumes` and `extraVolumeMounts` options that provide deployment-agnostic volume management.
17+
18+
> The previous volume implementation prevented mounting projected volumes (such as secret mounts with renamed key names) and per-container volume mounts (like nginx emptyDir when readOnlyRootFs is enforced).
19+
> The new approach resolves these limitations.
20+
21+
### Moved values
22+
23+
The following Helm chart values have been modified in this release:
24+
25+
- `redis.transportEncryption.enabled``redis.tls.enabled` (aligned with upstream Helm chart)
26+
- `redis.scheme``redis.sentinel.enabled` (controls deployment mode and aligns with upstream chart)
27+
- `redis.redisServer``redisServer` (prevents potential schema conflicts with upstream chart)
28+
- `redis.transportEncryption.params``redisParams` (prevents potential schema conflicts with upstream chart)
29+
- `postgresql.postgresServer``postgresServer` (prevents potential schema conflicts with upstream chart)
30+
31+
## New features
32+
33+
### Container and Environment Enhancements
34+
35+
- **Added extraInitContainers support**: Both Celery and Django deployments now support additional init containers through the `extraInitContainers` configuration option.
36+
- **Enhanced probe configuration for Celery**: Added support for customizing liveness, readiness, and startup probes in both Celery beat and worker deployments.
37+
- **Enhanced environment variable management**: All deployments now include `extraEnv` support for adding custom environment variables. For backwards compatibility, `.Values.extraEnv` can be used to inject common environment variables to all workloads.
38+
39+
## Other changes
40+
41+
- **Celery pod annotations**: Now we can add annotations to Celery beat/worker pods separately.
42+
- **Flexible secret deployment**: Added the capability to deploy secrets as regular (non-hooked) resources to address compatibility issues encountered with CI/CD tools (such as ArgoCD).
43+
- **Optional secret references**: Some secret references are now optional, allowing the chart to function even when certain secrets are not created.
44+
- **Fixed secret mounting**: Resolved issues with optional secret mounts and references.
45+
- **Updated Bitnami chart reference**: Migrated to OCI (Open Container Initiative) format for the Bitnami chart dependency.
46+
- **Improved code organization**: Minor Helm chart refactoring to enhance readability and maintainability.
47+
48+
---
49+
50+
Check the [Release Notes](https://github.com/DefectDojo/django-DefectDojo/releases/tag/2.50.0) for the contents of the release.

helm/defectdojo/templates/_helpers.tpl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,16 @@ Create the name of the service account to use
5353
{{- printf "%s-%s" .Release.Name "postgresql" | trunc 63 | trimSuffix "-" -}}
5454
{{- end -}}
5555
{{- else -}}
56-
{{- printf "%s" ( .Values.postgresql.postgresServer | default "127.0.0.1" ) -}}
56+
{{- .Values.postgresServer | default "127.0.0.1" | quote -}}
5757
{{- end -}}
5858
{{- end -}}
59+
5960
{{- define "redis.hostname" -}}
6061
{{- if eq .Values.celery.broker "redis" -}}
6162
{{- if .Values.redis.enabled -}}
6263
{{- printf "%s-%s" .Release.Name "redis-master" | trunc 63 | trimSuffix "-" -}}
6364
{{- else -}}
64-
{{ .Values.celery.brokerHost }}
65+
{{- .Values.redisServer | default "127.0.0.1" | quote -}}
6566
{{- end -}}
6667
{{- end -}}
6768
{{- end -}}

helm/defectdojo/templates/configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ data:
2929
DD_CELERY_BROKER_USER: ''
3030
DD_CELERY_BROKER_HOST: {{ if eq .Values.celery.broker "redis" }}{{ template "redis.hostname" . }}{{ end }}
3131
DD_CELERY_BROKER_PORT: '{{ if eq .Values.celery.broker "redis" }}{{- if ( hasKey .Values.redis "master" ) -}}{{ .Values.redis.master.service.ports.redis }}{{ else }}6379{{ end }}{{- end -}}'
32-
DD_CELERY_BROKER_PARAMS: '{{ .Values.celery.brokerParams | default $defaultBrokerParams }}'
32+
DD_CELERY_BROKER_PARAMS: '{{ .Values.redisParams | default $defaultBrokerParams }}'
3333
DD_CELERY_BROKER_PATH: '{{ .Values.celery.path | default "//" }}'
3434
DD_CELERY_LOG_LEVEL: {{ .Values.celery.logLevel }}
3535
DD_CELERY_WORKER_POOL_TYPE: {{ .Values.celery.worker.appSettings.poolType | default "solo" }}

helm/defectdojo/values.yaml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,6 @@ secrets:
148148
# Components
149149
celery:
150150
broker: redis
151-
# To use an external celery broker, set the hostname here
152-
brokerHost: ""
153-
# Parameters attached to the broker URL, defaults to "ssl_cert_reqs=optional" if redis.tls.enabled
154-
brokerParams: ""
155151
logLevel: INFO
156152
# Common annotations to worker and beat deployments and pods.
157153
annotations: {}
@@ -395,9 +391,7 @@ initializer:
395391

396392
# For more advance options check the bitnami chart documentation: https://github.com/bitnami/charts/tree/main/bitnami/postgresql
397393
postgresql:
398-
# To use an external PostgreSQL instance (like CloudSQL), set enabled to false, set items in auth part for authentication,
399-
# and uncomment the line below:
400-
# postgresServer: "127.0.0.1"
394+
# To use an external instance, switch enabled to `false` and set the address in `postgresServer` below
401395
enabled: true
402396
auth:
403397
username: defectdojo
@@ -469,7 +463,7 @@ gke:
469463

470464
# For more advance options check the bitnami chart documentation: https://github.com/bitnami/charts/tree/main/bitnami/redis
471465
redis:
472-
# To use an external Redis instance, switch enabled to false and set the address in .Values.celery.brokerHost
466+
# To use an external instance, switch enabled to `false`` and set the address in `redisServer` below
473467
enabled: true
474468
auth:
475469
existingSecret: defectdojo-redis-specific
@@ -526,3 +520,14 @@ extraConfigs: {}
526520
# MIDDLEWARE = [
527521
# 'debug_toolbar.middleware.DebugToolbarMiddleware',
528522
# ] + MIDDLEWARE
523+
#
524+
# External database support.
525+
#
526+
# To use an external Redis instance, set `redis.enabled` to false and set the address here:
527+
redisServer: ~
528+
# Parameters attached to the redis connection string, defaults to "ssl_cert_reqs=optional" if `redis.tls.enabled`
529+
redisParams: ""
530+
#
531+
# To use an external PostgreSQL instance (like CloudSQL), set `postgresql.enabled` to false,
532+
# set items in `postgresql.auth` part for authentication, and set the address here:
533+
postgresServer: ~

0 commit comments

Comments
 (0)