[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 }}
{{/* merge homebridge specific annotations with podAnnotations*/}}
podAnnotations:
configmap/checksum: "{{ .Values.configmap.scripts.data | toYaml | sha256sum }}"
{{/* Append the configMap volume to the volumes */}}
persistence:
scripts:
enabled: true
type: "configMap"
name: "{{ printf "%v-scripts" (include "common.names.fullname" .) }}"
mountPath: "/homebridge/startup.sh" mountPath: "/homebridge/startup.sh"
subPath: "startup.sh" subPath: "startup.sh"
type: "custom"
volumeSpec:
configMap:
name: {{ include "common.names.fullname" . }}-config
defaultMode: 0755 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,9 +50,15 @@ 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
enabled: false
data:
# -- Custom homebridge startup script contents
# @default -- See values.yaml
startup.sh: |
#!/bin/sh #!/bin/sh
# #
@ -72,3 +79,4 @@ config: |
# #
# If you're running a debian based version of this container please use apt-get to install packages. # If you're running a debian based version of this container please use apt-get to install packages.
# #
echo "Started successfully."