-
Notifications
You must be signed in to change notification settings - Fork 295
Proposal: Switch CloudFormation to YAML #96
Comments
I think it would cut it down quite significantly and may also potentially parse better in an editor. Happy to wait until the node pools are merged. |
I prefer YAML! Let me be clear that I'm completely ok with transforming our "internal" representation of |
I'm doing the same but I tend to just use a diff tool and do I manually. The two are convertible automatically but it's a bit involved for kube-aws probably. Maybe we could support those cases via some sort of plugin system but I haven't thought it through entirely. For example kube-aws could provide some hooks for users to add their own pieces, e.g. They specify a CF snippet and we read it plus substitute config in and then merge with the stack definition. |
Would you mind sharing your idea a bit deeper? So:
|
Sure, to expand a bit more:
|
For 1., I'll be happy if templates become valid as both YAML and Go templates. I lack imagination for that, though! How would an ideal template which is both valid as YAML and Go template look like? For 2., could you share the python script which does that? For 4, I guess static values in the CloudFormation template could be converted in that ways! Indeed it would be a separate task but sounds useful anyways. |
When rendered without a
When rendered with a
Note, I've only experimented with this briefly so there's additional unneeded
|
Related documentation here on how Helm handles whitespace management. Seems like they needed to do a few different things to properly template YAML files. Potentially y'all could use the same templating engine? |
@mumoshu @c-knowles FYI, this is a tool from AWS Labs for converting AWS CloudFormation templates between JSON and YAML formats: |
I have no qualm with the change, it would make template modifications easier. Having significant PR changes on the templates I'm certainly willing to help w/ the refactor or update the PR's so they are not a blocker. |
As mush as I like YAML, JSON works better when templated as there are no whitespaces hiding around to make life miserable :) |
For the discussion, I've written a couple helm charts and I do agree it takes a bit of getting used to/debugging to get right. e.g. https://github.com/kubernetes/charts/blob/master/stable/kube2iam/templates/daemonset.yaml#L41 |
@redbaron, I agree we'd have to be careful about that sort of thing as that's one of the drawbacks of YAML. My view is we aim to make it easier to use for the end user even if a contributor's job is slightly trickier. Ultimately we could probably support both without much additional effort. The advantages of better readability, reference anchors and comment embedding might outweigh whitespace issues, what do you think? @icereval, that's interesting. I'm curious about the reason to have a template and then reference what seems to be a partial template in |
@c-knowles , I was commenting as an end user :) We change what As for advantages, I don't see how reference anchors can be useful in CF template, and we already have comments thanks to go template. |
@mumoshu @c-knowles Anyone noticed this project? https://github.com/awslabs/goformation |
@camilb Thanks for sharing! I have been never aware of it. Seemed like a promising project but.. at glance it looks like it doesn't "properly" support Refs? https://github.com/awslabs/goformation#resolving-references-ref For example I'd imagine |
Going to close this as stale. |
Quite self explanatory, is there any interest in switching to the YAML form of CloudFormation? If there is interest of at least POC, I can submit a pull request for it. If we go ahead, we'll need to pick the right timing for a merge as some other pulls will likely need updating.
The text was updated successfully, but these errors were encountered: