-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
308 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dependencies: | ||
- name: common | ||
repository: file://../../../common | ||
version: 1.0.0 | ||
digest: sha256:f90dc95623b075f1d9ec4c4ba12464e2e789176ce7282a3aede37222201763b6 | ||
generated: "2023-03-16T16:56:09.526562427+02:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: homebridge | ||
description: Homebridge is a lightweight NodeJS server you can run on your home network that emulates the iOS HomeKit API. | ||
annotations: | ||
title: Homebridge | ||
type: application | ||
version: 1.0.0 | ||
apiVersion: v2 | ||
appVersion: '2023-01-08' | ||
kubeVersion: '>=1.16.0-0' | ||
maintainers: | ||
- name: truenas | ||
url: https://www.truenas.com/ | ||
dependencies: | ||
- name: common | ||
repository: file://../../../common | ||
version: 1.0.0 | ||
home: https://github.com/homebridge/homebridge | ||
icon: https://raw.githubusercontent.com/homebridge/branding/master/logos/homebridge-color-round-stylized.png | ||
sources: | ||
- https://github.com/oznu/docker-homebridge | ||
- https://github.com/truenas/charts/tree/master/library/ix-dev/community/homebridge | ||
- https://github.com/homebridge/homebridge | ||
keywords: | ||
- homekit | ||
- homebridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Homebridge | ||
|
||
- This container runs as `root` user. | ||
- HostNetwork is always enabled. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Homebridge | ||
|
||
- This container runs as `root` user. | ||
- HostNetwork is always enabled. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
hbStorage: | ||
data: | ||
type: hostPath | ||
hostPath: /mnt/{{ .Release.Name }}/data | ||
|
||
hbNetwork: | ||
webPort: 38000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
icon: https://raw.githubusercontent.com/homebridge/branding/master/logos/homebridge-color-round-stylized.png | ||
categories: | ||
- homekit | ||
- homebridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
groups: | ||
- name: Homebridge Configuration | ||
description: Configure Homebridge | ||
- name: Network Configuration | ||
description: Configure Network for Homebridge | ||
- name: Storage Configuration | ||
description: Configure Storage for Homebridge | ||
- name: Resources Configuration | ||
description: Configure Resources for Homebridge | ||
|
||
questions: | ||
|
||
- variable: TZ | ||
group: Homebridge Configuration | ||
label: Timezone | ||
schema: | ||
type: string | ||
default: Etc/UTC | ||
required: true | ||
$ref: | ||
- definitions/timezone | ||
|
||
- variable: hbConfig | ||
label: "" | ||
group: Homebridge Configuration | ||
schema: | ||
type: dict | ||
attrs: | ||
- variable: enableAvahi | ||
label: Enable Avahi | ||
description: Enable Avahi for Homebridge. | ||
schema: | ||
type: boolean | ||
default: true | ||
- variable: additionalEnvs | ||
label: Additional Environment Variables | ||
description: Configure additional environment variables for Homebridge. | ||
schema: | ||
type: list | ||
default: [] | ||
items: | ||
- variable: env | ||
label: Environment Variable | ||
schema: | ||
type: dict | ||
attrs: | ||
- variable: name | ||
label: Name | ||
schema: | ||
type: string | ||
required: true | ||
- variable: value | ||
label: Value | ||
schema: | ||
type: string | ||
required: true | ||
|
||
- variable: hbNetwork | ||
group: Network Configuration | ||
label: "" | ||
schema: | ||
type: dict | ||
attrs: | ||
- variable: webPort | ||
label: Web UI Port | ||
schema: | ||
type: int | ||
min: 9000 | ||
max: 65535 | ||
required: true | ||
default: 30000 | ||
|
||
- variable: hbStorage | ||
group: Storage Configuration | ||
label: "" | ||
schema: | ||
type: dict | ||
attrs: | ||
- variable: data | ||
label: Data | ||
schema: | ||
type: dict | ||
attrs: | ||
- variable: type | ||
label: Type | ||
schema: | ||
type: string | ||
default: ixVolume | ||
required: true | ||
enum: | ||
- value: ixVolume | ||
description: ixVolume | ||
- value: hostPath | ||
description: hostPath | ||
- variable: hostPath | ||
label: Host Path | ||
schema: | ||
type: hostpath | ||
show_if: [["type", "=", "hostPath"]] | ||
default: "" | ||
- variable: datasetName | ||
label: Dataset Name | ||
schema: | ||
type: string | ||
default: data | ||
show_if: [["type", "=", "ixVolume"]] | ||
hidden: true | ||
$ref: | ||
- "normalize/ixVolume" | ||
|
||
- variable: resources | ||
label: "" | ||
group: Resources Configuration | ||
schema: | ||
type: dict | ||
attrs: | ||
- variable: limits | ||
label: Limits | ||
schema: | ||
type: dict | ||
attrs: | ||
- variable: cpu | ||
label: CPU | ||
description: CPU limit for qBittorrent. | ||
schema: | ||
type: string | ||
default: 4000m | ||
required: true | ||
- variable: memory | ||
label: Memory | ||
description: Memory limit for qBittorrent. | ||
schema: | ||
type: string | ||
default: 8Gi | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{ include "ix.v1.common.lib.chart.notes" $ }} |
79 changes: 79 additions & 0 deletions
79
library/ix-dev/community/homebridge/templates/_homebridge.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{{- define "homebridge.workload" -}} | ||
workload: | ||
homebridge: | ||
enabled: true | ||
primary: true | ||
type: Deployment | ||
podSpec: | ||
hostNetwork: true | ||
containers: | ||
homebridge: | ||
enabled: true | ||
primary: true | ||
imageSelector: image | ||
securityContext: | ||
runAsUser: 0 | ||
runAsGroup: 0 | ||
runAsNonRoot: false | ||
readOnlyRootFilesystem: false | ||
capabilities: | ||
add: | ||
- SETGID | ||
- SETUID | ||
drop: | ||
- NET_ADMIN | ||
- NET_RAW | ||
- CHOWN | ||
# - DAC_OVERRIDE | ||
env: | ||
HOMEBRIDGE_CONFIG_UI_PORT: {{ .Values.hbNetwork.webPort }} | ||
ENABLE_AVAHI: {{ ternary "1" "0" .Values.hbConfig.enableAvahi | quote }} | ||
{{ with .Values.hbConfig.additionalEnvs }} | ||
{{ range $env := . }} | ||
{{ $env.name }}: {{ $env.value }} | ||
{{ end }} | ||
{{ end }} | ||
probes: | ||
liveness: | ||
enabled: true | ||
type: http | ||
port: {{ .Values.hbNetwork.webPort }} | ||
path: / | ||
readiness: | ||
enabled: true | ||
type: http | ||
port: {{ .Values.hbNetwork.webPort }} | ||
path: / | ||
startup: | ||
enabled: true | ||
type: http | ||
port: {{ .Values.hbNetwork.webPort }} | ||
path: / | ||
|
||
{{/* Service */}} | ||
service: | ||
homebridge: | ||
enabled: true | ||
primary: true | ||
type: NodePort | ||
targetSelector: homebridge | ||
ports: | ||
homebridge: | ||
enabled: true | ||
primary: true | ||
port: {{ .Values.hbNetwork.webPort }} | ||
nodePort: {{ .Values.hbNetwork.webPort }} | ||
targetSelector: homebridge | ||
|
||
{{/* Persistence */}} | ||
persistence: | ||
data: | ||
enabled: true | ||
type: {{ .Values.hbStorage.data.type }} | ||
datasetName: {{ .Values.hbStorage.data.datasetName | default "" }} | ||
hostPath: {{ .Values.hbStorage.data.hostPath | default "" }} | ||
targetSelector: | ||
homebridge: | ||
homebridge: | ||
mountPath: /homebridge | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{{- define "homebridge.portal" -}} | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: portal | ||
data: | ||
path: "/" | ||
port: {{ .Values.hbNetwork.webPort | quote }} | ||
protocol: http | ||
host: $node_ip | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{{- include "ix.v1.common.loader.init" . -}} | ||
|
||
{{/* Merge the templates with Values */}} | ||
{{- $_ := mustMergeOverwrite .Values (include "homebridge.workload" $ | fromYaml) -}} | ||
|
||
{{/* Create the configmap for portal manually*/}} | ||
{{- include "homebridge.portal" $ -}} | ||
|
||
{{- include "ix.v1.common.loader.apply" . -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
image: | ||
repository: oznu/homebridge | ||
tag: "2023-01-08" | ||
pullPolicy: IfNotPresent | ||
|
||
resources: | ||
limits: | ||
cpu: 4000m | ||
memory: 8Gi | ||
|
||
hbStorage: | ||
data: | ||
type: ixVolume | ||
hostPath: "" | ||
datasetName: data | ||
|
||
hbNetwork: | ||
webPort: 30000 | ||
|
||
hbConfig: | ||
enableAvahi: true | ||
additionalEnvs: [] |