cruise-automation / isopod

An expressive DSL and framework for Kubernetes configuration without YAML
Apache License 2.0
482 stars 32 forks source link

Reason for no YAML output options? #104

Closed johnSchnake closed 2 years ago

johnSchnake commented 2 years ago

I realize that part of the motivation for this project was to avoid YAML when possible.

I'm looking at potentially building a Sonobuoy plugin using isopod mainly for the convenient kube.* methods. However, there are times I'd like to be able to compare objects in their yaml form or print the raw yaml.

I see there is a "json" option instead of the protobuf default, why not also YAML? Trying to understand if it was a technical reason or not.

cxuu commented 2 years ago

Duplicate of https://github.com/cruise-automation/isopod/issues/62.

Have you tried print(yaml.marshal(my_obj))?

johnSchnake commented 2 years ago

Oh great, thanks. I see now it is part of your predeclared modules.

Thanks for the snippet too.