feat: add ability to deploy extra k8s yamls with helm chart (#5942)

This commit is contained in:
mh013370
2023-02-03 17:32:02 +00:00
committed by GitHub
parent a750b1948b
commit 2285a5e8a0
3 changed files with 29 additions and 0 deletions
+13
View File
@@ -177,3 +177,16 @@ Deprecated value coder.tls.secretName must not be used.
{{ fail "coder.tls.secretName is deprecated, use coder.tls.secretNames instead." }}
{{- end }}
{{- end }}
{{/*
Renders a value that contains a template.
Usage:
{{ include "coder.renderTemplate" ( dict "value" .Values.path.to.the.Value "context" $) }}
*/}}
{{- define "coder.renderTemplate" -}}
{{- if typeIs "string" .value }}
{{- tpl .value .context }}
{{- else }}
{{- tpl (.value | toYaml) .context }}
{{- end }}
{{- end -}}
+4
View File
@@ -0,0 +1,4 @@
{{- range .Values.extraTemplates }}
---
{{ include "coder.renderTemplate" (dict "value" . "context" $) }}
{{- end }}
+12
View File
@@ -198,3 +198,15 @@ coder:
# coder.ingress.tls.wildcardSecretName -- The name of the TLS secret to
# use for the wildcard host.
wildcardSecretName: ""
# extraTemplates -- Array of extra objects to deploy with the release. Strings
# are evaluated as a template and can use template expansions and functions. All
# other objects are used as yaml.
extraTemplates:
#- |
# apiVersion: v1
# kind: ConfigMap
# metadata:
# name: my-configmap
# data:
# key: {{ .Values.myCustomValue | quote }}