[stable/home-assistant] Add option to inject environment vars from secrets (#10297)

Signed-off-by: William Hughes <will@willhughes.name>
This commit is contained in:
Will Hughes
2018-12-29 07:21:23 -08:00
committed by Kubernetes Prow Robot
parent e04403fc78
commit 8eb479b3a3
4 changed files with 20 additions and 2 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ apiVersion: v1
appVersion: 0.81.2
description: Home Assistant
name: home-assistant
version: 0.4.1
version: 0.4.2
keywords:
- home-assistant
- hass
+1
View File
@@ -58,6 +58,7 @@ The following tables lists the configurable parameters of the Sentry chart and t
| `persistence.storageClass` | Type of persistent volume claim | `-` |
| `persistence.accessMode` | Persistence access modes | `ReadWriteMany` |
| `extraEnv` | Extra ENV vars to pass to the home-assistant container | `{}` |
| `extraEnvSecrets` | Extra env vars to pass to the home-assistant container from k8s secrets - see `values.yaml` for an example | `{}` |
| `configurator.enabled` | Enable the optional [configuration UI](https://github.com/danielperna84/hass-configurator) | `false` |
| `configurator.image.repository` | Image repository | `billimek/hass-configurator-docker` |
| `configurator.image.tag` | Image tag | `x86_64-0.3.0`|
@@ -49,6 +49,13 @@ spec:
- name: {{ $key }}
value: {{ $value }}
{{- end }}
{{- range $name, $opts := .Values.extraEnvSecrets }}
- name: {{ $name }}
valueFrom:
secretKeyRef:
name: {{ $opts.secret }}
key: {{ $opts.key }}
{{- end }}
volumeMounts:
- mountPath: /config
name: config
+11 -1
View File
@@ -55,11 +55,21 @@ persistence:
accessMode: ReadWriteOnce
size: 5Gi
## Additional hass-configurator container environment variable
## Additional hass container environment variable
## For instance to add a http_proxy
##
extraEnv: {}
## Additional hass container environment variable from k8s secrets
## For instance to add a password
## can use `!env_var` in the home assistant configuration to reference these variables
extraEnvSecrets:
# Example
# This will set ${MQTT_PASSWORD} to the 'password' key from the 'mqtt' secret
# MQTT_PASSWORD:
# secret: mqtt
# key: password
configurator:
enabled: false