diff --git a/charts/media-common-openvpn/Chart.yaml b/charts/media-common-openvpn/Chart.yaml index 40a648fc..d9459540 100644 --- a/charts/media-common-openvpn/Chart.yaml +++ b/charts/media-common-openvpn/Chart.yaml @@ -4,8 +4,9 @@ description: OpenVPN add-on for `media-common`-based charts type: library keywords: - media-common + - openvpn home: https://github.com/k8s-at-home/charts/tree/master/charts/media-common-openvpn maintainers: - name: bjw-s email: bjw-s@users.noreply.github.com -version: 1.0.0 +version: 1.0.1 diff --git a/charts/media-common-openvpn/templates/_container.tpl b/charts/media-common-openvpn/templates/_container.tpl index cf19eedc..f99aa113 100644 --- a/charts/media-common-openvpn/templates/_container.tpl +++ b/charts/media-common-openvpn/templates/_container.tpl @@ -10,41 +10,39 @@ The OpenVPN container(s) to be inserted add: ["NET_ADMIN"] {{- if .Values.openvpn.env }} env: - {{- if .Values.openvpn.env }} {{- range $k, $v := .Values.openvpn.env }} - - name: {{ $k }} - value: {{ $v }} + - name: {{ $k }} + value: {{ $v }} {{- end }} {{- end }} envFrom: - {{- if or .Values.openvpn.auth .Values.openvpn.authSecret }} - - secretRef: - {{- if .Values.openvpn.authSecret }} + {{- if or .Values.openvpn.auth .Values.openvpn.authSecret }} + - secretRef: + {{- if .Values.openvpn.authSecret }} name: {{ .Values.openvpn.authSecret }} - {{- else }} + {{- else }} name: {{ template "media-common.fullname" . }}-openvpn - {{- end }} {{- end }} {{- end }} volumeMounts: - {{- if .Values.openvpn.vpnConf }} - - name: openvpnconf - mountPath: /vpn/vpn.conf - subPath: vpnConf - {{- end }} - {{- if .Values.openvpn.scripts.up }} - - name: openvpnconf - mountPath: /vpn/up.sh - subPath: up.sh - {{- end }} - {{- if .Values.openvpn.scripts.down }} - - name: openvpnconf - mountPath: /vpn/down.sh - subPath: down.sh - {{- end }} - {{- if .Values.openvpn.additionalVolumeMounts }} - {{- toYaml .Values.openvpn.additionalVolumeMounts | nindent 4 }} - {{- end }} + {{- if .Values.openvpn.vpnConf }} + - name: openvpnconf + mountPath: /vpn/vpn.conf + subPath: vpnConf + {{- end }} + {{- if .Values.openvpn.scripts.up }} + - name: openvpnconf + mountPath: /vpn/up.sh + subPath: up.sh + {{- end }} + {{- if .Values.openvpn.scripts.down }} + - name: openvpnconf + mountPath: /vpn/down.sh + subPath: down.sh + {{- end }} + {{- if .Values.openvpn.additionalVolumeMounts }} + {{- toYaml .Values.openvpn.additionalVolumeMounts | nindent 2 }} + {{- end }} livenessProbe: {{- toYaml .Values.openvpn.livenessProbe | nindent 4 }} {{- end -}}