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
|
apiVersion: v2
|
||||||
appVersion: 5.14.23
|
appVersion: 6.0.45
|
||||||
description: Ubiquiti Network's Unifi Controller
|
description: Ubiquiti Network's Unifi Controller
|
||||||
name: unifi
|
name: unifi
|
||||||
version: 1.5.4
|
version: 1.5.5
|
||||||
keywords:
|
keywords:
|
||||||
- ubiquiti
|
- ubiquiti
|
||||||
- unifi
|
- unifi
|
||||||
|
@ -30,3 +30,23 @@ Create chart name and version as used by the chart label.
|
|||||||
{{- define "unifi.chart" -}}
|
{{- define "unifi.chart" -}}
|
||||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end -}}
|
{{- 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 -}}
|
{{- $ingressPath := .Values.captivePortalService.ingress.path -}}
|
||||||
{{- $unifiedServiceEnabled := .Values.unifiedService.enabled -}}
|
{{- $unifiedServiceEnabled := .Values.unifiedService.enabled -}}
|
||||||
{{- $captivePortalHttps := .Values.captivePortalService.https -}}
|
{{- $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
|
apiVersion: extensions/v1beta1
|
||||||
|
{{- end }}
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ $fullName }}-captive
|
name: {{ $fullName }}-captive
|
||||||
@ -33,12 +39,26 @@ spec:
|
|||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: {{ $ingressPath }}
|
- path: {{ $ingressPath }}
|
||||||
|
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||||
|
pathType: Prefix
|
||||||
|
{{- end }}
|
||||||
backend:
|
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
|
serviceName: {{ $fullName }}-captiveportalservice
|
||||||
{{- if $captivePortalHttps }}
|
{{- if $captivePortalHttps }}
|
||||||
servicePort: captive-https
|
servicePort: captive-https
|
||||||
{{- else }}
|
{{- else }}
|
||||||
servicePort: captive-http
|
servicePort: captive-http
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -56,6 +56,5 @@ spec:
|
|||||||
nodePort: {{.Values.captivePortalService.https}}
|
nodePort: {{.Values.captivePortalService.https}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
selector:
|
selector:
|
||||||
app.kubernetes.io/name: {{ include "unifi.name" . }}
|
{{- include "unifi.selectorLabels" . | nindent 6 }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -2,7 +2,13 @@
|
|||||||
{{- $fullName := include "unifi.fullname" . -}}
|
{{- $fullName := include "unifi.fullname" . -}}
|
||||||
{{- $ingressPath := .Values.controllerService.ingress.path -}}
|
{{- $ingressPath := .Values.controllerService.ingress.path -}}
|
||||||
{{- $unifiedServiceEnabled := .Values.unifiedService.enabled -}}
|
{{- $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
|
apiVersion: extensions/v1beta1
|
||||||
|
{{- end }}
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ $fullName }}-controller
|
name: {{ $fullName }}-controller
|
||||||
@ -32,8 +38,18 @@ spec:
|
|||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: {{ $ingressPath }}
|
- path: {{ $ingressPath }}
|
||||||
|
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||||
|
pathType: Prefix
|
||||||
|
{{- end }}
|
||||||
backend:
|
backend:
|
||||||
|
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||||
|
service:
|
||||||
|
name: {{ $fullName }}-controller
|
||||||
|
port:
|
||||||
|
name: controller
|
||||||
|
{{- else -}}
|
||||||
serviceName: {{ $fullName }}-controller
|
serviceName: {{ $fullName }}-controller
|
||||||
servicePort: controller
|
servicePort: controller
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -49,6 +49,5 @@ spec:
|
|||||||
nodePort: {{.Values.controllerService.nodePort}}
|
nodePort: {{.Values.controllerService.nodePort}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
selector:
|
selector:
|
||||||
app.kubernetes.io/name: {{ include "unifi.name" . }}
|
{{- include "unifi.selectorLabels" . | nindent 4 }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -19,8 +19,7 @@ spec:
|
|||||||
type: {{ .Values.strategyType }}
|
type: {{ .Values.strategyType }}
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app.kubernetes.io/name: {{ include "unifi.name" . }}
|
{{- include "unifi.selectorLabels" . | nindent 6 }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
|
@ -49,6 +49,5 @@ spec:
|
|||||||
nodePort: {{.Values.discoveryService.nodePort}}
|
nodePort: {{.Values.discoveryService.nodePort}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
selector:
|
selector:
|
||||||
app.kubernetes.io/name: {{ include "unifi.name" . }}
|
{{- include "unifi.selectorLabels" . | nindent 4 }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -49,6 +49,5 @@ spec:
|
|||||||
nodePort: {{.Values.guiService.nodePort}}
|
nodePort: {{.Values.guiService.nodePort}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
selector:
|
selector:
|
||||||
app.kubernetes.io/name: {{ include "unifi.name" . }}
|
{{- include "unifi.selectorLabels" . | nindent 4 }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -2,19 +2,22 @@
|
|||||||
{{- $fullName := include "unifi.fullname" . -}}
|
{{- $fullName := include "unifi.fullname" . -}}
|
||||||
{{- $ingressPath := .Values.ingress.path -}}
|
{{- $ingressPath := .Values.ingress.path -}}
|
||||||
{{- $unifiedServiceEnabled := .Values.unifiedService.enabled -}}
|
{{- $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
|
apiVersion: extensions/v1beta1
|
||||||
|
{{- end }}
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ $fullName }}
|
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 }}
|
{{- with .Values.ingress.annotations }}
|
||||||
annotations:
|
annotations:
|
||||||
{{ toYaml . | indent 4 }}
|
{{ toYaml . | indent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
{{- include "unifi.labels" . | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
{{- if .Values.ingress.tls }}
|
{{- if .Values.ingress.tls }}
|
||||||
tls:
|
tls:
|
||||||
@ -32,12 +35,26 @@ spec:
|
|||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: {{ $ingressPath }}
|
- path: {{ $ingressPath }}
|
||||||
|
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||||
|
pathType: Prefix
|
||||||
|
{{- end }}
|
||||||
backend:
|
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 }}
|
{{- if $unifiedServiceEnabled }}
|
||||||
serviceName: {{ $fullName }}
|
serviceName: {{ $fullName }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
serviceName: {{ $fullName }}-gui
|
serviceName: {{ $fullName }}-gui
|
||||||
{{- end }}
|
{{- end }}
|
||||||
servicePort: https-gui
|
servicePort: https-gui
|
||||||
|
{{- end -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -49,6 +49,5 @@ spec:
|
|||||||
nodePort: {{.Values.speedtestService.nodePort}}
|
nodePort: {{.Values.speedtestService.nodePort}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
selector:
|
selector:
|
||||||
app.kubernetes.io/name: {{ include "unifi.name" . }}
|
{{- include "unifi.selectorLabels" . | nindent 4 }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -49,6 +49,5 @@ spec:
|
|||||||
nodePort: {{.Values.stunService.nodePort}}
|
nodePort: {{.Values.stunService.nodePort}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
selector:
|
selector:
|
||||||
app.kubernetes.io/name: {{ include "unifi.name" . }}
|
{{- include "unifi.selectorLabels" . | nindent 4 }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -49,6 +49,5 @@ spec:
|
|||||||
nodePort: {{.Values.syslogService.nodePort}}
|
nodePort: {{.Values.syslogService.nodePort}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
selector:
|
selector:
|
||||||
app.kubernetes.io/name: {{ include "unifi.name" . }}
|
{{- include "unifi.selectorLabels" . | nindent 4 }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -101,7 +101,6 @@ spec:
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
selector:
|
selector:
|
||||||
app.kubernetes.io/name: {{ include "unifi.name" . }}
|
{{- include "unifi.selectorLabels" . | nindent 4 }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user