This repository has been archived by the owner on Feb 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ingress for Unifi controller sevice when not using the unified se…
…rvice. Fixes #21887 Signed-off-by: Stephen Liang <[email protected]>
- Loading branch information
1 parent
80cf705
commit 89b3717
Showing
4 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{{- if (and .Values.controllerService.ingress.enabled (not .Values.unifiedService.enabled)) }} | ||
{{- $fullName := include "unifi.fullname" . -}} | ||
{{- $ingressPath := .Values.controllerService.ingress.path -}} | ||
{{- $unifiedServiceEnabled := .Values.unifiedService.enabled -}} | ||
apiVersion: extensions/v1beta1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ $fullName }}-controller | ||
labels: | ||
app.kubernetes.io/name: {{ include "unifi.name" . }} | ||
helm.sh/chart: {{ include "unifi.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- with .Values.controllerService.ingress.annotations }} | ||
annotations: | ||
{{ toYaml . | indent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if .Values.controllerService.ingress.tls }} | ||
tls: | ||
{{- range .Values.controllerService.ingress.tls }} | ||
- hosts: | ||
{{- range .hosts }} | ||
- {{ . | quote }} | ||
{{- end }} | ||
secretName: {{ .secretName }} | ||
{{- end }} | ||
{{- end }} | ||
rules: | ||
{{- range .Values.controllerService.ingress.hosts }} | ||
- host: {{ . }} | ||
http: | ||
paths: | ||
- path: {{ $ingressPath }} | ||
backend: | ||
serviceName: {{ $fullName }}-controller | ||
servicePort: controller | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters