[homebridge] Update image (#1534)

* Update image
* Use native configMap from common library
This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2022-04-28 14:16:02 +02:00 committed by GitHub
parent 3a47a625b6
commit 9a5d3b2e2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 54 additions and 46 deletions

View File

@ -1,8 +1,8 @@
apiVersion: v2 apiVersion: v2
appVersion: 4.0.0 appVersion: "2022-04-28"
description: A lightweight NodeJS server that emulates the iOS HomeKit API description: A lightweight NodeJS server that emulates the iOS HomeKit API
name: homebridge name: homebridge
version: 4.3.1 version: 5.0.0
kubeVersion: ">=1.16.0-0" kubeVersion: ">=1.16.0-0"
keywords: keywords:
- homebridge - homebridge
@ -21,5 +21,7 @@ dependencies:
version: 4.3.0 version: 4.3.0
annotations: annotations:
artifacthub.io/changes: | artifacthub.io/changes: |
- kind: fixed - kind: changed
description: Set permissions for startup.sh to be executable description: "**BREAKING:** Moved startup script configuration to configMap.scripts key"
- kind: changed
description: Updated appVersion to 2022-04-28

View File

@ -2,17 +2,24 @@
{{- include "common.values.setup" . }} {{- include "common.values.setup" . }}
{{/* Append the configMap volume to the volumes */}} {{/* Append the configMap volume to the volumes */}}
{{- define "homebridge.configVolume" -}} {{- define "homebridge.harcodedValues" -}}
enabled: "true" {{- if .Values.configmap.scripts.enabled }}
mountPath: "/homebridge/startup.sh" {{/* merge homebridge specific annotations with podAnnotations*/}}
subPath: "startup.sh" podAnnotations:
type: "custom" configmap/checksum: "{{ .Values.configmap.scripts.data | toYaml | sha256sum }}"
volumeSpec:
configMap: {{/* Append the configMap volume to the volumes */}}
name: {{ include "common.names.fullname" . }}-config persistence:
defaultMode: 0755 scripts:
enabled: true
type: "configMap"
name: "{{ printf "%v-scripts" (include "common.names.fullname" .) }}"
mountPath: "/homebridge/startup.sh"
subPath: "startup.sh"
defaultMode: 0755
{{- end }}
{{- end -}} {{- end -}}
{{- $_ := set .Values.persistence "homebridge-config" (include "homebridge.configVolume" . | fromYaml) -}} {{- $_ := mergeOverwrite .Values (include "homebridge.harcodedValues" . | fromYaml) -}}
{{/* Render the templates */}} {{/* Render the templates */}}
{{ include "common.all" . }} {{ include "common.all" . }}

View File

@ -1,9 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.names.fullname" . }}-config
labels:
{{- include "common.labels" . | nindent 4 }}
data:
startup.sh: |
{{- .Values.config | nindent 4 }}

View File

@ -9,7 +9,8 @@ image:
# -- image repository # -- image repository
repository: ghcr.io/oznu/homebridge repository: ghcr.io/oznu/homebridge
# -- image tag # -- image tag
tag: latest@sha256:4703dca68510307587361f4312e6bad0e765e85f8986a7517e0f393d8d0e2410 # @default -- chart.appVersion
tag:
# -- image pull policy # -- image pull policy
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
@ -49,26 +50,33 @@ persistence:
enabled: false enabled: false
mountPath: /homebridge mountPath: /homebridge
# -- Custom startup.sh script to install additional packages in the container configmap:
# @default -- string scripts:
config: | # -- Enable custom homebridge startup script
#!/bin/sh enabled: false
# data:
# Docker Homebridge Custom Startup Script - oznu/homebridge # -- Custom homebridge startup script contents
# # @default -- See values.yaml
# This script can be used to customise the environment and will be executed as startup.sh: |
# the root user each time the container starts. #!/bin/sh
#
# If using this to install plugins DO NOT use the global flag (-g). #
# # Docker Homebridge Custom Startup Script - oznu/homebridge
# Example installing homebridge plugin: #
# # This script can be used to customise the environment and will be executed as
# npm install homebridge-hue # the root user each time the container starts.
# #
# Example installing packages using default image (Alpine Linux): # If using this to install plugins DO NOT use the global flag (-g).
# #
# apk add --no-cache ffmpeg ffmpeg-libs libpcap-dev # Example installing homebridge plugin:
# #
# If you're running a debian based version of this container please use apt-get to install packages. # npm install homebridge-hue
# #
# Example installing packages using default image (Alpine Linux):
#
# apk add --no-cache ffmpeg ffmpeg-libs libpcap-dev
#
# If you're running a debian based version of this container please use apt-get to install packages.
#
echo "Started successfully."