service.yaml 568 B

1234567891011121314151617181920
  1. {{- if and .Values.service.ip .Values.service.port }}
  2. apiVersion: v1
  3. kind: Service
  4. metadata:
  5. name: {{ .Release.Name }}-ingress
  6. {{- if .Values.service.annotations }}
  7. annotations:
  8. {{- .Values.service.annotations | toYaml | nindent 4 }}
  9. {{- end }}
  10. spec:
  11. type: LoadBalancer
  12. selector:
  13. {{- include "openvpn.selectorLabels" . | nindent 4 }}
  14. ports:
  15. - name: ingress
  16. protocol: {{ .Values.service.proto | default "UDP" | upper }}
  17. port: {{ .Values.service.port }}
  18. loadBalancerIP: {{ .Values.service.ip }}
  19. externalTrafficPolicy: Local
  20. {{- end }}