From 52fabe4423095f12f67be1c7dbf88b801c1bb521 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 4 Sep 2019 16:46:06 +0100 Subject: [PATCH] fix(k8s): Reinsert passLookup newline after kontemplate trims it SSH can not read the key without the trailing newline. Ideally kontemplate would expose a toggle for this. --- infra/kubernetes/nixery/known_hosts | 1 + infra/kubernetes/nixery/secrets.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/infra/kubernetes/nixery/known_hosts b/infra/kubernetes/nixery/known_hosts index 1bae52b89..6a2f84b5f 100644 --- a/infra/kubernetes/nixery/known_hosts +++ b/infra/kubernetes/nixery/known_hosts @@ -1 +1,2 @@ github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== +140.82.118.4 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== diff --git a/infra/kubernetes/nixery/secrets.yaml b/infra/kubernetes/nixery/secrets.yaml index e9374faa4..d9a674d2c 100644 --- a/infra/kubernetes/nixery/secrets.yaml +++ b/infra/kubernetes/nixery/secrets.yaml @@ -12,7 +12,7 @@ type: Opaque data: gcs-key.json: {{ passLookup "nixery-gcs-json" | b64enc }} gcs-key.pem: {{ passLookup "nixery-gcs-pem" | b64enc }} - id_nixery: {{ passLookup "nixery-ssh-private" | b64enc }} + id_nixery: {{ printf "%s\n" (passLookup "nixery-ssh-private") | b64enc }} id_nixery.pub: {{ insertFile "id_nixery.pub" | b64enc }} known_hosts: {{ insertFile "known_hosts" | b64enc }} ssh_config: {{ insertFile "ssh_config" | b64enc }}