{{- if .Values.netOpenvpn -}} apiVersion: v1 kind: ConfigMap metadata: name: {{ include "openvpn.fullname" . }}-routecheck data: route-add: | {{- range .Values.netOpenvpn}} ip route add {{ . }} via {{ $.Values.virtIP_addr }} metric 200 {{- end}} sleep infinity route-delete: | {{- range .Values.netOpenvpn}} ip route delete {{ . }} via {{ $.Values.virtIP_addr }} metric 200 {{- end}} {{- end -}}