Browse Source

add proto to openvpn LB service

Vadim Surkov 3 years ago
parent
commit
a94dae6d6c
1 changed files with 4 additions and 2 deletions
  1. 4 2
      helm/templates/service.yaml

+ 4 - 2
helm/templates/service.yaml

@@ -1,3 +1,4 @@
+{{- if and .Values.inbound_IP .Values.inbound_port }}
 apiVersion: v1
 apiVersion: v1
 kind: Service
 kind: Service
 metadata:
 metadata:
@@ -8,7 +9,8 @@ spec:
     {{- include "openvpn.selectorLabels" . | nindent 4 }}
     {{- include "openvpn.selectorLabels" . | nindent 4 }}
   ports:
   ports:
   - name: ingress
   - name: ingress
-    protocol: TCP
+    protocol: {{ .Values.inbound_proto | default "UDP" | upper }}
     port: {{ .Values.inbound_port }}
     port: {{ .Values.inbound_port }}
   loadBalancerIP: {{ .Values.inbound_IP }}
   loadBalancerIP: {{ .Values.inbound_IP }}
-  externalTrafficPolicy: Local
+  externalTrafficPolicy: Local
+  {{- end }}