GitHub user n4l5u0r created a discussion: YAML : How to avoid having the default ssh pub key carriage return populated in the user-data of CKS instances ?
I have an issue as when I deploy a kubernetes servers using no matter which iso the user-data are not ok as it creates a carriage return at the end of the default `ssh_authorized_keys` and then the whole user-data is wrong and nothing works as expected. Impossible for Instances to load it from the VR as it's not well formed so not available at `http://10.30.0.1/latest/user-data` when I add a user created ssh key during the creation I have the same issue as the default key is still present and fails everything. If I reopen all intances manually and update the user-data and then restart everything including the VR it finally works but this is not scalable at all and not possible to automate. Cloudstack : 4.20.2.0 Fresh install. No changes to the standard default public key / private key of Cloudstack. ```yaml --- users: - name: cloud sudo: ALL=(ALL) NOPASSWD:ALL shell: /bin/bash ssh_authorized_keys: - "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGB14d02p9Am1IE1Jedqhde+3PF00cdzoz/JNMlHL87HSG0RQ4+/XnGm7qXPr+cOGFFY9uWgKmk/YNOsfEOMY6w= cloud@core-mgmt-1-dev " - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC+/bep3Bnt7NLoO+EwLvL1HfLZ6QtyZA/SRaFYYcX7L cloud@test-system" write_files: - path: /etc/conf.d/nfs permissions: '0644' content: | OPTS_RPC_MOUNTD="" - path: /etc/kubernetes/pki/cloudstack/ca.crt permissions: '0644' ... ``` Thank you very much for you help. GitHub link: https://github.com/apache/cloudstack/discussions/12034 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
