[homebridge] Migrate to common v3 (#1005)

* [homebridge] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [homebridge] Update to latest common

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2021-06-16 21:20:19 +02:00 committed by GitHub
parent 690639ef33
commit 866512eef0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 68 additions and 63 deletions

View File

@ -1,8 +1,8 @@
apiVersion: v2
appVersion: 3.3.0
appVersion: 4.0.0
description: A lightweight NodeJS server that emulates the iOS HomeKit API
name: homebridge
version: 2.1.0
version: 3.0.0
kubeVersion: ">=1.16.0-0"
keywords:
- homebridge
@ -18,4 +18,4 @@ maintainers:
dependencies:
- name: common
repository: https://library-charts.k8s-at-home.com
version: 2.5.0
version: 3.1.1

View File

@ -1,6 +1,6 @@
# homebridge
![Version: 2.1.0](https://img.shields.io/badge/Version-2.1.0-informational?style=flat-square) ![AppVersion: 3.3.0](https://img.shields.io/badge/AppVersion-3.3.0-informational?style=flat-square)
![Version: 3.0.0](https://img.shields.io/badge/Version-3.0.0-informational?style=flat-square) ![AppVersion: 4.0.0](https://img.shields.io/badge/AppVersion-4.0.0-informational?style=flat-square)
A lightweight NodeJS server that emulates the iOS HomeKit API
@ -19,7 +19,7 @@ Kubernetes: `>=1.16.0-0`
| Repository | Name | Version |
|------------|------|---------|
| https://library-charts.k8s-at-home.com | common | 2.5.0 |
| https://library-charts.k8s-at-home.com | common | 3.1.1 |
## TL;DR
@ -77,17 +77,18 @@ N/A
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| config | string | string | Custom startup.sh script to install additional packages in the container |
| env.HOMEBRIDGE_CONFIG_UI | int | `1` | |
| env.HOMEBRIDGE_CONFIG_UI_PORT | int | `8581` | |
| env | object | See below | environment variables. See [image docs](https://github.com/oznu/docker-homebridge#parameters) for more details. |
| env.HOMEBRIDGE_CONFIG_UI | int | `1` | Enable the Homebridge UI |
| env.PGID | string | `"1000"` | Specify the group ID the application will run as |
| env.PUID | string | `"1000"` | Specify the user ID the application will run as |
| env.TZ | string | `"UTC"` | Set the container timezone |
| hostNetwork | bool | `false` | Enable hostNetwork - needed for discovery to work |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"oznu/homebridge"` | |
| image.tag | string | `"3.3.0"` | |
| ingress.enabled | bool | `false` | |
| persistence.config.emptyDir.enabled | bool | `false` | |
| persistence.config.enabled | bool | `false` | |
| persistence.config.mountPath | string | `"/homebridge"` | |
| service.port.port | int | `8581` | |
| image.pullPolicy | string | `"IfNotPresent"` | image pull policy |
| image.repository | string | `"oznu/homebridge"` | image repository |
| image.tag | string | `"4.0.0"` | image tag |
| ingress.main | object | See values.yaml | Enable and configure ingress settings for the chart under this key. |
| persistence | object | See values.yaml | Configure persistence settings for the chart under this key. |
| service | object | See values.yaml | Configures service settings for the chart. |
## Changelog
@ -95,6 +96,14 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [3.0.0]
#### Changed
- **BREAKING**: Upgraded the common library dependency to version 3.1.1. This introduces several breaking changes (`service`, `ingress` and `persistence` keys have been refactored).
Be sure to check out the [library chart](https://github.com/k8s-at-home/library-charts/blob/common-3.1.1/charts/stable/common/) for the up-to-date values.
- Changed image tag to `4.0.0`.
### [2.0.0]
#### Added

View File

@ -9,6 +9,14 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [3.0.0]
#### Changed
- **BREAKING**: Upgraded the common library dependency to version 3.1.1. This introduces several breaking changes (`service`, `ingress` and `persistence` keys have been refactored).
Be sure to check out the [library chart](https://github.com/k8s-at-home/library-charts/blob/common-3.1.1/charts/stable/common/) for the up-to-date values.
- Changed image tag to `4.0.0`.
### [2.0.0]
#### Added

View File

@ -1,31 +1,17 @@
{{/* Make sure all variables are set properly */}}
{{- include "common.values.setup" . }}
{{/* Append the configMap to the additionalVolumes */}}
{{- define "homebridge.configmap.volume" -}}
name: homebridge-config
configMap:
name: {{ template "common.names.fullname" . }}-config
{{- end -}}
{{- $volume := include "homebridge.configmap.volume" . | fromYaml -}}
{{- if $volume -}}
{{- $additionalVolumes := append .Values.additionalVolumes $volume }}
{{- $_ := set .Values "additionalVolumes" (deepCopy $additionalVolumes) -}}
{{- end -}}
{{/* Append the configMap volume to the additionalVolumeMounts */}}
{{- define "homebridge.configmap.volumeMount" -}}
name: homebridge-config
mountPath: /homebridge/startup.sh
subPath: startup.sh
{{- end -}}
{{- $volumeMount := include "homebridge.configmap.volumeMount" . | fromYaml -}}
{{- if $volumeMount -}}
{{- $additionalVolumeMounts := append .Values.additionalVolumeMounts $volumeMount }}
{{- $_ := set .Values "additionalVolumeMounts" (deepCopy $additionalVolumeMounts) -}}
{{/* Append the configMap volume to the volumes */}}
{{- define "homebridge.configVolume" -}}
enabled: "true"
mountPath: "/homebridge/startup.sh"
subPath: "startup.sh"
type: "custom"
volumeSpec:
configMap:
name: {{ include "common.names.fullname" . }}-config
{{- end -}}
{{- $_ := set .Values.persistence "homebridge-config" (include "homebridge.configVolume" . | fromYaml) -}}
{{/* Render the templates */}}
{{ include "common.all" . }}

View File

@ -1,7 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "common.names.fullname" . }}-config
name: {{ include "common.names.fullname" . }}-config
labels:
{{- include "common.labels" . | nindent 4 }}
data:

View File

@ -6,46 +6,48 @@
#
image:
# -- image repository
repository: oznu/homebridge
tag: 3.3.0
# -- image tag
tag: 4.0.0
# -- image pull policy
pullPolicy: IfNotPresent
# Possible values listed here: https://github.com/oznu/docker-homebridge#parameters
# -- environment variables. See [image docs](https://github.com/oznu/docker-homebridge#parameters) for more details.
# @default -- See below
env:
# -- Set the container timezone
TZ: UTC
# -- Specify the user ID the application will run as
PUID: "1000"
# -- Specify the group ID the application will run as
PGID: "1000"
# -- Enable the Homebridge UI
HOMEBRIDGE_CONFIG_UI: 1
HOMEBRIDGE_CONFIG_UI_PORT: 8581
# TZ:
# PGID: 1000
# PUID: 1000
# -- Configures service settings for the chart.
# @default -- See values.yaml
service:
port:
port: 8581
main:
ports:
http:
port: 8581
# -- Enable hostNetwork - needed for discovery to work
hostNetwork: false
ingress:
enabled: false
# -- Enable and configure ingress settings for the chart under this key.
# @default -- See values.yaml
main:
enabled: false
# -- Configure persistence settings for the chart under this key.
# @default -- See values.yaml
persistence:
config:
enabled: false
emptyDir:
enabled: false
mountPath: /homebridge
## Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
# storageClass: "-"
# accessMode: ReadWriteOnce
# size: 1Gi
## Do not delete the pvc upon helm uninstall
# skipuninstall: false
# existingClaim: ""
# -- Custom startup.sh script to install additional packages in the container
# @default -- string