Moving the shell command to an external script allows me to update it without having to restart Home Assistant. Including the SSH private key in the Secret not only allows it to be managed by Kubernetes, but also works around a permissions issue when storing the key in the `/config` volume. The `ssh` command refuses to use a key file with write permission for the group or other fields, but the Kubelet sets `g=rw` when `fsGroup` is set on the pod.
3 lines
155 B
Bash
3 lines
155 B
Bash
set -e
|
|
ssh -i /run/secrets/home-assistant/sshkey.pem -oUserKnownHostsFile=/config/ssh_known_hosts -oBatchMode=yes pi@diddy.pyrocufflink.red restart-mopidy
|