[media-common-openvpn] Fix auth syntax, indenting (#56)

This commit is contained in:
Bernd Schörgers 2020-09-21 20:57:55 +02:00 committed by GitHub
parent fb1c653533
commit bc2742e655
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 27 deletions

View File

@ -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

View File

@ -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 -}}