Skip to content

Commit

Permalink
feat(helm): Add support for staticName for initializer (#11237)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiblik authored Nov 12, 2024
1 parent 9b1fd65 commit eb6537e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions helm/defectdojo/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,12 @@ Create chart name and version as used by the chart label.
{{- end -}}

{{- define "initializer.jobname" -}}
{{- if .Values.initializer.staticName -}}
{{ .Release.Name }}-initializer
{{- else -}}
{{ .Release.Name }}-initializer-{{- printf "%s" now | date "2006-01-02-15-04" -}}
{{- end -}}
{{- end -}}

{{/*
Creates the array for DD_ALLOWED_HOSTS in configmap
Expand Down
5 changes: 5 additions & 0 deletions helm/defectdojo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,11 @@ initializer:
# @type: array<map>
extraVolumes: []

# staticName defines whether name of the job will be the same (e.g., "defectdojo-initializer")
# or different every time - generated based on current time (e.g., "defectdojo-initializer-2024-11-11-18-57")
# This might be handy for ArgoCD deployments
staticName: false

postgresql:
enabled: true
auth:
Expand Down

0 comments on commit eb6537e

Please sign in to comment.