library-chart/chart/templates/addons/vpn/_configmap.tpl

24 lines
601 B
Smarty

{{/*
The VPN config and scripts to be included.
*/}}
{{- define "common.addon.vpn.configmap" -}}
{{- if or .Values.addons.vpn.scripts.up .Values.addons.vpn.scripts.down }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.names.fullname" . }}-vpn
labels: {{- include "common.labels" $ | nindent 4 }}
annotations: {{- include "common.annotations" $ | nindent 4 }}
data:
{{- with .Values.addons.vpn.scripts.up }}
up.sh: |-
{{- . | nindent 4}}
{{- end }}
{{- with .Values.addons.vpn.scripts.down }}
down.sh: |-
{{- . | nindent 4}}
{{- end }}
{{- end -}}
{{- end -}}