-
Notifications
You must be signed in to change notification settings - Fork 18
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
Final YAML file doesn't correctly escape keys #15
Comments
Ops, it seems like it's a |
Is there an open issue on yaml-rust for this? In either case, I'm happy to leave this issue open to at least remind us to update our yaml-rust dependency when the bug is fixed. |
I plan to do a PR for this issue on |
To understand why we want to do this, please refer to this issue on ktmpl repository (a way to have templates for kubernetes): InQuicker/ktmpl#15 The problem applies only to string used as keys, but given that the emitters right now doesn't differentiate the two cases for string, I think is better to do it also for values instead of introducing branching and/or flag variables (can't think of cleaner solution for now).
This is fixed in the latest release: https://github.com/jimmycuadra/ktmpl/releases/tag/0.8.0 I don't have access to this repo anymore, so please close the issue if it's solved for you. Thanks! |
To understand why we want to do this, please refer to this issue on ktmpl repository (a way to have templates for kubernetes): InQuicker/ktmpl#15 The problem applies only to string used as keys, but given that the emitters right now doesn't differentiate the two cases for string, I think is better to do it also for values instead of introducing branching and/or flag variables (can't think of cleaner solution for now).
OS: Ubuntu 16.04
ktmpl: 0.7.0
kubernetes: 1.6.0
Hi, it seems that yaml keys starting with a dot
.
aren't quoted and this can cause problem with kubernetes (and it did indeed!)Given this sample template file:
Will result in:
And then if you try to
kubernetes apply
the generated file, it will complain that something is wrong which will also cause a corruption (at least that what it seems like if you try to restart minikube afterwards).Hope it was useful :)
The text was updated successfully, but these errors were encountered: