This commit is contained in:
jonas 2021-10-21 16:29:58 +02:00
parent f3826f8427
commit 5c17cb61d7
5 changed files with 15 additions and 20 deletions

View File

@ -1,4 +0,0 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

View File

@ -1,8 +0,0 @@
apiVersion: harvesterhci.io/v1beta1
kind: KeyPair
metadata:
name: admin
namespace: default
spec:
publicKey: |
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILGVNwMC2H+Fn4AhCDIa4MVfEYsVF7Zs2yHc8cGbv40l jonas@admin

View File

@ -1,8 +0,0 @@
apiVersion: harvesterhci.io/v1beta1
kind: KeyPair
metadata:
name: exilio
namespace: default
spec:
publicKey: |
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDSJ4KrM7iwmUyvOznqNiTaYOIVxpog7Ktfr2xaJgH6O jonas@exsilio

View File

@ -0,0 +1,15 @@
{% for key in pillar['tlu-harvester']['os']['ssh_authorized_keys'] -%}
{% set len = key | length %}
{% set pos = len - key.rfind(' ') - 1 %}
{% set name = key[-pos:].replace('@','-') %}
---
apiVersion: harvesterhci.io/v1beta1
kind: KeyPair
metadata:
name: {{ name }}
namespace: default
spec:
publicKey: |
{{ key }}
{% endfor %}