Skip to content

Commit 05d3c91

Browse files
fix(helm): address review feedback and CI failures
- Fix HTTPRoute template YAML structure: emit list dash unconditionally per rule so match-less catch-all rules produce valid YAML arrays - Update artifacthub.io/changes annotation in Chart.yaml - Regenerate README.md via helm-docs - Add httpRoute and externalSecret fields to values.schema.json
1 parent 8c26988 commit 05d3c91

4 files changed

Lines changed: 86 additions & 8 deletions

File tree

helm/defectdojo/Chart.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,8 @@ dependencies:
3434
# description: Critical bug
3535
annotations:
3636
artifacthub.io/prerelease: "true"
37-
artifacthub.io/changes: ""
37+
artifacthub.io/changes: |
38+
- kind: added
39+
description: Add Gateway API HTTPRoute support as an alternative to Ingress
40+
- kind: added
41+
description: Add External Secrets Operator (ESO) support for external secret stores

helm/defectdojo/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,7 @@ A Helm chart for Kubernetes to install DefectDojo
618618
| django.extraInitContainers | list | `[]` | A list of additional initContainers to run before the uwsgi and nginx containers. |
619619
| django.extraVolumeMounts | list | `[]` | Array of additional volume mount points common to all containers and initContainers. |
620620
| django.extraVolumes | list | `[]` | A list of extra volumes to mount. |
621+
| django.httpRoute | object | `{"annotations":{},"enabled":false,"hostnames":[],"labels":{},"parentRefs":[],"rules":[]}` | Kubernetes Gateway API HTTPRoute configuration (alternative to Ingress) |
621622
| django.ingress.activateTLS | bool | `true` | |
622623
| django.ingress.annotations | object | `{}` | Restricts the type of ingress controller that can interact with our chart (nginx, traefik, ...) `kubernetes.io/ingress.class: nginx` Depending on the size and complexity of your scans, you might want to increase the default ingress timeouts if you see repeated 504 Gateway Timeouts `nginx.ingress.kubernetes.io/proxy-read-timeout: "1800"` `nginx.ingress.kubernetes.io/proxy-send-timeout: "1800"` |
623624
| django.ingress.enabled | bool | `true` | |
@@ -683,6 +684,12 @@ A Helm chart for Kubernetes to install DefectDojo
683684
| django.uwsgi.startupProbe.periodSeconds | int | `5` | |
684685
| django.uwsgi.startupProbe.successThreshold | int | `1` | |
685686
| django.uwsgi.startupProbe.timeoutSeconds | int | `1` | |
687+
| externalSecret | object | `{"annotations":{},"data":[],"enabled":false,"labels":{},"refreshInterval":"1h0m0s","secretStoreRef":{"kind":"","name":""},"targetSecretName":""}` | External Secrets Operator integration |
688+
| externalSecret.data | list | `[]` | Data mappings from the external store |
689+
| externalSecret.enabled | bool | `false` | Enable the ExternalSecret resource |
690+
| externalSecret.refreshInterval | string | `"1h0m0s"` | How often to refresh the secret from the external store |
691+
| externalSecret.secretStoreRef | object | `{"kind":"","name":""}` | Reference to a SecretStore or ClusterSecretStore |
692+
| externalSecret.targetSecretName | string | `""` | Name of the Kubernetes Secret created by ESO |
686693
| extraAnnotations | object | `{}` | Annotations globally added to all resources |
687694
| extraConfigs | object | `{}` | To add extra variables not predefined by helm config it is possible to define in extraConfigs block, e.g. below: NOTE Do not store any kind of sensitive information inside of it ``` DD_SOCIAL_AUTH_AUTH0_OAUTH2_ENABLED: 'true' DD_SOCIAL_AUTH_AUTH0_KEY: 'dev' DD_SOCIAL_AUTH_AUTH0_DOMAIN: 'xxxxx' ``` |
688695
| extraEnv | list | `[]` | To add (or override) extra variables which need to be pulled from another configMap, you can use extraEnv. For example: ``` - name: DD_DATABASE_HOST valueFrom: configMapKeyRef: name: my-other-postgres-configmap key: cluster_endpoint ``` |

helm/defectdojo/templates/django-httproute.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ spec:
3737
{{- end }}
3838
rules:
3939
{{- range .Values.django.httpRoute.rules }}
40-
{{- with .matches }}
41-
- matches:
42-
{{- toYaml . | nindent 8 }}
43-
{{- end }}
44-
{{- with .filters }}
40+
- {{- with .matches }}
41+
matches:
42+
{{- toYaml . | nindent 8 }}
43+
{{- end }}
44+
{{- with .filters }}
4545
filters:
46-
{{- toYaml . | nindent 8 }}
47-
{{- end }}
46+
{{- toYaml . | nindent 8 }}
47+
{{- end }}
4848
backendRefs:
4949
- group: ""
5050
kind: Service

helm/defectdojo/values.schema.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,46 @@
388388
"description": "create valkey secret in defectdojo chart, outside of valkey chart",
389389
"type": "boolean"
390390
},
391+
"externalSecret": {
392+
"description": "External Secrets Operator integration",
393+
"type": "object",
394+
"properties": {
395+
"enabled": {
396+
"description": "Enable the ExternalSecret resource",
397+
"type": "boolean"
398+
},
399+
"labels": {
400+
"type": "object"
401+
},
402+
"annotations": {
403+
"type": "object"
404+
},
405+
"refreshInterval": {
406+
"description": "How often to refresh the secret from the external store",
407+
"type": "string"
408+
},
409+
"secretStoreRef": {
410+
"description": "Reference to a SecretStore or ClusterSecretStore",
411+
"type": "object",
412+
"properties": {
413+
"name": {
414+
"type": "string"
415+
},
416+
"kind": {
417+
"type": "string"
418+
}
419+
}
420+
},
421+
"targetSecretName": {
422+
"description": "Name of the Kubernetes Secret created by ESO",
423+
"type": "string"
424+
},
425+
"data": {
426+
"description": "Data mappings from the external store",
427+
"type": "array"
428+
}
429+
}
430+
},
391431
"dbMigrationChecker": {
392432
"type": "object",
393433
"properties": {
@@ -511,6 +551,33 @@
511551
"description": "A list of extra volumes to mount.",
512552
"type": "array"
513553
},
554+
"httpRoute": {
555+
"description": "Kubernetes Gateway API HTTPRoute configuration (alternative to Ingress)",
556+
"type": "object",
557+
"properties": {
558+
"enabled": {
559+
"type": "boolean"
560+
},
561+
"labels": {
562+
"type": "object"
563+
},
564+
"annotations": {
565+
"type": "object"
566+
},
567+
"parentRefs": {
568+
"type": "array"
569+
},
570+
"hostnames": {
571+
"type": "array",
572+
"items": {
573+
"type": "string"
574+
}
575+
},
576+
"rules": {
577+
"type": "array"
578+
}
579+
}
580+
},
514581
"ingress": {
515582
"type": "object",
516583
"properties": {

0 commit comments

Comments
 (0)