Skip to content

Commit

Permalink
fix(home-assistant): volume mount keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabor Pichner committed Dec 27, 2023
1 parent 8fd632e commit f21bdc9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/home-assistant/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.1
version: 0.2.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
6 changes: 3 additions & 3 deletions charts/home-assistant/templates/statefullset.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- $initCommand := "" }}

{{- range $key, $val := .Values.homeAssistant.secrets }}
{{- $initCommand = printf "%s && echo \"%s: $(cat /etc/secrets/%s)\" >> /etc/secrets/secrets.yaml" $initCommand $key $key }}
{{- $initCommand = printf "%s && echo \"%s: $(cat /etc/secrets/%s)\" >> /etc/secrets/secrets.yaml" $initCommand $val.key $val.key }}
{{- end }}

apiVersion: apps/v1
Expand Down Expand Up @@ -56,8 +56,8 @@ spec:
mountPath: /etc/secrets
{{- range $key, $val := .Values.homeAssistant.secrets }}
- name: {{ $key | quote }}
mountPath: "/etc/secrets/{{ $key }}"
subPath: {{ $val.key | quote }}
mountPath: "/etc/secrets/{{ $val.key }}"
subPath: {{ $val.subPath | quote }}
readOnly: true
{{- end }}
{{- end }}
Expand Down
5 changes: 3 additions & 2 deletions charts/home-assistant/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ homeAssistant:
scenes.yaml: |
# place your scenes here
secrets: []
# postgres_url:
# postgres-url:
# key: postgres_url
# secretName: home-assistant-database-credentials
# key: POSTGRES_URL
# subPath: POSTGRES_URL

podAnnotations: {}
podLabels: {}
Expand Down

0 comments on commit f21bdc9

Please sign in to comment.