Back to Charts

DEPRECATED - Home Assistant

stable/home-assistant/README.md

latest18.1 KB
Original Source

DEPRECATED - Home Assistant

This chart has been deprecated and moved to its new home:

This is a helm chart for Home Assistant

TL;DR;

console
$ helm install stable/home-assistant

Introduction

This code is adapted for the official home assistant docker image

Installing the Chart

To install the chart with the release name my-release:

console
$ helm install --name my-release stable/home-assistant

Uninstalling the Chart

To uninstall/delete the my-release deployment:

console
$ helm delete my-release --purge

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following tables lists the configurable parameters of the Home Assistant chart and their default values.

ParameterDescriptionDefault
image.repositoryImage repositoryhomeassistant/home-assistant
image.tagImage tag. Possible values listed here.0.108.7
image.pullPolicyImage pull policyIfNotPresent
image.pullSecretsSecrets to use when pulling the image[]
strategyTypeSpecifies the strategy used to replace old Pods by new onesRecreate
probes.liveness.enabledUse the livenessProbe?true
probes.liveness.scheme Specify liveness scheme parameter for the deploymentHTTP
probes.liveness.initialDelaySecondsSpecify liveness initialDelaySeconds parameter for the deployment60
probes.liveness.failureThresholdSpecify liveness failureThreshold parameter for the deployment5
probes.liveness.timeoutSecondsSpecify liveness timeoutSeconds parameter for the deployment10
probes.readiness.enabledUse the readinessProbe?true
probes.readiness.scheme Specify readiness scheme parameter for the deploymentHTTP
probes.readiness.initialDelaySecondsSpecify readiness initialDelaySeconds parameter for the deployment60
probes.readiness.failureThresholdSpecify readiness failureThreshold parameter for the deployment5
probes.readiness.timeoutSecondsSpecify readiness timeoutSeconds parameter for the deployment10
probes.startup.enabledUse the startupProbe? (new in kubernetes 1.16)false
probes.startup.scheme Specify startup scheme parameter for the deploymentHTTP
probes.startup.failureThresholdSpecify startup failureThreshold parameter for the deployment5
probes.startup.periodSecondsSpecify startup periodSeconds parameter for the deployment10
service.typeKubernetes service type for the home-assistant GUIClusterIP
service.portKubernetes port where the home-assistant GUI is exposed8123
service.portNameKubernetes port name where the home-assistant GUI is exposedapi
service.additionalPortsAdd additional ports exposed by the home assistant container integrations. Example homematic needs to expose a proxy port{}
service.annotationsService annotations for the home-assistant GUI{}
service.clusterIPCluster IP for the home-assistant GUI``
service.externalIPsExternal IPs for the home-assistant GUI[]
service.loadBalancerIPLoadbalancer IP for the home-assistant GUI``
service.loadBalancerSourceRangesLoadbalancer client IP restriction range for the home-assistant GUI[]
service.publishNotReadyAddressesSet to true if the editors (vscode or configurator) should be reachable when home assistant does not runfalse
service.externalTrafficPolicyLoadbalancer externalTrafficPolicy``
hostNetworkEnable hostNetwork - might be needed for discovery to work false
service.nodePortnodePort to listen on for the home-assistant GUI``
ingress.enabledEnables Ingressfalse
ingress.annotationsIngress annotations{}
ingress.pathIngress path/
ingress.hostsIngress accepted hostnameschart-example.local
ingress.tlsIngress TLS configuration[]
persistence.enabledUse persistent volume to store datatrue
persistence.sizeSize of persistent volume claim5Gi
persistence.existingClaimUse an existing PVC to persist datanil
persistence.hostPathThe path to the config directory on the host, instead of a PVCnil
persistence.storageClassType of persistent volume claim-
persistence.accessModePersistence access modesReadWriteMany
git.enabledUse git-sync in init containerfalse
git.secretGit secret to use for git-syncgit-creds
git.syncPathGit sync path/config
git.keyPathGit ssh key path/root/.ssh
git.user.nameHuman-readable name in the “committer” and “author” fields``
git.user.emailEmail address for the “committer” and “author” fields``
zwave.enabledEnable zwave host device passthrough. Also enables privileged container mode.false
zwave.deviceDevice to passthrough to guestttyACM0
hostMountsArray of host directories to mount; can be used for devices[]
hostMounts.nameName of the volumenil
hostMounts.hostPathThe path on the host machinenil
hostMounts.mountPathThe path at which to mount (optional; assumed same as hostPath)nil
hostMounts.typeThe type to mount (optional, i.e., Directory)nil
extraEnvExtra ENV vars to pass to the home-assistant container{}
extraEnvSecretsExtra env vars to pass to the home-assistant container from k8s secrets - see values.yaml for an example{}
configurator.enabledEnable the optional configuration UIfalse
configurator.image.repositoryImage repositorybillimek/hass-configurator-docker
configurator.image.tagImage tag0.3.5-x86_64
configurator.image.pullPolicyImage pull policyIfNotPresent
configurator.hassApiUrlHome Assistant API URL (e.g. 'http://home-assistant:8123/api/') - will auto-configure to proper URL if not set``
configurator.hassApiPasswordHome Assistant API Password``
configurator.basepathBase path of the home assistant configuration files/config
configurator.enforceBasepathIf set to true, will prevent navigation to other directories in the configurator UItrue
configurator.usernameIf this and password (below) are set, will require basic auth to access the configurator UI``
configurator.passwordIf this and username (above) are set, will require basic auth to access the configurator UI. password is in the format of a sha256 hash (e.g. "test" would be "{sha256}9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08")``
configurator.extraEnvExtra ENV vars to pass to the configuration UI{}
configurator.ingress.enabledEnables Ingress for the configurator UIfalse
configurator.ingress.annotationsIngress annotations for the configurator UI{}
configurator.ingress.hostsIngress accepted hostnames for the configurator UIchart-example.local
configurator.ingress.tlsIngress TLS configuration for the configurator UI[]
configurator.strategy.typehass-configurator Deployment Strategy type``
configurator.tolerationsToleration labels for pod assignment for the configurator UI[]
configurator.nodeSelectorNode labels for pod assignment for the configurator UI{}
configurator.schedulerNameUse an alternate scheduler, e.g. "stork" for the configurator UI``
configurator.podAnnotationsAffinity settings for pod assignment for the configurator UI{}
configurator.resourcesCPU/Memory resource requests/limits for the configurator UI{}
configurator.securityContextSecurity context to be added to hass-configurator pods for the configurator UI{}
configurator.service.typeKubernetes service type for the configurator UIClusterIP
configurator.service.portKubernetes port where the configurator UI is exposed3218
configurator.service.nodePortnodePort to listen on for the configurator UI``
configurator.service.annotationsService annotations for the configurator UI{}
configurator.service.labelsService labels to use for the configurator UI{}
configurator.service.clusterIPCluster IP for the configurator UI``
configurator.service.externalIPsExternal IPs for the configurator UI[]
configurator.service.loadBalancerIPLoadbalancer IP for the configurator UI``
configurator.service.loadBalancerSourceRangesLoadbalancer client IP restriction range for the configurator UI[]
vscode.enabledEnable the optional VS Code Server Sidecarfalse
vscode.image.repositoryImage repositorycodercom/code-server
vscode.image.tagImage tag3.1.1
vscode.image.pullPolicyImage pull policyIfNotPresent
vscode.hassConfigBase path of the home assistant configuration files/config
vscode.vscodePathBase path of the VS Code configuration files/config/.vscode
vscode.passwordIf this is set, will require a password to access the VS Code Server UI``
vscode.extraEnvExtra ENV vars to pass to the configuration UI{}
vscode.ingress.enabledEnables Ingress for the VS Code UIfalse
vscode.ingress.annotationsIngress annotations for the VS Code UI{}
vscode.ingress.hostsIngress accepted hostnames for the VS Code UIchart-example.local
vscode.ingress.tlsIngress TLS configuration for the VS Code UI[]
vscode.resourcesCPU/Memory resource requests/limits for the VS Code UI{}
vscode.securityContextSecurity context to be added to hass-vscode pods for the VS Code UI{}
vscode.service.typeKubernetes service type for the VS Code UIClusterIP
vscode.service.portKubernetes port where the vscode UI is exposed80
vscode.service.nodePortnodePort to listen on for the VS Code UI``
vscode.service.annotationsService annotations for the VS Code UI{}
vscode.service.labelsService labels to use for the VS Code UI{}
vscode.service.clusterIPCluster IP for the VS Code UI``
vscode.service.externalIPsExternal IPs for the VS Code UI[]
vscode.service.loadBalancerIPLoadbalancer IP for the VS Code UI``
vscode.service.loadBalancerSourceRangesLoadbalancer client IP restriction range for the VS Code UI[]
appdaemon.enabledEnable the optional Appdaemon Sidecarfalse
appdaemon.image.repositoryImage repositoryacockburn/appdaemon
appdaemon.image.tagImage tag3.0.5
appdaemon.image.pullPolicyImage pull policyIfNotPresent
appdaemon.haTokenHome Assistant API token - you need to generate it in your Home Assistant profile and then copy here``
appdaemon.extraEnvExtra ENV vars to pass to the AppDaemon container{}
appdaemon.ingress.enabledEnables Ingress for the AppDaemon UIfalse
appdaemon.ingress.annotationsIngress annotations for the AppDaemon UI{}
appdaemon.ingress.hostsIngress accepted hostnames for the AppDaemonUIappdaemon.local
appdaemon.ingress.tlsIngress TLS configuration for the AppDaemon UI[]
appdaemon.resourcesCPU/Memory resource requests/limits for the AppDaemon{}
appdaemon.securityContextSecurity context to be added to hass-appdaemon container{}
appdaemon.service.typeKubernetes service type for the AppDaemon UIClusterIP
appdaemon.service.portKubernetes port where the AppDaemon UI is exposed5050
appdaemon.service.nodePortnodePort to listen on for the AppDaemon UI``
appdaemon.service.annotationsService annotations for the AppDaemon UI{}
appdaemon.service.labelsService labels to use for the AppDaemon UI{}
appdaemon.service.clusterIPCluster IP for the AppDaemon UI``
appdaemon.service.externalIPsExternal IPs for the AppDaemon UI[]
appdaemon.service.loadBalancerIPLoadbalancer IP for the AppDaemon UI``
appdaemon.service.loadBalancerSourceRangesLoadbalancer client IP restriction range for the VS Code UI[]
resourcesCPU/Memory resource requests/limits or the home-assistant GUI{}
nodeSelectorNode labels for pod assignment or the home-assistant GUI{}
tolerationsToleration labels for pod assignment or the home-assistant GUI[]
affinityAffinity settings for pod assignment or the home-assistant GUI{}
podAnnotationsKey-value pairs to add as pod annotations{}
extraVolumesAny extra volumes to define for the pod{}
extraVolumeMountsAny extra volumes mounts to define for each container of the pod{}
monitoring.enabledEnables Monitoring supportfalse
monitoring.serviceMonitor.enabledSetup a ServiceMonitor to configure scrapingfalse
monitoring.serviceMonitor.namespaceSet the namespace the ServiceMonitor should be deployedfalse
monitoring.serviceMonitor.intervalSet how frequently Prometheus should scrape30
monitoring.serviceMonitor.labelsSet labels for the ServiceMonitor, use this to define your scrape label for Prometheus Operator{}
monitoring.serviceMonitor.bearerTokenFileSet bearerTokenFile for home-assistant auth (use long lived access tokens)nil
monitoring.serviceMonitor.bearerTokenSecretSet bearerTokenSecret for home-assistant auth (use long lived access tokens)nil

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

console
helm install --name my-release \
  --set configurator.hassApiPassword="$HASS_API_PASSWORD" \
    stable/home-assistant

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,

console
helm install --name my-release -f values.yaml stable/home-assistant

Read through the values.yaml file. It has several commented out suggested values.

Configuring home assistant

Much of the home assistant configuration occurs inside the various files persisted to the /config directory. This will require external access to the persistent storage location where the home assistant configuration data is stored. Because this may be a limitation, there are two options built-in to this chart:

Configurator UI

Home Assistant Configurator UI is added as an optional sidecar container to Home Assistant with access to the home assistant configuration for easy in-browser editing and manipulation of Home Assistant.

VS Code Server

VS Code Server is added as an optional sidecar container to Home Assistant with access to the home assistant configuration for easy in-browser editing and manipulation of Home Assistant. If using this, it is possible to manually install the Home Assistant Config Helper Extension in order to have a deeper integration with Home Assistant within VS Code while editing the configuration files.

AppDaemon

AppDaemon is added as an optional sidecar container to Home Assistant with access to the home assistant configuration /config/appdaemon. This allows downloading apps with HACS Home Assistant Configurator UI is added as an optional sidecar container to Home Assistant with access to the home assistant configuration for easy in-browser editing and manipulation of Home Assistant.

Git sync secret

In order to sync the home assistant from a git repo, you have to store a ssh key as a kubernetes git secret

console
kubectl create secret generic git-creds --from-file=id_rsa=git/k8s_id_rsa --from-file=known_hosts=git/known_hosts --from-file=id_rsa.pub=git/k8s_id_rsa.pub