|
@@ -1,16 +1,20 @@
|
|
|
-{{- if and .Values.inbound_IP .Values.inbound_port }}
|
|
|
+{{- if and .Values.service.ip .Values.service.port }}
|
|
|
apiVersion: v1
|
|
|
kind: Service
|
|
|
metadata:
|
|
|
name: {{ .Release.Name }}-ingress
|
|
|
+ {{- if .Values.service.annotations }}
|
|
|
+ annotations:
|
|
|
+ {{- .Values.service.annotations | toYaml | nindent 4 }}
|
|
|
+ {{- end }}
|
|
|
spec:
|
|
|
type: LoadBalancer
|
|
|
selector:
|
|
|
{{- include "openvpn.selectorLabels" . | nindent 4 }}
|
|
|
ports:
|
|
|
- name: ingress
|
|
|
- protocol: {{ .Values.inbound_proto | default "UDP" | upper }}
|
|
|
- port: {{ .Values.inbound_port }}
|
|
|
- loadBalancerIP: {{ .Values.inbound_IP }}
|
|
|
+ protocol: {{ .Values.service.proto | default "UDP" | upper }}
|
|
|
+ port: {{ .Values.service.port }}
|
|
|
+ loadBalancerIP: {{ .Values.service.ip }}
|
|
|
externalTrafficPolicy: Local
|
|
|
{{- end }}
|