Skip to content

Commit

Permalink
feat: add ability to pass extra manifests to the chart (#49)
Browse files Browse the repository at this point in the history
Signed-off-by: Henrik Gerdes <[email protected]>
  • Loading branch information
hegerdes authored Aug 14, 2024
1 parent 2cb3d12 commit 5ed8e29
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
14 changes: 13 additions & 1 deletion charts/kestra/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ spec:
- name: external-secret
mountPath: /app/secrets/external/
{{- end }}

{{- if $dind }}
- name: docker-dind-socket
mountPath: /dind
Expand Down Expand Up @@ -419,3 +419,15 @@ spec:
{{- end -}}


{{/*
Renders a value that contains template.
Usage:
{{ include "kestra.extra-render" ( dict "value" .Values.path.to.the.Value "context" $) }}
*/}}
{{- define "kestra.extra-render" -}}
{{- if typeIs "string" .value }}
{{- tpl .value .context }}
{{- else }}
{{- tpl (.value | toYaml) .context }}
{{- end }}
{{- end -}}
4 changes: 4 additions & 0 deletions charts/kestra/templates/extra-manifests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{- range .Values.extraManifests }}
---
{{ include "kestra.extra-render" (dict "value" . "context" $) }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/kestra/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -304,3 +304,5 @@ startupProbe:
httpGetEnabled: true
httpGetExtra: {}

# -- Extra Kubernetes Manifests
extraManifests: []

0 comments on commit 5ed8e29

Please sign in to comment.