mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-02-03 07:49:03 +00:00
stable/unifi: Added "unified service" option to place everything under one service (#11550)
Signed-off-by: Mike Cronce <mike@quadra-tec.net>
This commit is contained in:
parent
93addda234
commit
652612e76b
@ -2,7 +2,7 @@ apiVersion: v1
|
|||||||
appVersion: 5.9.29
|
appVersion: 5.9.29
|
||||||
description: Ubiquiti Network's Unifi Controller
|
description: Ubiquiti Network's Unifi Controller
|
||||||
name: unifi
|
name: unifi
|
||||||
version: 0.3.1
|
version: 0.3.2
|
||||||
keywords:
|
keywords:
|
||||||
- ubiquiti
|
- ubiquiti
|
||||||
- unifi
|
- unifi
|
||||||
|
@ -67,6 +67,13 @@ The following tables lists the configurable parameters of the Unifi chart and th
|
|||||||
| `discoveryService.loadBalancerIP` | Loadbalance IP for AP discovery | `{}` |
|
| `discoveryService.loadBalancerIP` | Loadbalance IP for AP discovery | `{}` |
|
||||||
| `discoveryService.loadBalancerSourceRanges` | List of IP CIDRs allowed access to load balancer (if supported) | None |
|
| `discoveryService.loadBalancerSourceRanges` | List of IP CIDRs allowed access to load balancer (if supported) | None |
|
||||||
| `discoveryService.externalTrafficPolicy` | Set the externalTrafficPolicy in the Service to either Cluster or Local | `Cluster` |
|
| `discoveryService.externalTrafficPolicy` | Set the externalTrafficPolicy in the Service to either Cluster or Local | `Cluster` |
|
||||||
|
| `unifiedService.enabled` | Use a single service for GUI, controller, STUN, and discovery | `false` |
|
||||||
|
| `unifiedService.type` | Kubernetes service type for the unified service | `ClusterIP` |
|
||||||
|
| `unifiedService.annotations` | Annotations for the unified service | `{}` |
|
||||||
|
| `unifiedService.labels` | Custom labels for the unified service | `{}` |
|
||||||
|
| `unifiedService.loadBalancerIP` | Load balancer IP for the unified service | None |
|
||||||
|
| `unifiedService.loadBalancerSourceRanges` | List of IP CIDRs allowed access to the load balancer (if supported) | None |
|
||||||
|
| `unifiedService.externalTrafficPolicy` | Set the externalTrafficPolicy in the service to either Cluster or Local | `Cluster` |
|
||||||
| `ingress.enabled` | Enables Ingress | `false` |
|
| `ingress.enabled` | Enables Ingress | `false` |
|
||||||
| `ingress.annotations` | Ingress annotations | `{}` |
|
| `ingress.annotations` | Ingress annotations | `{}` |
|
||||||
| `ingress.labels` | Custom labels | `{}` |
|
| `ingress.labels` | Custom labels | `{}` |
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{{ if not .Values.unifiedService.enabled }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
@ -50,3 +51,4 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
app: {{ template "unifi.name" . }}
|
app: {{ template "unifi.name" . }}
|
||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
|
{{ end }}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{{ if not .Values.unifiedService.enabled }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
@ -50,3 +51,4 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
app: {{ template "unifi.name" . }}
|
app: {{ template "unifi.name" . }}
|
||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
|
{{ end }}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{{ if not .Values.unifiedService.enabled }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
@ -50,3 +51,4 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
app: {{ template "unifi.name" . }}
|
app: {{ template "unifi.name" . }}
|
||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
|
{{ end }}
|
||||||
|
@ -32,7 +32,11 @@ spec:
|
|||||||
paths:
|
paths:
|
||||||
- path: {{ $ingressPath }}
|
- path: {{ $ingressPath }}
|
||||||
backend:
|
backend:
|
||||||
|
{{- if .Values.unifiedService.enabled }}
|
||||||
|
serviceName: {{ $fullName }}
|
||||||
|
{{- else }}
|
||||||
serviceName: {{ $fullName }}-gui
|
serviceName: {{ $fullName }}-gui
|
||||||
|
{{- end }}
|
||||||
servicePort: https-gui
|
servicePort: https-gui
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{{ if not .Values.unifiedService.enabled }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
@ -50,3 +51,4 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
app: {{ template "unifi.name" . }}
|
app: {{ template "unifi.name" . }}
|
||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
|
{{ end }}
|
||||||
|
76
charts/unifi/templates/unified-svc.yaml
Normal file
76
charts/unifi/templates/unified-svc.yaml
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
{{ if .Values.unifiedService.enabled }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ template "unifi.fullname" . }}
|
||||||
|
labels:
|
||||||
|
app: {{ template "unifi.name" . }}
|
||||||
|
chart: {{ template "unifi.chart" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
{{- if .Values.unifiedService.labels }}
|
||||||
|
{{ toYaml .Values.unifiedService.labels | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.unifiedService.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml . | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if (or (eq .Values.unifiedService.type "ClusterIP") (empty .Values.unifiedService.type)) }}
|
||||||
|
type: ClusterIP
|
||||||
|
{{- if .Values.unifiedService.clusterIP }}
|
||||||
|
clusterIP: {{ .Values.unifiedService.clusterIP }}
|
||||||
|
{{end}}
|
||||||
|
{{- else if eq .Values.unifiedService.type "LoadBalancer" }}
|
||||||
|
type: {{ .Values.unifiedService.type }}
|
||||||
|
{{- if .Values.unifiedService.loadBalancerIP }}
|
||||||
|
loadBalancerIP: {{ .Values.unifiedService.loadBalancerIP }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.unifiedService.loadBalancerSourceRanges }}
|
||||||
|
loadBalancerSourceRanges:
|
||||||
|
{{ toYaml .Values.unifiedService.loadBalancerSourceRanges | indent 4 }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else }}
|
||||||
|
type: {{ .Values.unifiedService.type }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.unifiedService.externalIPs }}
|
||||||
|
externalIPs:
|
||||||
|
{{ toYaml .Values.unifiedService.externalIPs | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.unifiedService.externalTrafficPolicy }}
|
||||||
|
externalTrafficPolicy: {{ .Values.unifiedService.externalTrafficPolicy }}
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- port: {{ .Values.controllerService.port }}
|
||||||
|
targetPort: controller
|
||||||
|
protocol: TCP
|
||||||
|
name: controller
|
||||||
|
{{ if (and (eq .Values.unifiedService.type "NodePort") (not (empty .Values.controllerService.nodePort))) }}
|
||||||
|
nodePort: {{.Values.controllerService.nodePort}}
|
||||||
|
{{ end }}
|
||||||
|
- port: {{ .Values.discoveryService.port }}
|
||||||
|
targetPort: discovery
|
||||||
|
protocol: UDP
|
||||||
|
name: discovery
|
||||||
|
{{ if (and (eq .Values.unifiedService.type "NodePort") (not (empty .Values.discoveryService.nodePort))) }}
|
||||||
|
nodePort: {{.Values.discoveryService.nodePort}}
|
||||||
|
{{ end }}
|
||||||
|
- port: {{ .Values.stunService.port }}
|
||||||
|
targetPort: stun
|
||||||
|
protocol: UDP
|
||||||
|
name: stun
|
||||||
|
{{ if (and (eq .Values.unifiedService.type "NodePort") (not (empty .Values.stunService.nodePort))) }}
|
||||||
|
nodePort: {{.Values.stunService.nodePort}}
|
||||||
|
{{ end }}
|
||||||
|
- name: https-gui
|
||||||
|
port: {{ .Values.guiService.port }}
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: https-gui
|
||||||
|
{{ if (and (eq .Values.unifiedService.type "NodePort") (not (empty .Values.guiService.nodePort))) }}
|
||||||
|
nodePort: {{.Values.guiService.nodePort}}
|
||||||
|
{{ end }}
|
||||||
|
selector:
|
||||||
|
app: {{ template "unifi.name" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
{{ end }}
|
||||||
|
|
@ -9,6 +9,34 @@ image:
|
|||||||
tag: 5.9.29
|
tag: 5.9.29
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
# If enabled, the controller, discovery, GUI, and STUN services will not be
|
||||||
|
# created.
|
||||||
|
# Instead, one service will be created with the port and nodePort settings from
|
||||||
|
# controllerService, discoveryService, guiService, and stunService.
|
||||||
|
# This is useful if, for example, the ClusterIP network is routable and being
|
||||||
|
# accessed directly by access points, and the APs don't have a way to discern
|
||||||
|
# different services on different IPs.
|
||||||
|
unifiedService:
|
||||||
|
enabled: false
|
||||||
|
type: ClusterIP
|
||||||
|
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||||
|
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||||
|
##
|
||||||
|
# nodePort:
|
||||||
|
## Provide any additional annotations which may be required. This can be used to
|
||||||
|
## set the LoadBalancer service type to internal only.
|
||||||
|
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||||
|
##
|
||||||
|
annotations: {}
|
||||||
|
labels: {}
|
||||||
|
## Use loadBalancerIP to request a specific static IP,
|
||||||
|
## otherwise leave blank
|
||||||
|
##
|
||||||
|
loadBalancerIP:
|
||||||
|
# loadBalancerSourceRanges: []
|
||||||
|
## Set the externalTrafficPolicy in the Service to either Cluster or Local
|
||||||
|
# externalTrafficPolicy: Cluster
|
||||||
|
|
||||||
guiService:
|
guiService:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
port: 8443
|
port: 8443
|
||||||
|
Loading…
Reference in New Issue
Block a user