kyaml2go
K8s Go client code generator from Kubernetes resource yamls (by PrasadG193)
controller-utils
By coderanger
kyaml2go | controller-utils | |
---|---|---|
4 | 1 | |
286 | 15 | |
- | - | |
3.2 | 3.9 | |
over 2 years ago | 5 months ago | |
Go | Go | |
Apache License 2.0 | Apache License 2.0 |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
kyaml2go
Posts with mentions or reviews of kyaml2go.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-11-09.
-
We know how boring and time-consuming it is to map K8s resource YAML into an unstructured object. Here is a tool to auto-generate dynamic client go code
kyaml2go generated Go code for equivalent kubectl operations on k8s resource. It can generate code with the typed client and dynamic client. We don't have to figure out which k8s packages to import and waste time in populating the resource objects. You can give it a try at: https://kyaml2go.prasadg.dev. Whereas, https://github.com/mholt/json-to-go is totally different tool for different use case. It generated Go type definitions (structs) from JSON. But for K8s resources, we don't have to generate Go type as they are already defined in the `k8s.io/api` packages. kyaml2go helps you finding correct packages and populate the struct as per the yaml specs and call correct methods to manage the resource.
-
Generate Go programs from Kubernetes YAML
I was actually thinking of their other repo https://github.com/PrasadG193/kyaml2go
- Generate client-go code for your Custom Resource with kyaml2go
controller-utils
Posts with mentions or reviews of controller-utils.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-11-09.
-
We know how boring and time-consuming it is to map K8s resource YAML into an unstructured object. Here is a tool to auto-generate dynamic client go code
For a working example, you can take a look at https://github.com/coderanger/controller-utils/blob/main/components/template.go and the code pulled in from there (ignore that it uses vfsgen instead of go:embed, this code predates go:embed being available, same idea though).
What are some alternatives?
When comparing kyaml2go and controller-utils you can also consider the following projects:
typesense-go - Go client for Typesense: https://github.com/typesense/typesense
goobs - Go client library for OBS Studio
kcount - Count Kubernetes objects across namespaces and clusters
revgen - Speed up go:generate by auto detecting code changes
k8s - The library implements various handlers to more easier create/update/apply/patch/delete/get/list/watch k8s resources such as pods, deployments, etc. inside or outside k8s cluster.
go-client - Nvim Go client
k9s - 🐶 Kubernetes CLI To Manage Your Clusters In Style!
naml - Convert Kubernetes YAML to Golang
JSON-to-Go - Translates JSON into a Go type in your browser instantly (original)