k8s-charts/charts/unifi-controller/templates/service.yaml

65 lines
1.4 KiB
YAML
Raw Normal View History

2023-03-26 20:16:41 +00:00
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "unifi-controller.fullname" . }}
{{- with .Values.service.annotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "unifi-controller.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: 8080
targetPort: 8080
protocol: TCP
name: http
- port: 8443
targetPort: 8443
protocol: TCP
name: https
- port: 3478
targetPort: 3478
protocol: TCP
name: stun
{{- if .Values.service.combinedProtocols }}
- 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.combinedProtocols false }}
---
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
name: l2discover
- port: 5514
targetPort: 5514
protocol: UDP
name: syslog
selector:
{{- include "unifi-controller.selectorLabels" . | nindent 4 }}
{{- end }}