From b290bcd0a18fa0c0ebe32be7eaa68c2eed9b82ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=97=AA=D1=94=CE=BD=CE=B9=CE=B7=20=E1=97=B7=CF=85=D0=BD?= =?UTF-8?q?=CA=9F?= Date: Wed, 23 Dec 2020 09:47:01 -0500 Subject: [PATCH] [home-assistant] allow setting a base64-encoded SSH private key (#429) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <6213398+bjw-s@users.noreply.github.com> --- charts/home-assistant/Chart.yaml | 2 +- charts/home-assistant/templates/secret.yaml | 6 +++++- charts/home-assistant/values.yaml | 7 +++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/charts/home-assistant/Chart.yaml b/charts/home-assistant/Chart.yaml index b4c4d448..8d83d5b7 100644 --- a/charts/home-assistant/Chart.yaml +++ b/charts/home-assistant/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: 2020.12.1 description: Home Assistant name: home-assistant -version: 5.1.1 +version: 5.2.0 keywords: - home-assistant - hass diff --git a/charts/home-assistant/templates/secret.yaml b/charts/home-assistant/templates/secret.yaml index 2582f876..19f769cf 100644 --- a/charts/home-assistant/templates/secret.yaml +++ b/charts/home-assistant/templates/secret.yaml @@ -1,4 +1,4 @@ -{{- if .Values.git.deployKey }} +{{- if or .Values.git.deployKey .Values.git.deployKeyBase64 }} apiVersion: v1 kind: Secret metadata: @@ -7,5 +7,9 @@ metadata: {{- include "common.labels" . | nindent 4 }} type: Opaque data: + {{- if .Values.git.deployKey }} id_rsa: {{ .Values.git.deployKey | b64enc | quote }} + {{- else }} + id_rsa: {{ .Values.git.deployKeyBase64 | quote }} + {{- end }} {{- end }} diff --git a/charts/home-assistant/values.yaml b/charts/home-assistant/values.yaml index e24242de..1b1174be 100644 --- a/charts/home-assistant/values.yaml +++ b/charts/home-assistant/values.yaml @@ -18,12 +18,19 @@ service: # # Enable devices to be discoverable # hostNetwork: true +# # When hostNetwork is true set dnsPolicy to ClusterFirstWithHostNet +# dnsPolicy: ClusterFirstWithHostNet + # # Enable passing thru a USB device to Home Assistant # securityContext: # privileged: true +# Allow access a Git repository by passing in a private SSH key git: + # Raw SSH private key deployKey: "" + # Base64-encoded SSH private key. When both variables are set, the raw SSH key takes precedence. + deployKeyBase64: "" # Enable a prometheus-operator servicemonitor prometheus: