mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-01-24 07:59:02 +00:00
[homebridge] migrate to common (#811)
This commit is contained in:
parent
447b92702c
commit
4d2332b8ca
@ -14,10 +14,13 @@
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
# OWNERS file for Kubernetes
|
||||
OWNERS
|
||||
# helm-docs templates
|
||||
*.gotmpl
|
||||
|
@ -1,17 +1,21 @@
|
||||
apiVersion: v2
|
||||
appVersion: 3.1.0
|
||||
version: 1.0.5
|
||||
name: homebridge
|
||||
appVersion: 3.3.0
|
||||
description: A lightweight NodeJS server that emulates the iOS HomeKit API
|
||||
type: application
|
||||
name: homebridge
|
||||
version: 2.0.0
|
||||
kubeVersion: ">=1.16.0-0"
|
||||
keywords:
|
||||
- homebridge
|
||||
- homekit
|
||||
- homebridge
|
||||
- homekit
|
||||
home: https://github.com/k8s-at-home/charts/tree/master/charts/stable/homebridge
|
||||
icon: https://avatars0.githubusercontent.com/u/38217527?s=400&v=4?sanitize=true
|
||||
sources:
|
||||
- https://homebridge.io/
|
||||
- https://github.com/oznu/docker-homebridge
|
||||
- https://homebridge.io/
|
||||
- https://github.com/oznu/docker-homebridge
|
||||
maintainers:
|
||||
- name: bjw-s
|
||||
- name: bjw-s
|
||||
email: bjw-s@users.noreply.github.com
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: https://library-charts.k8s-at-home.com
|
||||
version: 2.3.1
|
||||
|
@ -1,6 +1,6 @@
|
||||
# homebridge
|
||||
|
||||
![Version: 1.0.5](https://img.shields.io/badge/Version-1.0.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.1.0](https://img.shields.io/badge/AppVersion-3.1.0-informational?style=flat-square)
|
||||
![Version: 2.0.0](https://img.shields.io/badge/Version-2.0.0-informational?style=flat-square) ![AppVersion: 3.3.0](https://img.shields.io/badge/AppVersion-3.3.0-informational?style=flat-square)
|
||||
|
||||
A lightweight NodeJS server that emulates the iOS HomeKit API
|
||||
|
||||
@ -13,10 +13,13 @@ A lightweight NodeJS server that emulates the iOS HomeKit API
|
||||
|
||||
## Requirements
|
||||
|
||||
Kubernetes: `>=1.16.0-0`
|
||||
|
||||
## Dependencies
|
||||
|
||||
| Repository | Name | Version |
|
||||
|------------|------|---------|
|
||||
| https://library-charts.k8s-at-home.com | common | 2.3.1 |
|
||||
|
||||
## TL;DR
|
||||
|
||||
@ -73,64 +76,18 @@ N/A
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
|-----|------|---------|-------------|
|
||||
| affinity | object | `{}` | Affinity settings for pod assignment or the homebridge GUI |
|
||||
| config.additionalPackages | list | `[]` | Additional Alpine packages to install at container statup such as `bash` |
|
||||
| config.enableUI | bool | `true` | Enable the Homebridge UI plugin |
|
||||
| config.plugins | list | `[]` | Additional Homebridge plugins to install at container startup such as `homebridge-hue` |
|
||||
| extraEnvs | list | `[]` | Extra ENV vars to pass to the homebridge container |
|
||||
| fullnameOverride | string | `""` | |
|
||||
| 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` | |
|
||||
| hostNetwork | bool | `false` | Enable hostNetwork - needed for discovery to work |
|
||||
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
|
||||
| image.repository | string | `"oznu/homebridge"` | Image repository |
|
||||
| image.tag | string | `"3.1.0"` | Overrides the image tag whose default is the chart appVersion. Possible values listed [here](https://hub.docker.com/r/oznu/homebridge/tags) |
|
||||
| imagePullSecrets | list | `[]` | Secrets to use when pulling the image |
|
||||
| ingress.annotations | object | `{}` | Ingress annotations |
|
||||
| ingress.enabled | bool | `false` | Enables Ingress |
|
||||
| ingress.hosts | list | `["chart-example.local"]` | Ingress accepted hostnames |
|
||||
| ingress.path | string | `"/"` | Ingress path |
|
||||
| ingress.tls | list | `[]` | Ingress TLS configuration |
|
||||
| nameOverride | string | `""` | |
|
||||
| nodeSelector | object | `{}` | Node labels for pod assignment or the homebridge GUI |
|
||||
| persistence.accessMode | string | `"ReadWriteOnce"` | Persistence access modes |
|
||||
| persistence.enabled | bool | `true` | Use persistent volume to store data |
|
||||
| persistence.existingClaim | string | `nil` | Use an existing PVC to persist data |
|
||||
| persistence.size | string | `"1Gi"` | Size of persistent volume claim |
|
||||
| persistence.skipuninstall | bool | `false` | Do not delete the pvc upon helm uninstall |
|
||||
| persistence.storageClass | string | `nil` | Type of persistent volume claim |
|
||||
| pgid | int | `1000` | process groupID the instance should run as |
|
||||
| podAnnotations | object | `{}` | Key-value pairs to add as pod annotations |
|
||||
| podSecurityContext | object | `{}` | |
|
||||
| probes.liveness.enabled | bool | `true` | Use the livenessProbe? |
|
||||
| probes.liveness.failureThreshold | int | `5` | Specify liveness `failureThreshold` parameter for the deployment |
|
||||
| probes.liveness.initialDelaySeconds | int | `60` | Specify liveness `initialDelaySeconds` parameter for the deployment |
|
||||
| probes.liveness.timeoutSeconds | int | `10` | Specify liveness `timeoutSeconds` parameter for the deployment |
|
||||
| probes.readiness.enabled | bool | `true` | Use the readinessProbe? |
|
||||
| probes.readiness.failureThreshold | int | `5` | Specify readiness `failureThreshold` parameter for the deployment |
|
||||
| probes.readiness.initialDelaySeconds | int | `60` | Specify readiness `initialDelaySeconds` parameter for the deployment |
|
||||
| probes.readiness.timeoutSeconds | int | `10` | Specify readiness `timeoutSeconds` parameter for the deployment |
|
||||
| probes.startup.enabled | bool | `false` | Use the startupProbe? (new in kubernetes 1.16) |
|
||||
| probes.startup.failureThreshold | int | `30` | Specify startup `failureThreshold` parameter for the deployment |
|
||||
| probes.startup.periodSeconds | int | `10` | Specify startup `periodSeconds` parameter for the deployment |
|
||||
| puid | int | `1000` | process userID the instance should run as |
|
||||
| replicaCount | int | `1` | |
|
||||
| resources | object | `{}` | CPU/Memory resource requests/limits or the homebridge GUI |
|
||||
| securityContext | object | `{}` | |
|
||||
| service.annotations | object | `{}` | Service annotations for the homebridge GUI |
|
||||
| service.clusterIP | string | `nil` | Cluster IP for the homebridge GUI |
|
||||
| service.externalIPs | string | `nil` | External IPs for the homebridge GUI |
|
||||
| service.externalTrafficPolicy | string | `nil` | Loadbalancer externalTrafficPolicy |
|
||||
| service.homebridgePort | int | `51826` | |
|
||||
| service.httpPort | int | `8080` | Kubernetes port where the homebridge GUI is exposed |
|
||||
| service.loadBalancerIP | string | `nil` | Loadbalancer IP for the homebridge GUI |
|
||||
| service.loadBalancerSourceRanges | string | `nil` | Loadbalancer client IP restriction range for the homebridge GUI |
|
||||
| service.nodePort | int | `nil` | nodePort to listen on for the homebridge GUI |
|
||||
| service.type | string | `"ClusterIP"` | Kubernetes service type for the homebridge GUI |
|
||||
| serviceAccount.annotations | object | `{}` | |
|
||||
| serviceAccount.create | bool | `true` | |
|
||||
| serviceAccount.name | string | `""` | |
|
||||
| strategyType | string | `"Recreate"` | Specifies the strategy used to replace old Pods by new ones |
|
||||
| timezone | string | `"UTC"` | Specify the container timezone |
|
||||
| tolerations | list | `[]` | Toleration labels for pod assignment or the homebridge GUI |
|
||||
| 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` | |
|
||||
|
||||
## Changelog
|
||||
|
||||
@ -138,7 +95,7 @@ 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).
|
||||
|
||||
### [1.0.3]
|
||||
### [2.0.0]
|
||||
|
||||
#### Added
|
||||
|
||||
@ -146,13 +103,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
|
||||
#### Changed
|
||||
|
||||
- Use helm-docs
|
||||
- **BREAKING** Migrate to the common library, a lot of configuration has changed.
|
||||
|
||||
#### Removed
|
||||
|
||||
- N/A
|
||||
|
||||
[1.0.3]: #1.0.3
|
||||
[2.0.0]: #2.0.0
|
||||
|
||||
## Support
|
||||
|
||||
|
@ -9,7 +9,7 @@ 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).
|
||||
|
||||
### [1.0.3]
|
||||
### [2.0.0]
|
||||
|
||||
#### Added
|
||||
|
||||
@ -17,11 +17,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
|
||||
#### Changed
|
||||
|
||||
- Use helm-docs
|
||||
- **BREAKING** Migrate to the common library, a lot of configuration has changed.
|
||||
|
||||
#### Removed
|
||||
|
||||
- N/A
|
||||
|
||||
[1.0.3]: #1.0.3
|
||||
[2.0.0]: #2.0.0
|
||||
{{- end -}}
|
||||
|
@ -1,22 +1 @@
|
||||
{{- if .Values.config.enableUI }}
|
||||
1. Get the application URL by running these commands:
|
||||
{{- if .Values.ingress.enabled }}
|
||||
{{- $ingressPath := .Values.ingress.path -}}
|
||||
{{- range $host := .Values.ingress.hosts }}
|
||||
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host }}{{ $ingressPath }}
|
||||
{{- end }}
|
||||
{{- else if contains "NodePort" .Values.service.type }}
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "homebridge.fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
echo http://$NODE_IP:$NODE_PORT
|
||||
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "homebridge.fullname" . }}'
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "homebridge.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||
echo http://$SERVICE_IP:{{ .Values.service.httpPort }}
|
||||
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "homebridge.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:{{ .Values.service.httpPort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- include "common.notes.defaultNotes" . -}}
|
||||
|
@ -1,62 +0,0 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "homebridge.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "homebridge.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "homebridge.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "homebridge.labels" -}}
|
||||
helm.sh/chart: {{ include "homebridge.chart" . }}
|
||||
{{ include "homebridge.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "homebridge.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "homebridge.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "homebridge.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "homebridge.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
31
charts/stable/homebridge/templates/common.yaml
Normal file
31
charts/stable/homebridge/templates/common.yaml
Normal file
@ -0,0 +1,31 @@
|
||||
{{/* 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) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Render the templates */}}
|
||||
{{ include "common.all" . }}
|
@ -1,21 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "homebridge.fullname" . }}
|
||||
name: {{ template "common.names.fullname" . }}-config
|
||||
labels:
|
||||
{{ include "homebridge.labels" . | indent 4 }}
|
||||
{{- include "common.labels" . | nindent 4 }}
|
||||
data:
|
||||
startup.sh: |
|
||||
#!/bin/sh
|
||||
|
||||
# Docker Homebridge startup.sh overriden by Helm Chart
|
||||
|
||||
# Plugins
|
||||
{{- range .Values.config.plugins }}
|
||||
npm install {{ . }}
|
||||
{{- end }}
|
||||
|
||||
# Packages
|
||||
{{- range .Values.config.additionalPackages }}
|
||||
apk add --no-cache {{ . }}
|
||||
{{- end }}
|
||||
{{- .Values.config | nindent 4 }}
|
||||
|
@ -1,136 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "homebridge.fullname" . }}
|
||||
labels:
|
||||
{{- include "homebridge.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
strategy:
|
||||
type: {{ .Values.strategyType }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "homebridge.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "homebridge.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "homebridge.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
{{- if .Values.hostNetwork }}
|
||||
hostNetwork: {{ .Values.hostNetwork }}
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
env:
|
||||
{{- if .Values.timezone }}
|
||||
- name: TZ
|
||||
value: {{ .Values.timezone | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.puid }}
|
||||
- name: PUID
|
||||
value: "{{ .Values.puid }}"
|
||||
{{- end }}
|
||||
{{- if .Values.pgid }}
|
||||
- name: PGID
|
||||
value: "{{ .Values.pgid }}"
|
||||
{{- end }}
|
||||
{{- if .Values.config.enableUI }}
|
||||
- name: HOMEBRIDGE_CONFIG_UI
|
||||
value: "1"
|
||||
- name: HOMEBRIDGE_CONFIG_UI_PORT
|
||||
value: {{ .Values.service.httpPort | quote }}
|
||||
{{- end }}
|
||||
{{- with .Values.extraEnvs }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: homebridge
|
||||
containerPort: {{ .Values.service.homebridgePort }}
|
||||
protocol: TCP
|
||||
{{- if .Values.config.enableUI }}
|
||||
- name: http
|
||||
containerPort: {{ .Values.service.httpPort }}
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- mountPath: /homebridge
|
||||
name: config
|
||||
- mountPath: /homebridge/startup.sh
|
||||
name: homebridge-configmap
|
||||
subPath: startup.sh
|
||||
{{- if .Values.config.enableUI }}
|
||||
{{- if .Values.probes.liveness.enabled }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
|
||||
failureThreshold: {{ .Values.probes.liveness.failureThreshold }}
|
||||
timeoutSeconds: {{ .Values.probes.liveness.timeoutSeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.probes.readiness.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
|
||||
failureThreshold: {{ .Values.probes.readiness.failureThreshold }}
|
||||
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.probes.startup.enabled }}
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
failureThreshold: {{ .Values.probes.startup.failureThreshold }}
|
||||
periodSeconds: {{ .Values.probes.startup.periodSeconds }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
volumes:
|
||||
- name: config
|
||||
{{- if .Values.persistence.enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "homebridge.fullname" . }}-config{{- end }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
- name: homebridge-configmap
|
||||
projected:
|
||||
defaultMode: 0444
|
||||
sources:
|
||||
- configMap:
|
||||
name: {{ template "homebridge.fullname" . }}
|
||||
items:
|
||||
- key: startup.sh
|
||||
path: startup.sh
|
||||
mode: 0755
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
@ -1,39 +0,0 @@
|
||||
{{- if and .Values.config.enableUI .Values.ingress.enabled -}}
|
||||
{{- $fullName := include "homebridge.fullname" . -}}
|
||||
{{- $ingressPath := .Values.ingress.path -}}
|
||||
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
{{- else -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
labels:
|
||||
{{- include "homebridge.labels" . | nindent 4 }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{- range .Values.ingress.tls }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ . | quote }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ $ingressPath }}
|
||||
backend:
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: http
|
||||
{{- end }}
|
||||
{{- end }}
|
@ -1,25 +0,0 @@
|
||||
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ template "homebridge.fullname" . }}-config
|
||||
{{- if .Values.persistence.skipuninstall }}
|
||||
annotations:
|
||||
"helm.sh/resource-policy": keep
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "homebridge.labels" . | nindent 4 }}
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ .Values.persistence.accessMode | quote }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size | quote }}
|
||||
{{- if .Values.persistence.storageClass }}
|
||||
{{- if (eq "-" .Values.persistence.storageClass) }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
storageClassName: {{ .Values.persistence.storageClass | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
@ -1,48 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "homebridge.fullname" . }}
|
||||
{{- if .Values.service.annotations }}
|
||||
annotations:
|
||||
{{- toYaml .Values.service.annotations | nindent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "homebridge.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if (or (eq .Values.service.type "ClusterIP") (empty .Values.service.type)) }}
|
||||
type: ClusterIP
|
||||
{{- else if eq .Values.service.type "LoadBalancer" }}
|
||||
type: {{ .Values.service.type }}
|
||||
{{- if .Values.service.loadBalancerIP }}
|
||||
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
{{- if .Values.service.loadBalancerSourceRanges }}
|
||||
loadBalancerSourceRanges:
|
||||
{{ toYaml .Values.service.loadBalancerSourceRanges | indent 4 }}
|
||||
{{- end -}}
|
||||
{{- else }}
|
||||
type: {{ .Values.service.type }}
|
||||
{{- end }}
|
||||
{{- if .Values.service.externalIPs }}
|
||||
externalIPs:
|
||||
{{- toYaml .Values.service.externalIPs | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.service.externalTrafficPolicy }}
|
||||
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- port: {{ .Values.service.homebridgePort }}
|
||||
targetPort: homebridge
|
||||
protocol: TCP
|
||||
name: homebridge
|
||||
{{- if .Values.config.enableUI }}
|
||||
- port: {{ .Values.service.httpPort }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
{{- end }}
|
||||
{{ if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }}
|
||||
nodePort: {{.Values.service.nodePort}}
|
||||
{{ end }}
|
||||
selector:
|
||||
{{- include "homebridge.selectorLabels" . | nindent 4 }}
|
@ -1,12 +0,0 @@
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "homebridge.serviceAccountName" . }}
|
||||
labels:
|
||||
{{- include "homebridge.labels" . | nindent 4 }}
|
||||
{{- with .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
@ -1,165 +1,72 @@
|
||||
# Default values for homebridge.
|
||||
|
||||
replicaCount: 1
|
||||
#
|
||||
# IMPORTANT NOTE
|
||||
#
|
||||
# This chart inherits from our common library chart. You can check the default values/options here:
|
||||
# https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml
|
||||
#
|
||||
|
||||
image:
|
||||
# -- Image repository
|
||||
repository: oznu/homebridge
|
||||
# -- Image pull policy
|
||||
tag: 3.3.0
|
||||
pullPolicy: IfNotPresent
|
||||
# -- Overrides the image tag whose default is the chart appVersion.
|
||||
# Possible values listed [here](https://hub.docker.com/r/oznu/homebridge/tags)
|
||||
tag: "3.1.0"
|
||||
|
||||
# -- Secrets to use when pulling the image
|
||||
imagePullSecrets: []
|
||||
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
# -- Specifies the strategy used to replace old Pods by new ones
|
||||
strategyType: Recreate
|
||||
|
||||
# -- Specify the container timezone
|
||||
timezone: "UTC"
|
||||
# -- process userID the instance should run as
|
||||
puid: 1000
|
||||
# -- process groupID the instance should run as
|
||||
pgid: 1000
|
||||
|
||||
config:
|
||||
# -- Enable the Homebridge UI plugin
|
||||
enableUI: true
|
||||
# -- Additional Homebridge plugins to install at container startup such as `homebridge-hue`
|
||||
plugins: []
|
||||
# -- Additional Alpine packages to install at container statup such as `bash`
|
||||
additionalPackages: []
|
||||
|
||||
# -- Extra ENV vars to pass to the homebridge container
|
||||
extraEnvs: []
|
||||
|
||||
serviceAccount:
|
||||
# Specifies whether a service account should be created
|
||||
create: true
|
||||
# Annotations to add to the service account
|
||||
annotations: {}
|
||||
# The name of the service account to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name: ""
|
||||
|
||||
# -- Key-value pairs to add as pod annotations
|
||||
podAnnotations: {}
|
||||
|
||||
podSecurityContext: {}
|
||||
# fsGroup: 2000
|
||||
|
||||
securityContext: {}
|
||||
# capabilities:
|
||||
# drop:
|
||||
# - ALL
|
||||
# readOnlyRootFilesystem: true
|
||||
# runAsNonRoot: true
|
||||
# runAsUser: 1000
|
||||
# Possible values listed here: https://github.com/oznu/docker-homebridge#parameters
|
||||
env:
|
||||
HOMEBRIDGE_CONFIG_UI: 1
|
||||
HOMEBRIDGE_CONFIG_UI_PORT: 8581
|
||||
# TZ:
|
||||
# PGID: 1000
|
||||
# PUID: 1000
|
||||
|
||||
service:
|
||||
# -- Kubernetes service type for the homebridge GUI
|
||||
type: ClusterIP
|
||||
homebridgePort: 51826
|
||||
# -- Kubernetes port where the homebridge GUI is exposed
|
||||
httpPort: 8080
|
||||
# -- Service annotations for the homebridge GUI
|
||||
annotations: {}
|
||||
# -- (string) Cluster IP for the homebridge GUI
|
||||
clusterIP:
|
||||
# -- (string) External IPs for the homebridge GUI
|
||||
externalIPs:
|
||||
# -- (string) Loadbalancer IP for the homebridge GUI
|
||||
loadBalancerIP:
|
||||
# -- (string) Loadbalancer client IP restriction range for the homebridge GUI
|
||||
loadBalancerSourceRanges:
|
||||
# -- (string) Loadbalancer externalTrafficPolicy
|
||||
externalTrafficPolicy:
|
||||
# -- (int) nodePort to listen on for the homebridge GUI
|
||||
nodePort:
|
||||
|
||||
ingress:
|
||||
# -- Enables Ingress
|
||||
enabled: false
|
||||
# -- Ingress annotations
|
||||
annotations: {}
|
||||
# -- Ingress path
|
||||
path: /
|
||||
# -- Ingress accepted hostnames
|
||||
hosts:
|
||||
- chart-example.local
|
||||
# -- Ingress TLS configuration
|
||||
tls: []
|
||||
# - secretName: chart-example-tls
|
||||
# hosts:
|
||||
# - chart-example.local
|
||||
port:
|
||||
port: 8581
|
||||
|
||||
# -- Enable hostNetwork - needed for discovery to work
|
||||
hostNetwork: false
|
||||
|
||||
persistence:
|
||||
# -- Use persistent volume to store data
|
||||
enabled: true
|
||||
# -- (string) Type of persistent volume claim
|
||||
storageClass:
|
||||
# -- (string) Use an existing PVC to persist data
|
||||
existingClaim:
|
||||
# -- Persistence access modes
|
||||
accessMode: ReadWriteOnce
|
||||
# -- Size of persistent volume claim
|
||||
size: 1Gi
|
||||
# -- Do not delete the pvc upon helm uninstall
|
||||
skipuninstall: false
|
||||
|
||||
probes:
|
||||
liveness:
|
||||
# -- Use the livenessProbe?
|
||||
enabled: true
|
||||
# -- Specify liveness `initialDelaySeconds` parameter for the deployment
|
||||
initialDelaySeconds: 60
|
||||
# -- Specify liveness `failureThreshold` parameter for the deployment
|
||||
failureThreshold: 5
|
||||
# -- Specify liveness `timeoutSeconds` parameter for the deployment
|
||||
timeoutSeconds: 10
|
||||
readiness:
|
||||
# -- Use the readinessProbe?
|
||||
enabled: true
|
||||
# -- Specify readiness `initialDelaySeconds` parameter for the deployment
|
||||
initialDelaySeconds: 60
|
||||
# -- Specify readiness `failureThreshold` parameter for the deployment
|
||||
failureThreshold: 5
|
||||
# -- Specify readiness `timeoutSeconds` parameter for the deployment
|
||||
timeoutSeconds: 10
|
||||
startup:
|
||||
# -- Use the startupProbe? (new in kubernetes 1.16)
|
||||
ingress:
|
||||
enabled: false
|
||||
# -- Specify startup `failureThreshold` parameter for the deployment
|
||||
failureThreshold: 30
|
||||
# -- Specify startup `periodSeconds` parameter for the deployment
|
||||
periodSeconds: 10
|
||||
|
||||
# -- CPU/Memory resource requests/limits or the homebridge GUI
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
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: ""
|
||||
|
||||
# -- Node labels for pod assignment or the homebridge GUI
|
||||
nodeSelector: {}
|
||||
# -- Custom startup.sh script to install additional packages in the container
|
||||
# @default -- string
|
||||
config: |
|
||||
#!/bin/sh
|
||||
|
||||
# -- Toleration labels for pod assignment or the homebridge GUI
|
||||
tolerations: []
|
||||
|
||||
# -- Affinity settings for pod assignment or the homebridge GUI
|
||||
affinity: {}
|
||||
#
|
||||
# Docker Homebridge Custom Startup Script - oznu/homebridge
|
||||
#
|
||||
# This script can be used to customise the environment and will be executed as
|
||||
# the root user each time the container starts.
|
||||
#
|
||||
# If using this to install plugins DO NOT use the global flag (-g).
|
||||
#
|
||||
# Example installing homebridge plugin:
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user