scale-catalog/stable/wireguard/7.3.0/templates/_configfilemount.tpl

24 lines
492 B
Smarty
Raw Normal View History

2024-07-13 07:59:30 +00:00
{{- define "wireguard.configfile" -}}
{{- if and .Values.wg.configFileHostPath ( not .Values.wg.config.enable ) }}
enabled: true
type: hostPath
readOnly: true
hostPathType: File
hostPath: {{ .Values.wg.configFileHostPath }}
mountPath: /etc/wireguard/wg0.conf
{{- end }}
{{- if .Values.wg.config.enabled }}
enabled: true
type: secret
readOnly: true
defaultMode: "0600"
objectName: wg-config-secret
mountPath: /etc/wireguard
items:
- key: wg0.conf
path: wg0.conf
{{- end }}
{{- end -}}