jkcfg / jk

Configuration as Code with ECMAScript
https://jkcfg.github.io
Apache License 2.0
404 stars 30 forks source link

Kubernetes Resource Typescript Generation #353

Open RichiCoder1 opened 4 years ago

RichiCoder1 commented 4 years ago

Just stumbled across this project and already a general fan! I'm currently using cdk8s, which has an import feature which allows for generating typescript class/validation from kubernetes resource definitions and CRDs. Is this something JK would consider?

Related #54

squaremo commented 4 years ago

Yes I think so. If it can be written as, or compiled to, pure JavaScript, it could just be a module to be called with (say),

jk run -m @jkcfg/kubernetes/importtypes

This seems plausible -- it's just recursion over a YAML structure, and jk can read YAMLs. But it may not be trivial!