mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-01-24 07:59:02 +00:00
[unifi] Updated AppVersion to 6.0.45 (#705)
* Updated AppVersion to 6.0.45 Modified the Ingress definitions to use the latest Ingress spec (networking.k8s.io/v1) for clusters 1.18+ and the beta spec (networking.k8s.io/v1beta1) 1.14+. Otherwise, continue using extensions/v1beta1 * Moved Labels and Selector Labels to _helpers (in following latest helm guidelines) and fixed ingress templates * Modified logic in the ingress templates to reduce some of the nesting Co-authored-by: ᗪєνιη ᗷυнʟ <onedr0p@users.noreply.github.com>
This commit is contained in:
parent
1eaf501196
commit
3a78db20ad
@ -1,8 +1,8 @@
|
||||
apiVersion: v2
|
||||
appVersion: 5.14.23
|
||||
appVersion: 6.0.45
|
||||
description: Ubiquiti Network's Unifi Controller
|
||||
name: unifi
|
||||
version: 1.5.4
|
||||
version: 1.5.5
|
||||
keywords:
|
||||
- ubiquiti
|
||||
- unifi
|
||||
|
@ -30,3 +30,23 @@ Create chart name and version as used by the chart label.
|
||||
{{- define "unifi.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "unifi.labels" -}}
|
||||
helm.sh/chart: {{ include "unifi.chart" . }}
|
||||
{{ include "unifi.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "unifi.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "unifi.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
@ -3,7 +3,13 @@
|
||||
{{- $ingressPath := .Values.captivePortalService.ingress.path -}}
|
||||
{{- $unifiedServiceEnabled := .Values.unifiedService.enabled -}}
|
||||
{{- $captivePortalHttps := .Values.captivePortalService.https -}}
|
||||
{{- if semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
{{- else -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}-captive
|
||||
@ -28,17 +34,31 @@ spec:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.captivePortalService.ingress.hosts }}
|
||||
{{- range .Values.captivePortalService.ingress.hosts }}
|
||||
- host: {{ . }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ $ingressPath }}
|
||||
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||
pathType: Prefix
|
||||
{{- end }}
|
||||
backend:
|
||||
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||
service:
|
||||
name: {{ $fullName }}-captiveportalservice
|
||||
port:
|
||||
{{- if $captivePortalHttps }}
|
||||
name: captive-https
|
||||
{{- else }}
|
||||
name: captive-http
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
serviceName: {{ $fullName }}-captiveportalservice
|
||||
{{- if $captivePortalHttps }}
|
||||
servicePort: captive-https
|
||||
{{- else }}
|
||||
servicePort: captive-http
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@ -56,6 +56,5 @@ spec:
|
||||
nodePort: {{.Values.captivePortalService.https}}
|
||||
{{ end }}
|
||||
selector:
|
||||
app.kubernetes.io/name: {{ include "unifi.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- include "unifi.selectorLabels" . | nindent 6 }}
|
||||
{{ end }}
|
||||
|
@ -2,7 +2,13 @@
|
||||
{{- $fullName := include "unifi.fullname" . -}}
|
||||
{{- $ingressPath := .Values.controllerService.ingress.path -}}
|
||||
{{- $unifiedServiceEnabled := .Values.unifiedService.enabled -}}
|
||||
{{- if semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
{{- else -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}-controller
|
||||
@ -32,8 +38,18 @@ spec:
|
||||
http:
|
||||
paths:
|
||||
- path: {{ $ingressPath }}
|
||||
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||
pathType: Prefix
|
||||
{{- end }}
|
||||
backend:
|
||||
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||
service:
|
||||
name: {{ $fullName }}-controller
|
||||
port:
|
||||
name: controller
|
||||
{{- else -}}
|
||||
serviceName: {{ $fullName }}-controller
|
||||
servicePort: controller
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@ -49,6 +49,5 @@ spec:
|
||||
nodePort: {{.Values.controllerService.nodePort}}
|
||||
{{ end }}
|
||||
selector:
|
||||
app.kubernetes.io/name: {{ include "unifi.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- include "unifi.selectorLabels" . | nindent 4 }}
|
||||
{{ end }}
|
||||
|
@ -19,8 +19,7 @@ spec:
|
||||
type: {{ .Values.strategyType }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ include "unifi.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- include "unifi.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
|
@ -49,6 +49,5 @@ spec:
|
||||
nodePort: {{.Values.discoveryService.nodePort}}
|
||||
{{ end }}
|
||||
selector:
|
||||
app.kubernetes.io/name: {{ include "unifi.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- include "unifi.selectorLabels" . | nindent 4 }}
|
||||
{{ end }}
|
||||
|
@ -49,6 +49,5 @@ spec:
|
||||
nodePort: {{.Values.guiService.nodePort}}
|
||||
{{ end }}
|
||||
selector:
|
||||
app.kubernetes.io/name: {{ include "unifi.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- include "unifi.selectorLabels" . | nindent 4 }}
|
||||
{{ end }}
|
||||
|
@ -2,19 +2,22 @@
|
||||
{{- $fullName := include "unifi.fullname" . -}}
|
||||
{{- $ingressPath := .Values.ingress.path -}}
|
||||
{{- $unifiedServiceEnabled := .Values.unifiedService.enabled -}}
|
||||
{{- if semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
{{- else -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
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.ingress.annotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "unifi.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
@ -27,17 +30,31 @@ spec:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ . }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ $ingressPath }}
|
||||
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||
pathType: Prefix
|
||||
{{- end }}
|
||||
backend:
|
||||
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||
service:
|
||||
{{- if $unifiedServiceEnabled }}
|
||||
name: {{ $fullName }}
|
||||
{{- else }}
|
||||
name: {{ $fullName }}-gui
|
||||
{{- end }}
|
||||
port:
|
||||
name: https-gui
|
||||
{{- else -}}
|
||||
{{- if $unifiedServiceEnabled }}
|
||||
serviceName: {{ $fullName }}
|
||||
{{- else }}
|
||||
serviceName: {{ $fullName }}-gui
|
||||
{{- end }}
|
||||
servicePort: https-gui
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@ -49,6 +49,5 @@ spec:
|
||||
nodePort: {{.Values.speedtestService.nodePort}}
|
||||
{{ end }}
|
||||
selector:
|
||||
app.kubernetes.io/name: {{ include "unifi.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- include "unifi.selectorLabels" . | nindent 4 }}
|
||||
{{ end }}
|
||||
|
@ -49,6 +49,5 @@ spec:
|
||||
nodePort: {{.Values.stunService.nodePort}}
|
||||
{{ end }}
|
||||
selector:
|
||||
app.kubernetes.io/name: {{ include "unifi.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- include "unifi.selectorLabels" . | nindent 4 }}
|
||||
{{ end }}
|
||||
|
@ -49,6 +49,5 @@ spec:
|
||||
nodePort: {{.Values.syslogService.nodePort}}
|
||||
{{ end }}
|
||||
selector:
|
||||
app.kubernetes.io/name: {{ include "unifi.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- include "unifi.selectorLabels" . | nindent 4 }}
|
||||
{{ end }}
|
||||
|
@ -101,7 +101,6 @@ spec:
|
||||
{{ end }}
|
||||
|
||||
selector:
|
||||
app.kubernetes.io/name: {{ include "unifi.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- include "unifi.selectorLabels" . | nindent 4 }}
|
||||
{{ end }}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user