[home-assistant] Added the ability to specify subPaths (#53)

* Added the ability to specify subPaths

I mount all my configs into a volume and keep each app under subPaths. By adding the ability of specifying a subpath here I can set hass to store its settings on its own folder.

thanks

* Update Chart.yaml

Version bumped

* Update deployment.yaml

Fixed a typo, the here the config sub path is for appdaemon and not vscode

* Update README.md

Added the new variables to the table

* Update README.md

Removed the git configSubPath because is the same as configSubPath. Same mount definition as the hass config. Also moved the configSubPath setting under persistence which makes more sense

* Update deployment.yaml

Changed configSubPath to be under persistence. Unified the git.configSubPath with the persistence one as they are the same.

* Update values.yaml

Added configSubPath to the values.yaml with a comment.

* Update Chart.yaml

Version bump

* Update values.yaml

trailing space... come on github editor you failed me

* Update values.yaml

Added the subpath setting under appDaemon

* Update values.yaml

trailing spaces... github editor needs an update

* Update values.yaml

grrr trailing spaces

Co-authored-by: Jeff Billimek <jeff@billimek.com>
This commit is contained in:
Carlos Ravelo 2020-09-22 21:46:37 -04:00 committed by GitHub
parent 1ec31ad877
commit 8e8e8afd50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 4 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 0.115.2
description: Home Assistant
name: home-assistant
version: 2.2.0
version: 2.3.0
keywords:
- home-assistant
- hass

View File

@ -80,6 +80,7 @@ The following tables lists the configurable parameters of the Home Assistant cha
| `persistence.hostPath` | The path to the config directory on the host, instead of a PVC | `nil` |
| `persistence.storageClass` | Type of persistent volume claim | `-` |
| `persistence.accessMode` | Persistence access modes | `ReadWriteMany` |
| `persistence.configSubPath` | An optional subPath for the config volumeMount | `` |
| `git.enabled` | Use git-sync in init container | `false` |
| `git.secret` | Git secret to use for git-sync | `git-creds` |
| `git.syncPath` | Git sync path | `/config` |
@ -155,6 +156,7 @@ The following tables lists the configurable parameters of the Home Assistant cha
| `appdaemon.image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `appdaemon.haToken` | Home Assistant API token - you need to generate it in your Home Assistant profile and then copy here | `` |
| `appdaemon.extraEnv` | Extra ENV vars to pass to the AppDaemon container | `{}` |
| `appdaemon.configSubPath` | An optional subPath for the AppDaemon container's config volume mount | `appdaemon` |
| `appdaemon.ingress.enabled` | Enables Ingress for the AppDaemon UI | `false` |
| `appdaemon.ingress.annotations` | Ingress annotations for the AppDaemon UI | `{}` |
| `appdaemon.ingress.hosts` | Ingress accepted hostnames for the AppDaemonUI | `appdaemon.local` |

View File

@ -74,6 +74,7 @@ spec:
volumeMounts:
- mountPath: /config
name: config
subPath: {{ default "" .Values.persistence.configSubPath }}
- mountPath: {{ .Values.git.keyPath }}
name: git-secret
{{- if .Values.extraVolumeMounts }}{{ toYaml .Values.extraVolumeMounts | trim | nindent 8 }}{{ end }}
@ -148,6 +149,7 @@ spec:
volumeMounts:
- mountPath: /config
name: config
subPath: {{ default "" .Values.persistence.configSubPath }}
{{- if .Values.zwave.enabled }}
- mountPath: /dev/ttyACM0
name: ttyacm
@ -247,6 +249,7 @@ spec:
volumeMounts:
- mountPath: /config
name: config
subPath: {{ default "" .Values.persistence.configSubPath }}
{{- if .Values.git.enabled }}
- mountPath: {{ .Values.git.keyPath }}
name: git-secret
@ -310,6 +313,7 @@ spec:
volumeMounts:
- mountPath: /config
name: config
subPath: {{ default "" .Values.persistence.configSubPath }}
{{- if .Values.git.enabled }}
- mountPath: {{ .Values.git.keyPath }}
name: git-secret
@ -369,8 +373,9 @@ spec:
volumeMounts:
- mountPath: /ha-conf
name: config
subPath: {{ default "" .Values.persistence.configSubPath }}
- mountPath: /conf
subPath: appdaemon
subPath: {{ default "appdaemon" .Values.appdaemon.configSubPath }}
name: config
{{- if .Values.extraVolumeMounts }}{{ toYaml .Values.extraVolumeMounts | trim | nindent 10 }}{{ end }}
{{- if .Values.usePodSecurityContext }}

View File

@ -84,6 +84,9 @@ persistence:
# hostPath: /path/to/the/config/folder
accessMode: ReadWriteOnce
size: 5Gi
# If you use an existingClaim is sometimes useful to specify a subPath within the volume to mount instead of mounting the root.
# This allows several charts to share a common volume. For example for configurations.
# configSubPath: configs/hass
## Additional hass container environment variable
## For instance to add a http_proxy
@ -292,6 +295,11 @@ appdaemon:
##
extraEnv: {}
# If you use an existingClaim for the config volume then it is sometimes useful to specify a subPath
# within the volume to mount instead of mounting the root.
# This allows several charts to share a common volume. For example for configurations.
# configSubPath: configs/hass/appdaemon
ingress:
enabled: false
annotations: {}