All Projects → laurci → kubernate

laurci / kubernate

Licence: MIT license
Kubernetes+Generate = Kubernate❤️

Programming Languages

typescript
32286 projects
Handlebars
879 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to kubernate

Redacted Compiler Plugin
A Kotlin compiler plugin that generates redacted toString() implementations.
Stars: ✭ 168 (+75%)
Mutual labels:  codegen
Cranelift
Cranelift code generator
Stars: ✭ 2,485 (+2488.54%)
Mutual labels:  codegen
slm-code-generation
TensorFlow code for the neural network presented in the paper: "Structural Language Models of Code" (ICML'2020)
Stars: ✭ 75 (-21.87%)
Mutual labels:  codegen
Swagger Node Codegen
An OpenAPI 3.x/Swagger 2 code generator for Node.js
Stars: ✭ 189 (+96.88%)
Mutual labels:  codegen
Openapi Codegen
OpenAPI 3.0 CodeGen plus Node.js minus the Java and emojis
Stars: ✭ 224 (+133.33%)
Mutual labels:  codegen
Generator
Use your AsyncAPI definition to generate literally anything. Markdown documentation, Node.js code, HTML documentation, anything!
Stars: ✭ 237 (+146.88%)
Mutual labels:  codegen
Codec Beam
Generate Erlang VM byte code from Haskell
Stars: ✭ 152 (+58.33%)
Mutual labels:  codegen
vox
Vox language compiler. AOT / JIT / Linker. Zero dependencies
Stars: ✭ 288 (+200%)
Mutual labels:  codegen
Kyaml2go
K8s Go client code generator from Kubernetes resource yamls
Stars: ✭ 226 (+135.42%)
Mutual labels:  codegen
generator
Any Code generator
Stars: ✭ 421 (+338.54%)
Mutual labels:  codegen
Graphql Typed Client
A tool that generates a strongly typed client library for any GraphQL endpoint. The client allows writing GraphQL queries as plain JS objects (with type safety, awesome code completion experience, custom scalar type mapping, type guards and more)
Stars: ✭ 194 (+102.08%)
Mutual labels:  codegen
Artist
An artist creates views. Artist is a Gradle plugin that codegens a base set of Android Views.
Stars: ✭ 208 (+116.67%)
Mutual labels:  codegen
Quick Protobuf
A rust implementation of protobuf parser
Stars: ✭ 244 (+154.17%)
Mutual labels:  codegen
Rust Bindgen
Automatically generates Rust FFI bindings to C (and some C++) libraries.
Stars: ✭ 2,453 (+2455.21%)
Mutual labels:  codegen
gg
General Golang Code Generator
Stars: ✭ 88 (-8.33%)
Mutual labels:  codegen
Xstate Codegen
A codegen tool for 100% TS type-safety in XState
Stars: ✭ 158 (+64.58%)
Mutual labels:  codegen
Aws Mobile Appsync Sdk Ios
iOS SDK for AWS AppSync.
Stars: ✭ 231 (+140.63%)
Mutual labels:  codegen
DotNetJS
Consume C# in JavaScript with comfort: single-file UMD library, auto-generated 2-way bindings and type definitions
Stars: ✭ 551 (+473.96%)
Mutual labels:  codegen
evon
Fast and versatile event dispatcher code generator for Golang
Stars: ✭ 15 (-84.37%)
Mutual labels:  codegen
Lightbeam
Lightbeam has moved and now lives in the Wasmtime repository!
Stars: ✭ 253 (+163.54%)
Mutual labels:  codegen

kubernate logo

Kubernetes + Generate = Kubernate❤️

Kubernate is a Kubernetes YAML generator that can be used as an alternative to other popular tools like Helm. Kubernate is distributed as a library and as a CLI, both working together to achieve one goal: Kubernetes as Code.

The kubernate homepage is a great place to get more information. Also checkout the getting started guide for a quick intro in how Kubernate works.

Make sure to join our Discord community server to get the latest updates about the development of Kubernate. Here you can also directly chat with contributors if you need help or have any questions.

The official package is available on NPM but also on GitHub packages. Make sure to read about the versioning policy (below) before you start using Kubernate.

Helm sucks! We can all agree, right?

Right? Maybe we aren't on the same page. I am not bringing a new concept to the table, but I am bringing a new perspective. Why exactly is Helm so bad?

The problem is not in Helm, but in the way Helm is used. Let's zoom out a bit. People used to create folders with YAMLs inside and just kubectl apply. When there was a need for any kind of automation, they started using sed, awk, grep and friends to manipulate what was basically just a text file. You can imagine, stuff got out of hand pretty quick.

Helm solves this using charts. A chart is a collection of Kubernetes resources that can be deployed as a single unit. The trick is that those resources are also templated. Helm uses a template engine to generate the YAMLs and then applies them to the cluster.

Awesome, right? Yes and no. With Helm the problem of text manipulation is solved, but something is still missing. The old school bash automations had soemthing that is very hard to achieve with Helm. It is actually a script, an actual piece of code that gets executed, so you can take decisions based on inputs or outputs of other scripts, or on current state of the cluster ... heck you can even make network requests and do stuff based on the response. I think you get my point. You can't do everything with a template. Even some moderately complex stuff is pretty hard to do with Helm.

This sounds like Pulumi?

Yes :) I actually used Pulumi in a project to manage a development Kubernetes cluster. It is a great infra-as-code tool, but it has a few problems when it comes to managing Kubernetes resources:

  • It tries to manage it's own state on top of Kubernetes (which is also declarative). This is not very useful for most of the time. Also sometimes the state of the cluster gets out of sync with the state of the Stack.
  • It becomes very slow when you have a lot of resources (this happened to me because I was managing a development cluster with feature-branch preview environments).
  • The programming model is not very intuitive. It is async and declarative at the same time, a bit weird...; and also very OOP (which is something I personally don't like, but let's not get into that talk :]).
  • When you deploy somehting to a kubernetes cluster, the process will wait for everthing to be well and healthy. This is generally a good thing, until you have one ImagePullBackOff that is waited for 10 minutes by all the other deployment items.

Other then that, it is a great tool and a source of inspiration :)

So what is Kubernate?

It is a bit of both :) Kubernate is a library that is used to generate Kubernetes YAML files with ease. Think like Helm but with actual code. You have the power to generate anything you want while using any kind of input you want. Everything is evaluated at "build" time and the output is 100% static valid Kubernetes YAML. You also get to leverage the tooling built for Typescript (which is actually very good) while building and DEBUGGING your deployments. You can also publish "libraries" built with Kubernate to NPM and other Kubernate-based projects can use them as building blocks.

There is no programming model to speak of :) just write code and use it. At the end the tool runs the code :) You can even skip this step and just build the Typescript into javascript and run it with Node. You can even make your own app on top of Kubernate to manage your deployments.

The library itself is very simple and it is also very fast. It is written in Typescript and it is very easy to use. It is also very easy to learn and understand. Everything is typed! Just follow the intellisense.

Versioning

Kubernate has a lot of components auto-generated from the Kubernetes API. This is great because it means it can always be accurate in relation to the Kubernetes API Server that you are using, but it also means that the versioning is a bit complicated.

Kubernate uses SemVer: the major and the minor are always the major of the Kubernetes API version targeted; the patch is autoincremented for every release and it does not match the Kubernetes API version targeted.

The release strategy is the following:

  • periodic releases (runs every day) for each Kubernetes minor version >= 1.18; this always picks the latest patch from each version and is checked against the latest release of Kubernate for that Kubernetes version; if a new patch was released, then a new patch of Kubernate will be built with the new Kubernetes version
  • manual releases will patch every current releases of Kubernate

Is very important to lock the version of the package to the version of Kubernetes you are targeting! For example, if you use Kubernetes 1.19 your package.json's dependencies should include "kubernate": "~1.19".

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].