garethr / garethr-kubernetes

Puppet types and provider for managing Pods, ReplicationControllers, Services and more in Kubernetes
http://garethr.github.io/garethr-kubernetes
Apache License 2.0
28 stars 28 forks source link

Generate yaml/json from manifest #21

Closed jaxxstorm closed 7 years ago

jaxxstorm commented 7 years ago

It's currently possible to generate a puppet manifest from a kubernetes manifests using puppet kubernetes convert

It is possible to do the reverse? IE, we write a puppet manifest, and then do puppet kubernetes create to generate the yaml/json?

garethr commented 7 years ago

So, this is what the module does under the hood, but this isn't currently exposed to end users. The YAML files are literally the wire format that's sent to the API. It would be fairly straightforward to have this as an output as well as just sending to the API, though it means spelunking in the kubernetes Ruby client a little.

jaxxstorm commented 7 years ago

I guess we'd then just create a puppet face similar to the kubernetes convert one? I'll see if I can find time to figure this out

garethr commented 7 years ago

I've just added a compile subcommand in https://github.com/garethr/garethr-kubernetes/pull/33. Once I've added something to the README I'll merge.