kubegen
kubegen copied to clipboard
kubegen – simple way to describe Kubernetes resources in a structured way, but without new syntax or magic
here is an interesting example to consider for inspirations – https://openap.is/
It would be convenient to take an object (e.g. one read from an imported file), and use only a part of it. ```yaml kubegen.Object.Select([0]["something"]): kubegen.Array.ImportFromFile: "stuff.json" ```
Consider the following snippet: ```YAML kubegen.String.Join: - kubegen.String.Lookup: images/ide-basename - '@sha256:' - kubegen.String.Lookup: images/ide-digest ``` This could be much shorter and still readable, e.g.: ```YAML kubegen.String.Join: [{.Lookup: images/ide-basename}, '@sha256:' {.Lookup:...
Right now we have something like: ```YAML Kind: kubegen.k8s.io/Module.v1alpha2 Parameters: - Name: images/ide-basename Type: String Default: errordeveloper/k9c - Name: images/ide-digest Type: String Default: ad69086ac28b91c745ecd8be2d21e1f1630d81c9eeb6967338c9f73794780475 - Name: namespaces/ide Type: String Default:...
Some object, like namespace (which kubegen doesn't actually support directly), need to be created before other objects that reference them. A solution of some kind is needed. It's easy with...
As we cannot intrude into what user may wish to do (e.g. in a ConfigMap or a CRD), we can only bail on unknown macros with `kubegen.` prefix (e.g. `kubegen.Lookup.String`...
As `(*BranchLocator).value` is a pointer to a subtree, it tracks stale subtrees. We can find other ways to fix this, perhaps rewriting the package in a way that treats the...
We can do deep validation, but perhaps using the API schema is doable, or kubeval may be a nicer option. Also, kubetest hooks could be built-in. cc @garethr
It would be very nice to have file importer, and maybe URLs. We could convert usual formats automatically, otherwise fallback to strings (in case of target being and array we...