Skip to content

Commit

Permalink
Merge pull request #163 from toanju/wgc-eo
Browse files Browse the repository at this point in the history
wg: add extraObjects
  • Loading branch information
toanju authored Apr 28, 2024
2 parents fbbeee6 + 2b5ef87 commit fbfc650
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/wireguard/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.0
version: 0.2.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
11 changes: 11 additions & 0 deletions charts/wireguard/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,14 @@ Create the name of the service account to use
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Renders a complete tree, even values that contains template.
*/}}
{{- define "wireguard.render" -}}
{{- if typeIs "string" .value }}
{{- tpl .value .context }}
{{ else }}
{{- tpl (.value | toYaml) .context }}
{{- end }}
{{- end -}}
4 changes: 4 additions & 0 deletions charts/wireguard/templates/extraObjects.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{- range .Values.extraObjects }}
---
{{ include "wireguard.render" (dict "value" . "context" $) }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/wireguard/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,7 @@ dnsPolicy: Default
wireguard:
secret:
name: wg0-config


extraObjects: []
# additional objects deployed. Objects are subject to templating.

0 comments on commit fbfc650

Please sign in to comment.