Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2285a5e

Browse files
authored
feat: add ability to deploy extra k8s yamls with helm chart (#5942)
1 parenta750b19 commit2285a5e

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

‎helm/templates/_helpers.tpl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,3 +177,16 @@ Deprecated value coder.tls.secretName must not be used.
177177
{{ fail "coder.tls.secretName is deprecated, use coder.tls.secretNames instead." }}
178178
{{- end }}
179179
{{- end }}
180+
181+
{{/*
182+
Renders a value that contains a template.
183+
Usage:
184+
{{ include "coder.renderTemplate" ( dict "value" .Values.path.to.the.Value "context" $) }}
185+
*/}}
186+
{{- define "coder.renderTemplate" -}}
187+
{{- if typeIs "string" .value }}
188+
{{- tpl .value .context }}
189+
{{- else }}
190+
{{- tpl (.value | toYaml) .context }}
191+
{{- end }}
192+
{{- end -}}

‎helm/templates/extra-templates.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{{- range .Values.extraTemplates }}
2+
---
3+
{{ include "coder.renderTemplate" (dict "value" . "context" $) }}
4+
{{- end }}

‎helm/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,15 @@ coder:
198198
# coder.ingress.tls.wildcardSecretName -- The name of the TLS secret to
199199
# use for the wildcard host.
200200
wildcardSecretName:""
201+
202+
# extraTemplates -- Array of extra objects to deploy with the release. Strings
203+
# are evaluated as a template and can use template expansions and functions. All
204+
# other objects are used as yaml.
205+
extraTemplates:
206+
#- |
207+
# apiVersion: v1
208+
# kind: ConfigMap
209+
# metadata:
210+
# name: my-configmap
211+
# data:
212+
# key: {{ .Values.myCustomValue | quote }}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp