Compare commits

...

5 Commits

Author SHA1 Message Date
mr-onion-2
a21912cc84 [Deconz] - Add option for a persistence.subpath (#160)
Co-authored-by: Mike Knell <mike.knell@lifecycle-software.com>
2020-11-15 10:42:44 -05:00
coldfire84
ae45a4f962 Add support for hostAliases (#154)
Co-authored-by: Jeff Billimek <jeff@billimek.com>
2020-11-14 15:10:20 -05:00
Thomas Ingvarsson
bf1772a44e [unifi] Add liveness and readiness probe configuration (#149)
* Parameterize timing of livenessProbe

* Parameterize timing of readinessProbe

* Bump version, no change in default behaviour

* Update README.md with new configuration parameters

Signed-off-by: Thomas Ingvarsson <ingvarsson.thomas@gmail.com>

Co-authored-by: Jeff Billimek <jeff@billimek.com>
2020-11-14 15:02:13 -05:00
Simon Smith
b91e6c69d7 [unifi] add speedtest service and update to 5.14.23 (#148)
* add speedtest service and update to 5.14.23

* forgot speedtest in unified service

Co-authored-by: Jeff Billimek <jeff@billimek.com>
2020-11-14 14:55:11 -05:00
coldfire84
846337f619 [node-red] add support for hostAliases (#150)
* Add startupProbe to Node-RED chart in order to address slow starting container being killed due to liveness probe failures.

* Bump node-red chart version

* Add hostAliases support for custom /etc/hosts entries

* Update description for hostAliases
2020-11-14 14:45:45 -05:00
18 changed files with 180 additions and 12 deletions

View File

@@ -1,7 +1,7 @@
apiVersion: v2
name: deconz
description: A Helm chart for deploying deCONZ
version: 2.0.0
version: 2.0.1
appVersion: 2.05.80
keywords:
- deconz

View File

@@ -79,6 +79,7 @@ Read through the [values.yaml](https://github.com/k8s-at-home/charts/blob/master
| `persistence.existingClaim` | Use an existing PVC to persist data | `nil` |
| `persistence.accessMode` | Persistence access mode | `ReadWriteOnce` |
| `persistence.size` | Size of persistent volume claim | `1Gi` |
| `persistence.subPath` | Mount a sub dir of the persistent volume | `nil` |
| `extraVolumes` | Optionally add additional Volumes | `[]` |
| `resources` | CPU/Memory resource requests/limits | `{}` |
| `nodeSelector` | Node labels for pod assignment | `{}` |

View File

@@ -77,6 +77,9 @@ spec:
{{- end }}
- name: config
mountPath: /root/.local/share/dresden-elektronik/deCONZ
{{- if .Values.persistence.subPath }}
subPath: {{ .Values.persistence.subPath }}
{{- end }}
{{- include "deconz.extraVolumeMounts" . | nindent 12 }}
{{- if .Values.probes.liveness.enabled }}
livenessProbe:

View File

@@ -79,6 +79,8 @@ persistence:
# existingClaim: deconz-data
accessMode: ReadWriteOnce
size: 1Gi
## When mounting the data volume you may specify a subPath
# subPath: /configs/deconz
# Any extra volumes to define for the pod
# Volumes will be mounted to the folder specified under mountPath

View File

@@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 0.116.1
description: Home Assistant
name: home-assistant
version: 2.6.0
version: 2.7.0
keywords:
- home-assistant
- hass

View File

@@ -68,6 +68,7 @@ The following tables lists the configurable parameters of the Home Assistant cha
| `service.publishNotReadyAddresses` | Set to true if the editors (vscode or configurator) should be reachable when home assistant does not run | `false` |
| `service.externalTrafficPolicy` | Loadbalancer externalTrafficPolicy | `` |
| `hostNetwork` | Enable hostNetwork - might be needed for discovery to work | `false` |
| `hostAliases` | Define custom entries in /etc/hosts | `[]` |
| `service.nodePort` | nodePort to listen on for the home-assistant GUI | `` |
| `ingress.enabled` | Enables Ingress | `false` |
| `ingress.annotations` | Ingress annotations | `{}` |
@@ -234,7 +235,7 @@ kubectl create secret generic git-creds --from-file=id_rsa=git/k8s_id_rsa --from
## git-crypt support
When using Git sync it is possible to specify a file called `git-crypt-key` in the secret referred to in `git.secret`. When this file is present, `git-crypt unlock` will automatically be executed after the repo has been synced.
When using Git sync it is possible to specify a file called `git-crypt-key` in the secret referred to in `git.secret`. When this file is present, `git-crypt unlock` will automatically be executed after the repo has been synced.
**Note:** `git-crypt` is not installed by default in the other images! If you wish to push changes from the VS Code or Configurator containers, you will have to make sure that it is installed.

View File

@@ -37,6 +37,10 @@ spec:
{{- if .Values.hostNetwork }}
hostNetwork: {{ .Values.hostNetwork }}
dnsPolicy: ClusterFirstWithHostNet
{{- end }}
{{- if .Values.hostAliases }}
hostAliases:
{{ toYaml .Values.hostAliases | indent 8 }}
{{- end }}
initContainers:
{{- if .Values.git.enabled }}
@@ -56,7 +60,7 @@ spec:
then
git -C "{{ .Values.git.syncPath }}" pull || true;
else
if [ "$(ls -A {{ .Values.git.syncPath }})" ];
if [ "$(ls -A {{ .Values.git.syncPath }})" ];
then
git clone --depth 2 "{{ .Values.git.repo }}" /tmp/repo;
cp -rf /tmp/repo/.git "{{ .Values.git.syncPath }}";

View File

@@ -65,6 +65,14 @@ ingress:
hostNetwork: false
hostAliases: []
# Use hostAliases to add custom entries to /etc/hosts - mapping IP addresses to hostnames.
# ref: https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
# - ip: "192.168.1.100"
# hostnames:
# - "example.com"
# - "www.example.com"
persistence:
enabled: true
## home-assistant data Persistent Volume Storage Class

View File

@@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 1.0.6-12
description: Node-RED is low-code programming for event-driven applications
name: node-red
version: 3.2.0
version: 3.3.0
keywords:
- nodered
- node-red

View File

@@ -88,6 +88,7 @@ The following tables lists the configurable parameters of the Node-RED chart and
| `affinity` | Affinity settings for pod assignment | `{}` |
| `podAnnotations` | Key-value pairs to add as pod annotations | `{}` |
| `deploymentAnnotations` | Key-value pairs to add as deployment annotations | `{}` |
| `hostAliases` | Specify /etc/hosts entries | `[]` |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,

View File

@@ -100,6 +100,10 @@ spec:
{{- else }}
emptyDir: {}
{{ end }}
{{- if .Values.hostAliases }}
hostAliases:
{{ toYaml .Values.hostAliases | indent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}

View File

@@ -69,6 +69,14 @@ service:
## Set the externalTrafficPolicy in the Service to either Cluster or Local
# externalTrafficPolicy: Cluster
hostAliases: []
# Use hostAliases to add custom entries to /etc/hosts - mapping IP addresses to hostnames.
# ref: https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
# - ip: "192.168.1.100"
# hostnames:
# - "example.com"
# - "www.example.com"
ingress:
enabled: false
annotations: {}

View File

@@ -1,8 +1,8 @@
apiVersion: v2
appVersion: 5.12.35
appVersion: 5.14.23
description: Ubiquiti Network's Unifi Controller
name: unifi
version: 1.1.0
version: 1.2.0
keywords:
- ubiquiti
- unifi

View File

@@ -34,7 +34,7 @@ The following tables lists the configurable parameters of the Unifi chart and th
| Parameter | Default | Description |
|-------------------------------------------------|------------------------------|------------------------------------------------------------------------------------------------------------------------|
| `image.repository` | `jacobalberty/unifi` | Image repository |
| `image.tag` | `5.12.35` | Image tag. Possible values listed [here][docker]. |
| `image.tag` | `5.14.23` | Image tag. Possible values listed [here][docker]. |
| `image.pullPolicy` | `IfNotPresent` | Image pull policy |
| `strategyType` | `Recreate` | Specifies the strategy used to replace old Pods by new ones |
| `guiService.type` | `ClusterIP` | Kubernetes service type for the Unifi GUI |
@@ -93,7 +93,14 @@ The following tables lists the configurable parameters of the Unifi chart and th
| `syslogService.loadBalancerIP` | `{}` | Loadbalancer IP for remote syslog capture |
| `syslogService.loadBalancerSourceRanges` | None | List of IP CIDRs allowed access to load balancer (if supported) |
| `syslogService.externalTrafficPolicy` | `Cluster` | Set the externalTrafficPolicy in the Service to either Cluster or Local |
| `unifiedService.enabled` | `false` | Use a single service for GUI, controller, STUN, discovery and syslog |
| `speedtestService.type` | `ClusterIP` | Kubernetes service type for mobile speedtest |
| `speedtestService.port` | `6789` | Kubernetes UDP port for mobile speedtest |
| `speedtestService.annotations` | `{}` | Service annotations for mobile speedtest |
| `speedtestService.labels` | `{}` | Custom labels |
| `speedtestService.loadBalancerIP` | `{}` | Loadbalancer IP for mobile speedtest |
| `speedtestService.loadBalancerSourceRanges` | None | List of IP CIDRs allowed access to load balancer (if supported) |
| `speedtestService.externalTrafficPolicy` | `Cluster` | Set the externalTrafficPolicy in the Service to either Cluster or Local |
| `unifiedService.enabled` | `false` | Use a single service for GUI, controller, STUN, discovery, syslog and speedtest |
| `unifiedService.type` | `ClusterIP` | Kubernetes service type for the unified service |
| `unifiedService.annotations` | `{}` | Annotations for the unified service |
| `unifiedService.labels` | `{}` | Custom labels for the unified service |
@@ -135,6 +142,18 @@ The following tables lists the configurable parameters of the Unifi chart and th
| `extraConfigFiles` | `{}` | Dictionary containing files mounted to `/configmap` inside the pod (See [values.yaml](values.yaml) for examples) |
| `extraJvmOpts` | `[]` | List of additional JVM options, e.g. `["-Dlog4j.configurationFile=file:/configmap/log4j2.xml"]` |
| `resources` | `{}` | CPU/Memory resource requests/limits |
| `livenessProbe.enabled` | `true` | Turn on and off liveness probe |
| `livenessProbe.initialDelaySeconds` | `30` | Delay before liveness probe is initiated |
| `livenessProbe.periodSeconds` | `15` | How often to perform the probe |
| `livenessProbe.timeoutSeconds` | `5` | When the probe times out |
| `livenessProbe.failureThreshold` | `3` | Minimum consecutive failures for the probe |
| `livenessProbe.successThreshold` | `1` | Minimum consecutive successes for the probe |
| `readinessProbe.enabled` | `true` | Turn on and off readiness probe |
| `readinessProbe.initialDelaySeconds` | `30` | Delay before readiness probe is initiated |
| `readinessProbe.periodSeconds` | `15` | How often to perform the probe |
| `readinessProbe.timeoutSeconds` | `5` | When the probe times out |
| `readinessProbe.failureThreshold` | `3` | Minimum consecutive failures for the probe |
| `readinessProbe.successThreshold` | `1` | Minimum consecutive successes for the probe |
| `nodeSelector` | `{}` | Node labels for pod assignment |
| `tolerations` | `[]` | Toleration labels for pod assignment |
| `affinity` | `{}` | Affinity settings for pod assignment |
@@ -178,6 +197,8 @@ Read through the [values.yaml](values.yaml) file. It has several commented out s
- `syslogService`: Used to capture syslog from Unifi devices if the feature is
enabled in the site configuration. This needs to be reachable by Unifi devices
on port 5514/UDP.
- `speedtestService`: Used for mobile speedtest inside the UniFi Mobile app.
This needs to be reachable by clients connecting to port 6789/TCP.
## Ingress and HTTPS

View File

@@ -75,6 +75,9 @@ spec:
- name: captive-https
containerPort: 8843
protocol: TCP
- name: speedtest
containerPort: 6789
protocol: TCP
{{ end }}
{{- if not .Values.runAsRoot }}
securityContext:
@@ -82,18 +85,30 @@ spec:
add:
- SETFCAP
{{- end }}
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /status
port: https-gui
scheme: HTTPS
initialDelaySeconds: 30
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
{{- end }}
{{- if .Values.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: /status
port: https-gui
scheme: HTTPS
initialDelaySeconds: 15
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
{{- end }}
env:
- name: UNIFI_HTTP_PORT
value: "{{ .Values.controllerService.port }}"

View File

@@ -0,0 +1,54 @@
{{ if not .Values.speedtestService.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ template "unifi.fullname" . }}-speedtest
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 }}
{{- if .Values.speedtestService.labels }}
{{ toYaml .Values.speedtestService.labels | indent 4 }}
{{- end }}
{{- with .Values.speedtestService.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if (or (eq .Values.speedtestService.type "ClusterIP") (empty .Values.speedtestService.type)) }}
type: ClusterIP
{{- if .Values.speedtestService.clusterIP }}
clusterIP: {{ .Values.speedtestService.clusterIP }}
{{end}}
{{- else if eq .Values.speedtestService.type "LoadBalancer" }}
type: {{ .Values.speedtestService.type }}
{{- if .Values.speedtestService.loadBalancerIP }}
loadBalancerIP: {{ .Values.speedtestService.loadBalancerIP }}
{{- end }}
{{- if .Values.speedtestService.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{ toYaml .Values.speedtestService.loadBalancerSourceRanges | indent 4 }}
{{- end -}}
{{- else }}
type: {{ .Values.speedtestService.type }}
{{- end }}
{{- if .Values.speedtestService.externalIPs }}
externalIPs:
{{ toYaml .Values.speedtestService.externalIPs | indent 4 }}
{{- end }}
{{- if .Values.speedtestService.externalTrafficPolicy }}
externalTrafficPolicy: {{ .Values.speedtestService.externalTrafficPolicy }}
{{- end }}
ports:
- port: {{ .Values.speedtestService.port }}
targetPort: speedtest
protocol: TCP
name: speedtest
{{ if (and (eq .Values.speedtestService.type "NodePort") (not (empty .Values.speedtestService.nodePort))) }}
nodePort: {{.Values.speedtestService.nodePort}}
{{ end }}
selector:
app.kubernetes.io/name: {{ include "unifi.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{ end }}

View File

@@ -90,6 +90,13 @@ spec:
targetPort: captive-https
{{ if (and (eq .Values.unifiedService.type "NodePort") (not (empty .Values.captivePortalService.https))) }}
nodePort: {{.Values.captivePortalService.https}}
{{ end }}
- port: {{ .Values.speedtestService.port }}
targetPort: speedtest
protocol: TCP
name: speedtest
{{ if (and (eq .Values.unifiedService.type "NodePort") (not (empty .Values.speedtestService.nodePort))) }}
nodePort: {{.Values.speedtestService.nodePort}}
{{ end }}
{{ end }}

View File

@@ -7,7 +7,7 @@ strategyType: Recreate
image:
repository: jacobalberty/unifi
tag: 5.12.35
tag: 5.14.23
pullPolicy: IfNotPresent
# If enabled, the controller, discovery, GUI, STUN and syslog services will not be
@@ -190,6 +190,27 @@ syslogService:
## Set the externalTrafficPolicy in the Service to either Cluster or Local
# externalTrafficPolicy: Cluster
speedtestService:
type: ClusterIP
port: 6789
## 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
ingress:
enabled: false
annotations: {}
@@ -320,6 +341,24 @@ resources: {}
# cpu: 100m
# memory: 128Mi
## Liveness and readiness probe values
## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
##
livenessProbe:
enabled: true
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 1
failureThreshold: 3
successThreshold: 1
readinessProbe:
enabled: true
initialDelaySeconds: 15
periodSeconds: 10
timeoutSeconds: 1
failureThreshold: 3
successThreshold: 1
nodeSelector: {}
tolerations: []