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

Support hyphen on attribute name #1326

Closed
leon-andria opened this issue May 16, 2024 · 1 comment
Closed

Support hyphen on attribute name #1326

leon-andria opened this issue May 16, 2024 · 1 comment

Comments

@leon-andria
Copy link

RKE2 configuration has hyphen on the attribute name as in the link below: https://docs.rke2.io/install/configuration?_highlight=config#configuration-file

Is there a way for KCL to support it?
For example:
write-kubeconfig-mode: "0644"

@leon-andria
Copy link
Author

It sounds obvious but below is the answer:
`import yaml

rke2Config = {
'write-kubeconfig-mode' = "0644"
'tls-san' = ["foo.local"]
'node-label' = ["foo=bar", "something=amazing"]
debug = bool("true")
}

yaml.dump_to_file(rke2Config, "output.yaml")`

The confusion was to think yaml rather than KCL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant