add optional UDP only service

This commit is contained in:
James 2023-03-26 21:01:53 +01:00
parent 66e8f222a7
commit cd3b090074
3 changed files with 34 additions and 0 deletions

View File

@ -1,3 +1,4 @@
---
apiVersion: v1
kind: Service
metadata:
@ -23,6 +24,33 @@ spec:
targetPort: 3478
protocol: TCP
name: stun
{{- if eq .Values.service.separateProtocols false }}
- port: 1900
targetPort: 1900
protocol: UDP
name: l2discover
- port: 5514
targetPort: 5514
protocol: UDP
name: syslog
{{- end }}
selector:
{{- include "unifi-controller.selectorLabels" . | nindent 4 }}
{{- if eq .Values.service.separateProtocols true }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "unifi-controller.fullname" . }}-udp
{{- with .Values.service.annotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "unifi-controller.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: 1900
targetPort: 1900
protocol: UDP
@ -33,3 +61,4 @@ spec:
name: syslog
selector:
{{- include "unifi-controller.selectorLabels" . | nindent 4 }}
{{- end }}

View File

@ -0,0 +1,3 @@
service:
type: ClusterIP
separateProtocols: true

View File

@ -50,6 +50,8 @@ securityContext: {}
service:
type: ClusterIP
# Separate TCP and UDP ports into different services (required for MetalLB)
separateProtocols: false
annotations: {}
ingress: