diff --git a/charts/wireguard/Chart.yaml b/charts/wireguard/Chart.yaml index f593126..cfc3eac 100644 --- a/charts/wireguard/Chart.yaml +++ b/charts/wireguard/Chart.yaml @@ -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 diff --git a/charts/wireguard/templates/_helpers.tpl b/charts/wireguard/templates/_helpers.tpl index a1b676d..18d583d 100644 --- a/charts/wireguard/templates/_helpers.tpl +++ b/charts/wireguard/templates/_helpers.tpl @@ -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 -}} diff --git a/charts/wireguard/templates/extraObjects.yaml b/charts/wireguard/templates/extraObjects.yaml new file mode 100644 index 0000000..7f35c93 --- /dev/null +++ b/charts/wireguard/templates/extraObjects.yaml @@ -0,0 +1,4 @@ +{{- range .Values.extraObjects }} +--- +{{ include "wireguard.render" (dict "value" . "context" $) }} +{{- end }} diff --git a/charts/wireguard/values.yaml b/charts/wireguard/values.yaml index 729fea7..6fafee3 100644 --- a/charts/wireguard/values.yaml +++ b/charts/wireguard/values.yaml @@ -79,3 +79,7 @@ dnsPolicy: Default wireguard: secret: name: wg0-config + + +extraObjects: [] +# additional objects deployed. Objects are subject to templating.