[stable/unifi] unifi chart enhancements (#12047)

* switching unifi chart to SatefulSet

* based on the persistent nature of this chart as well as [this
discussion](https://github.com/helm/charts/issues/1863), migrating the
chart to a StatefulSet instead of a deployment. As a result bumping the
major version
* bumping unifi controller to the latest stable version (5.10.19)
* adding @mcronce to the OWNERS file

Signed-off-by: Jeff Billimek <jeff@billimek.com>

* using volumeClaimTemplates for statefulSet

* also updating label syntax to current helm standards (e.g.
`app.kubernetes.io/name`)

Signed-off-by: Jeff Billimek <jeff@billimek.com>

* fixing indenting

Signed-off-by: Jeff Billimek <jeff@billimek.com>

* using Parallel podManagementPolicy

Signed-off-by: Jeff Billimek <jeff@billimek.com>

* revert to Deployment and leverage strategy types

Signed-off-by: Jeff Billimek <jeff@billimek.com>

* include readme entry for strategyType

Signed-off-by: Jeff Billimek <jeff@billimek.com>

* hard-code replica count and add mcronce to Chart maintainers

Signed-off-by: Jeff Billimek <jeff@billimek.com>

* fixing linting error

Signed-off-by: Jeff Billimek <jeff@billimek.com>
This commit is contained in:
Jeff Billimek 2019-03-28 12:32:42 -04:00
parent 7f3bc53d12
commit d28bf3fecf
No known key found for this signature in database
GPG Key ID: 214B3EF39B4956B7
11 changed files with 55 additions and 47 deletions

View File

@ -1,8 +1,8 @@
apiVersion: v1 apiVersion: v1
appVersion: 5.9.29 appVersion: 5.10.19
description: Ubiquiti Network's Unifi Controller description: Ubiquiti Network's Unifi Controller
name: unifi name: unifi
version: 0.3.3 version: 0.4.0
keywords: keywords:
- ubiquiti - ubiquiti
- unifi - unifi
@ -15,3 +15,5 @@ sources:
maintainers: maintainers:
- name: billimek - name: billimek
email: jeff@billimek.com email: jeff@billimek.com
- name: mcronce
email: mike@quadra-tec.net

View File

@ -1,4 +1,6 @@
approvers: approvers:
- billimek - billimek
- mcronce
reviewers: reviewers:
- billimek - billimek
- mcronce

View File

@ -39,6 +39,7 @@ The following tables lists the configurable parameters of the Unifi chart and th
| `image.repository` | Image repository | `jacobalberty/unifi` | | `image.repository` | Image repository | `jacobalberty/unifi` |
| `image.tag` | Image tag. Possible values listed [here][docker]. | `5.9.29` | | `image.tag` | Image tag. Possible values listed [here][docker]. | `5.9.29` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` | | `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `strategyType` | Specifies the strategy used to replace old Pods by new ones | `Recreate` |
| `guiService.type` | Kubernetes service type for the Unifi GUI | `ClusterIP` | | `guiService.type` | Kubernetes service type for the Unifi GUI | `ClusterIP` |
| `guiService.port` | Kubernetes port where the Unifi GUI is exposed | `8443` | | `guiService.port` | Kubernetes port where the Unifi GUI is exposed | `8443` |
| `guiService.annotations` | Service annotations for the Unifi GUI | `{}` | | `guiService.annotations` | Service annotations for the Unifi GUI | `{}` |

View File

@ -4,10 +4,10 @@ kind: Service
metadata: metadata:
name: {{ template "unifi.fullname" . }}-controller name: {{ template "unifi.fullname" . }}-controller
labels: labels:
app: {{ template "unifi.name" . }} app.kubernetes.io/name: {{ include "unifi.name" . }}
chart: {{ template "unifi.chart" . }} helm.sh/chart: {{ include "unifi.chart" . }}
release: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
heritage: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.controllerService.labels }} {{- if .Values.controllerService.labels }}
{{ toYaml .Values.controllerService.labels | indent 4 }} {{ toYaml .Values.controllerService.labels | indent 4 }}
{{- end }} {{- end }}
@ -49,6 +49,6 @@ spec:
nodePort: {{.Values.controllerService.nodePort}} nodePort: {{.Values.controllerService.nodePort}}
{{ end }} {{ end }}
selector: selector:
app: {{ template "unifi.name" . }} app.kubernetes.io/name: {{ include "unifi.name" . }}
release: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
{{ end }} {{ end }}

View File

@ -3,21 +3,23 @@ kind: Deployment
metadata: metadata:
name: {{ template "unifi.fullname" . }} name: {{ template "unifi.fullname" . }}
labels: labels:
app: {{ template "unifi.name" . }} app.kubernetes.io/name: {{ include "unifi.name" . }}
chart: {{ template "unifi.chart" . }} helm.sh/chart: {{ include "unifi.chart" . }}
release: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
heritage: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
spec: spec:
replicas: {{ .Values.replicaCount }} replicas: 1
strategy:
type: {{ .Values.strategyType }}
selector: selector:
matchLabels: matchLabels:
app: {{ template "unifi.name" . }} app.kubernetes.io/name: {{ include "unifi.name" . }}
release: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
template: template:
metadata: metadata:
labels: labels:
app: {{ template "unifi.name" . }} app.kubernetes.io/name: {{ include "unifi.name" . }}
release: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.podAnnotations }} {{- if .Values.podAnnotations }}
annotations: annotations:
{{- range $key, $value := .Values.podAnnotations }} {{- range $key, $value := .Values.podAnnotations }}

View File

@ -4,10 +4,10 @@ kind: Service
metadata: metadata:
name: {{ template "unifi.fullname" . }}-discovery name: {{ template "unifi.fullname" . }}-discovery
labels: labels:
app: {{ template "unifi.name" . }} app.kubernetes.io/name: {{ include "unifi.name" . }}
chart: {{ template "unifi.chart" . }} helm.sh/chart: {{ include "unifi.chart" . }}
release: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
heritage: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.discoveryService.labels }} {{- if .Values.discoveryService.labels }}
{{ toYaml .Values.discoveryService.labels | indent 4 }} {{ toYaml .Values.discoveryService.labels | indent 4 }}
{{- end }} {{- end }}
@ -49,6 +49,6 @@ spec:
nodePort: {{.Values.discoveryService.nodePort}} nodePort: {{.Values.discoveryService.nodePort}}
{{ end }} {{ end }}
selector: selector:
app: {{ template "unifi.name" . }} app.kubernetes.io/name: {{ include "unifi.name" . }}
release: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
{{ end }} {{ end }}

View File

@ -4,10 +4,10 @@ kind: Service
metadata: metadata:
name: {{ template "unifi.fullname" . }}-gui name: {{ template "unifi.fullname" . }}-gui
labels: labels:
app: {{ template "unifi.name" . }} app.kubernetes.io/name: {{ include "unifi.name" . }}
chart: {{ template "unifi.chart" . }} helm.sh/chart: {{ include "unifi.chart" . }}
release: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
heritage: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.guiService.labels }} {{- if .Values.guiService.labels }}
{{ toYaml .Values.guiService.labels | indent 4 }} {{ toYaml .Values.guiService.labels | indent 4 }}
{{- end }} {{- end }}
@ -49,6 +49,6 @@ spec:
nodePort: {{.Values.guiService.nodePort}} nodePort: {{.Values.guiService.nodePort}}
{{ end }} {{ end }}
selector: selector:
app: {{ template "unifi.name" . }} app.kubernetes.io/name: {{ include "unifi.name" . }}
release: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
{{ end }} {{ end }}

View File

@ -7,10 +7,10 @@ kind: Ingress
metadata: metadata:
name: {{ $fullName }} name: {{ $fullName }}
labels: labels:
app: {{ template "unifi.name" . }} app.kubernetes.io/name: {{ include "unifi.name" . }}
chart: {{ template "unifi.chart" . }} helm.sh/chart: {{ include "unifi.chart" . }}
release: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
heritage: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- with .Values.ingress.annotations }} {{- with .Values.ingress.annotations }}
annotations: annotations:
{{ toYaml . | indent 4 }} {{ toYaml . | indent 4 }}

View File

@ -4,10 +4,10 @@ kind: Service
metadata: metadata:
name: {{ template "unifi.fullname" . }}-stun name: {{ template "unifi.fullname" . }}-stun
labels: labels:
app: {{ template "unifi.name" . }} app.kubernetes.io/name: {{ include "unifi.name" . }}
chart: {{ template "unifi.chart" . }} helm.sh/chart: {{ include "unifi.chart" . }}
release: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
heritage: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.stunService.labels }} {{- if .Values.stunService.labels }}
{{ toYaml .Values.stunService.labels | indent 4 }} {{ toYaml .Values.stunService.labels | indent 4 }}
{{- end }} {{- end }}
@ -49,6 +49,6 @@ spec:
nodePort: {{.Values.stunService.nodePort}} nodePort: {{.Values.stunService.nodePort}}
{{ end }} {{ end }}
selector: selector:
app: {{ template "unifi.name" . }} app.kubernetes.io/name: {{ include "unifi.name" . }}
release: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
{{ end }} {{ end }}

View File

@ -4,10 +4,10 @@ kind: Service
metadata: metadata:
name: {{ template "unifi.fullname" . }} name: {{ template "unifi.fullname" . }}
labels: labels:
app: {{ template "unifi.name" . }} app.kubernetes.io/name: {{ include "unifi.name" . }}
chart: {{ template "unifi.chart" . }} helm.sh/chart: {{ include "unifi.chart" . }}
release: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
heritage: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.unifiedService.labels }} {{- if .Values.unifiedService.labels }}
{{ toYaml .Values.unifiedService.labels | indent 4 }} {{ toYaml .Values.unifiedService.labels | indent 4 }}
{{- end }} {{- end }}
@ -70,7 +70,7 @@ spec:
nodePort: {{.Values.guiService.nodePort}} nodePort: {{.Values.guiService.nodePort}}
{{ end }} {{ end }}
selector: selector:
app: {{ template "unifi.name" . }} app.kubernetes.io/name: {{ include "unifi.name" . }}
release: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
{{ end }} {{ end }}

View File

@ -2,11 +2,12 @@
# This is a YAML-formatted file. # This is a YAML-formatted file.
# Declare variables to be passed into your templates. # Declare variables to be passed into your templates.
replicaCount: 1 # upgrade strategy type (e.g. Recreate or RollingUpdate)
strategyType: Recreate
image: image:
repository: jacobalberty/unifi repository: jacobalberty/unifi
tag: 5.9.29 tag: 5.10.19
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
# If enabled, the controller, discovery, GUI, and STUN services will not be # If enabled, the controller, discovery, GUI, and STUN services will not be