Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

additionalUserData.data renders invalid cloud-config #527

Open
mikeruu opened this issue Dec 18, 2024 · 0 comments
Open

additionalUserData.data renders invalid cloud-config #527

mikeruu opened this issue Dec 18, 2024 · 0 comments
Labels
kind/bug Something isn't working priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Milestone

Comments

@mikeruu
Copy link

mikeruu commented Dec 18, 2024

What happened:
When using the additionalUserData.data in cloud-config format to pass cloud-init actions to an ubuntu server, cloud-init fails to run because of the formatting

	failed to unmarshal arbitrary cloud-init data: yaml: line 2: block sequence entries are not allowed in this context, please check if you put valid yaml data:
	users: - name: ubuntu
	  ssh_authorized_keys:
	    - ssh-rsa ...

What did you expect to happen:

The output should be in the correct yaml format:

	users: 
          - name: ubuntu
	     ssh_authorized_keys:
	     - ssh-rsa ....

How to reproduce it:

apiVersion: controlplane.cluster.x-k8s.io/v1alpha1
kind: RKE2ControlPlane
  metadata:
    name: management-cluster-control-plane
    namespace: default
  spec:
    agentConfig:
    format: cloud-config
    additionalUserData:
      data:
        users: |
          - name: ubuntu
            ssh_authorized_keys:
              - ssh-rsa ...

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

There was a similar issue #212 but it was closed so maybe I'm just doing it incorrectly, is there a working example that you can share?

Environment:
K3s: v1.31.2+k3s1
clusterctl --core "cluster-api:v1.8.5" --infrastructure "metal3:v1.8.3" --bootstrap "rke2:v0.9.0" --control-plane "rke2:v0.9.0"

  • rke provider version: rke2:v0.9.0
  • OS (e.g. from /etc/os-release): Ubuntu 22.04 LTS
@mikeruu mikeruu added kind/bug Something isn't working needs-priority Indicates an issue or PR needs a priority assigning to it needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Dec 18, 2024
@alexander-demicev alexander-demicev added triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed needs-priority Indicates an issue or PR needs a priority assigning to it needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 3, 2025
@alexander-demicev alexander-demicev added this to the v0.12.0 milestone Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Development

No branches or pull requests

2 participants