瀏覽代碼

add proto to openvpn LB service

Vadim Surkov 3 年之前
父節點
當前提交
a94dae6d6c
共有 1 個文件被更改,包括 4 次插入2 次删除
  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
 kind: Service
 metadata:
@@ -8,7 +9,8 @@ spec:
     {{- include "openvpn.selectorLabels" . | nindent 4 }}
   ports:
   - name: ingress
-    protocol: TCP
+    protocol: {{ .Values.inbound_proto | default "UDP" | upper }}
     port: {{ .Values.inbound_port }}
   loadBalancerIP: {{ .Values.inbound_IP }}
-  externalTrafficPolicy: Local
+  externalTrafficPolicy: Local
+  {{- end }}