56 lines
No EOL
1.4 KiB
YAML
56 lines
No EOL
1.4 KiB
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ include "ovpn-admin-chart.fullname" . }}
|
|
labels:
|
|
{{- include "ovpn-admin-chart.labels" . | nindent 4 }}
|
|
spec:
|
|
type: {{ .Values.service.openvpnAdmin.type }}
|
|
ports:
|
|
- port: {{ .Values.service.openvpnAdmin.port }}
|
|
targetPort: http
|
|
protocol: TCP
|
|
name: http
|
|
selector:
|
|
{{- include "ovpn-admin-chart.selectorLabels" . | nindent 4 }}
|
|
|
|
{{- if eq .Values.service.openvpn.connectionType "LoadBalancer"}}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: openvpn-external
|
|
labels:
|
|
{{- include "ovpn-admin-chart.labels" . | nindent 4 }}
|
|
spec:
|
|
externalTrafficPolicy: Local
|
|
type: {{ .Values.service.openvpn.type }}
|
|
ports:
|
|
- port: {{ .Values.service.openvpn.port }}
|
|
targetPort: openvpn-tcp
|
|
protocol: TCP
|
|
name: openvpn-tcp
|
|
selector:
|
|
{{- include "ovpn-admin-chart.selectorLabels" . | nindent 4 }}
|
|
|
|
{{- else if eq .Values.service.openvpn.connectionType "ExternalIP" }}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: openvpn-external
|
|
labels:
|
|
{{- include "ovpn-admin-chart.labels" . | nindent 4 }}
|
|
spec:
|
|
externalTrafficPolicy: Local
|
|
type: ClusterIP
|
|
externalIPs:
|
|
- {{ .Values.service.openvpn.externalIP }}
|
|
ports:
|
|
- port: {{ .Values.service.openvpn.externalPort }}
|
|
targetPort: openvpn-tcp
|
|
protocol: TCP
|
|
name: openvpn-tcp
|
|
selector:
|
|
{{- include "ovpn-admin-chart.selectorLabels" . | nindent 4 }}
|
|
{{- end -}} |