-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ (home-assistant): Release Home Assistant chart v0.0.1
- Loading branch information
Showing
9 changed files
with
364 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
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 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ | ||
# helm-docs templates | ||
*.gotmpl |
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 @@ | ||
dependencies: | ||
- name: common | ||
repository: https://bjw-s.github.io/helm-charts | ||
version: 1.3.1 | ||
- name: postgresql | ||
repository: https://charts.bitnami.com/bitnami | ||
version: 12.1.14 | ||
digest: sha256:7af4222e4b6fc98a7686d0958c1725e1a12d1027a949959a4eb089595e9be5d3 | ||
generated: "2023-02-07T00:09:33.231143-06: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,31 @@ | ||
apiVersion: v2 | ||
name: home-assistant | ||
description: Open source home automation that puts local control and privacy first. | ||
home: https://charts.gabe565.com/charts/home-assistant/ | ||
icon: https://raw.githubusercontent.com/home-assistant/assets/master/logo/logo-pretty.png | ||
type: application | ||
version: 0.0.1 | ||
# renovate image=ghcr.io/home-assistant/home-assistant | ||
appVersion: 2023.2.2 | ||
kubeVersion: ">=1.22.0-0" | ||
keywords: | ||
- home-automation | ||
- mqtt | ||
- iot | ||
- internet-of-things | ||
dependencies: | ||
- name: common | ||
repository: https://bjw-s.github.io/helm-charts | ||
version: 1.3.1 | ||
- name: postgresql | ||
version: 12.1.14 | ||
repository: https://charts.bitnami.com/bitnami | ||
condition: postgresql.enabled | ||
sources: | ||
- https://github.com/gabe565/charts/tree/main/charts/home-assistant | ||
- https://home-assistant.io | ||
- https://github.com/home-assistant/core | ||
annotations: | ||
artifacthub.io/changes: |- | ||
- kind: added | ||
description: Initial release |
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,149 @@ | ||
# home-assistant | ||
|
||
<img src="https://raw.githubusercontent.com/home-assistant/assets/master/logo/logo-pretty.png" align="right" width="92" alt="home-assistant logo" style="padding-left: 20px"> | ||
|
||
![Version: 0.0.1](https://img.shields.io/badge/Version-0.0.1-informational?style=flat) | ||
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat) | ||
![AppVersion: 2023.2.2](https://img.shields.io/badge/AppVersion-2023.2.2-informational?style=flat) | ||
|
||
Open source home automation that puts local control and privacy first. | ||
|
||
**Homepage:** <https://charts.gabe565.com/charts/home-assistant/> | ||
|
||
**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/gabe565/charts/issues/new)** | ||
|
||
## Source Code | ||
|
||
* <https://github.com/gabe565/charts/tree/main/charts/home-assistant> | ||
* <https://home-assistant.io> | ||
* <https://github.com/home-assistant/core> | ||
|
||
## Requirements | ||
|
||
Kubernetes: `>=1.22.0-0` | ||
|
||
## Dependencies | ||
|
||
| Repository | Name | Version | | ||
|------------|------|---------| | ||
| <https://bjw-s.github.io/helm-charts> | common | 1.3.1 | | ||
| <https://charts.bitnami.com/bitnami> | postgresql | 12.1.14 | | ||
|
||
## TL;DR | ||
|
||
```console | ||
helm repo add gabe565 https://charts.gabe565.com | ||
helm repo update | ||
helm install home-assistant gabe565/home-assistant | ||
``` | ||
|
||
## Installing the Chart | ||
|
||
To install the chart with the release name `home-assistant` | ||
|
||
```console | ||
helm install home-assistant gabe565/home-assistant | ||
``` | ||
|
||
## Uninstalling the Chart | ||
|
||
To uninstall the `home-assistant` deployment | ||
|
||
```console | ||
helm uninstall home-assistant | ||
``` | ||
|
||
The command removes all the Kubernetes components associated with the chart **including persistent volumes** and deletes the release. | ||
|
||
## Configuration | ||
|
||
Read through the [values.yaml](./values.yaml) file. It has several commented out suggested values. | ||
Other values may be used from the [values.yaml](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common/values.yaml) from the [bjw-s common library](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common). | ||
|
||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. | ||
|
||
```console | ||
helm install home-assistant \ | ||
--set env.TZ="America/New York" \ | ||
gabe565/home-assistant | ||
``` | ||
|
||
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. | ||
|
||
```console | ||
helm install home-assistant gabe565/home-assistant -f values.yaml | ||
``` | ||
|
||
## Custom configuration | ||
|
||
### HTTP 400 bad request while accessing from your browser | ||
|
||
When configuring Home Assistant behind a reverse proxy make sure you configure the [http](https://www.home-assistant.io/integrations/http) component and set `trusted_proxies` correctly and `use_x_forwarded_for` to `true`. | ||
|
||
For example (edit the configuration.yaml in your pod): | ||
|
||
```yaml | ||
http: | ||
server_host: 0.0.0.0 | ||
ip_ban_enabled: true | ||
login_attempts_threshold: 5 | ||
use_x_forwarded_for: true | ||
trusted_proxies: | ||
# Pod CIDR | ||
- 10.69.0.0/16 | ||
# Node CIDR | ||
- 192.168.42.0/24 | ||
``` | ||
### USB Devices | ||
A USB devices can be used with Home Assistant if passed through from the host to the pod. | ||
The USB device could be volume bound directly into the Pod | ||
([documented in the deprecated k8s-at-home/home-assistant chart](https://github.com/k8s-at-home/charts/tree/master/charts/stable/home-assistant#z-wave--zigbee), | ||
but this requires granting privileged access to the Home Assistant pod. | ||
Instead, it is recommended to use [Smarter Device Manager](../smarter-device-manager) to manage USB devices for you. | ||
For example, if your Z-Wave device is at `/dev/ttyACM0`, you could deploy Smarter Device Manager with the following configuration: | ||
|
||
```yaml | ||
config: | | ||
- devicematch: ^ttyACM[0-9]*$ | ||
nummaxdevices: 1 | ||
``` | ||
|
||
Then, add the following resources to your Home Assistant `values.yaml`: | ||
|
||
```yaml | ||
resources: | ||
limits: | ||
smarter-devices/ttyACM0: 1 | ||
requests: | ||
smarter-devices/ttyACM0: 1 | ||
``` | ||
|
||
Your Home Assistant Pod would automatically be deployed to the correct server, with the USB device available at `/dev/ttyACM0`. | ||
No extra privileges required! | ||
|
||
## Values | ||
|
||
**Important**: When deploying an application Helm chart you can add more values from the bjw-s common library chart [here](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common) | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| addons.codeserver | object | See [values.yaml](./values.yaml) | Enable VS Code server addon. This allows for easy access to configuration.yaml | | ||
| dnsPolicy | string | `"Default"` | When hostNetwork is true set dnsPolicy to `ClusterFirstWithHostNet` | | ||
| env | object | See [values.yaml](./values.yaml) | environment variables. | | ||
| env.TZ | string | `"UTC"` | Set the container timezone | | ||
| hostNetwork | bool | `false` | Enable devices to be discoverable | | ||
| image.pullPolicy | string | `"IfNotPresent"` | image pull policy | | ||
| image.repository | string | `"ghcr.io/home-assistant/home-assistant"` | image repository | | ||
| image.tag | string | `"2023.2.2"` | image tag | | ||
| ingress.main | object | See [values.yaml](./values.yaml) | Enable and configure ingress settings for the chart under this key. | | ||
| persistence.config | object | See [values.yaml](./values.yaml) | Configure persistence settings for the chart under this key. | | ||
| postgresql | object | See [values.yaml](./values.yaml) | Enable and configure postgresql database subchart under this key. For more options see [postgresql chart documentation](https://github.com/bitnami/charts/tree/master/bitnami/postgresql) | | ||
| service | object | See [values.yaml](./values.yaml) | Configures service settings for the chart. | | ||
|
||
--- | ||
Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs) |
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,58 @@ | ||
{{- define "custom.custom.configuration.header" -}} | ||
## Custom configuration | ||
{{- end -}} | ||
|
||
{{- define "custom.custom.configuration" -}} | ||
{{ template "custom.custom.configuration.header" . }} | ||
|
||
### HTTP 400 bad request while accessing from your browser | ||
|
||
When configuring Home Assistant behind a reverse proxy make sure you configure the [http](https://www.home-assistant.io/integrations/http) component and set `trusted_proxies` correctly and `use_x_forwarded_for` to `true`. | ||
|
||
For example (edit the configuration.yaml in your pod): | ||
|
||
```yaml | ||
http: | ||
server_host: 0.0.0.0 | ||
ip_ban_enabled: true | ||
login_attempts_threshold: 5 | ||
use_x_forwarded_for: true | ||
trusted_proxies: | ||
# Pod CIDR | ||
- 10.69.0.0/16 | ||
# Node CIDR | ||
- 192.168.42.0/24 | ||
``` | ||
|
||
### USB Devices | ||
|
||
A USB devices can be used with Home Assistant if passed through from the host to the pod. | ||
|
||
The USB device could be volume bound directly into the Pod | ||
([documented in the deprecated k8s-at-home/home-assistant chart](https://github.com/k8s-at-home/charts/tree/master/charts/stable/home-assistant#z-wave--zigbee), | ||
but this requires granting privileged access to the Home Assistant pod. | ||
|
||
Instead, it is recommended to use [Smarter Device Manager](../smarter-device-manager) to manage USB devices for you. | ||
|
||
For example, if your Z-Wave device is at `/dev/ttyACM0`, you could deploy Smarter Device Manager with the following configuration: | ||
|
||
```yaml | ||
config: | | ||
- devicematch: ^ttyACM[0-9]*$ | ||
nummaxdevices: 1 | ||
``` | ||
|
||
Then, add the following resources to your Home Assistant `values.yaml`: | ||
|
||
```yaml | ||
resources: | ||
limits: | ||
smarter-devices/ttyACM0: 1 | ||
requests: | ||
smarter-devices/ttyACM0: 1 | ||
``` | ||
|
||
Your Home Assistant Pod would automatically be deployed to the correct server, with the USB device available at `/dev/ttyACM0`. | ||
No extra privileges required! | ||
|
||
{{- 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,17 @@ | ||
{{- include "bjw-s.common.lib.chart.notes" . -}} | ||
|
||
{{- with .Values.postgresql }} | ||
{{- if .enabled }} | ||
|
||
Extra configuration is required to use Postgres: | ||
|
||
1. To get the password for "{{ default "postgres" .auth.username }}" run: | ||
|
||
kubectl get secret --namespace {{ $.Release.Namespace }} {{ $.Release.Name }}-postgresql -o jsonpath="{.data.{{ if not .auth.password }}postgres-{{ end }}password}" | base64 -d | ||
|
||
2. Add to the Home Assistant configuration.yaml: | ||
|
||
recorder: | ||
db_url: postgresql://{{ default "postgres" .auth.username }}:PASSWORD@{{ $.Release.Name }}-postgresql/{{ .auth.database }} | ||
{{- end }} | ||
{{- 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 @@ | ||
{{ include "bjw-s.common.loader.all" . }} |
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,73 @@ | ||
# | ||
# IMPORTANT NOTE | ||
# | ||
# This chart inherits from our common library chart. You can check the default values/options here: | ||
# https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/values.yaml | ||
# | ||
|
||
image: | ||
# -- image repository | ||
repository: ghcr.io/home-assistant/home-assistant | ||
# -- image pull policy | ||
pullPolicy: IfNotPresent | ||
# -- image tag | ||
tag: 2023.2.2 | ||
|
||
# -- environment variables. | ||
# @default -- See [values.yaml](./values.yaml) | ||
env: | ||
# -- Set the container timezone | ||
TZ: UTC | ||
|
||
# -- Configures service settings for the chart. | ||
# @default -- See [values.yaml](./values.yaml) | ||
service: | ||
main: | ||
ports: | ||
http: | ||
port: 8123 | ||
|
||
ingress: | ||
# -- Enable and configure ingress settings for the chart under this key. | ||
# @default -- See [values.yaml](./values.yaml) | ||
main: | ||
enabled: false | ||
|
||
# -- Enable devices to be discoverable | ||
hostNetwork: false | ||
|
||
# -- When hostNetwork is true set dnsPolicy to `ClusterFirstWithHostNet` | ||
dnsPolicy: Default | ||
|
||
persistence: | ||
# -- Configure persistence settings for the chart under this key. | ||
# @default -- See [values.yaml](./values.yaml) | ||
config: | ||
enabled: false | ||
|
||
# -- Enable and configure postgresql database subchart under this key. | ||
# For more options see [postgresql chart documentation](https://github.com/bitnami/charts/tree/master/bitnami/postgresql) | ||
# @default -- See [values.yaml](./values.yaml) | ||
postgresql: | ||
enabled: false | ||
auth: | ||
database: home-assistant | ||
postgresPassword: changeme | ||
primary: | ||
persistence: | ||
enabled: false | ||
|
||
addons: | ||
# -- Enable VS Code server addon. | ||
# This allows for easy access to configuration.yaml | ||
# @default -- See [values.yaml](./values.yaml) | ||
codeserver: | ||
enabled: false | ||
args: | ||
- --auth=none | ||
- --user-data-dir=/data/config/.vscode | ||
volumeMounts: | ||
- name: config | ||
mountPath: /data/config | ||
ingress: | ||
enabled: false |