Skip to content

Releases: blendle/kubecrt

v0.3.0

24 Apr 20:02
Compare
Choose a tag to compare

add optional versioning of charts


Here's an example of a project's configuration file:

apiVersion: v1
charts:
  stable/factorio:0.2.0:
    resources:
      requests:
        memory: 1024Mi
        cpu: 750m
    factorioServer:
      name: {{ MY_SERVER_NAME | default:"hello world!" }}

  stable/minecraft:
    minecraftServer:
      difficulty: hard

You can optionally pin your chart to a specific version, by appending :x.y.z
to the chart name.

v0.2.0

24 Apr 15:43
Compare
Choose a tag to compare

Bugfix release

  • [cdf3533] store correctly versioned chart archives

v0.1.0

24 Apr 08:09
Compare
Choose a tag to compare

kubecrt

Convert Helm charts to Kubernetes resources.

Description

kubecrt allows you to define your application's Kubernetes infrastructure based
on a single configuration file.

The configuration file contains your application name, and namespace (both can
also be set using CLI arguments), and you provide a list of charts that you want
to install, optionally providing override values for those charts.

When running kubecrt, you provide it your project's configuration file, and in
turn, it returns you the parsed Kubernetes resource files generated by the
charts.

This allows you to use Helm Charts without actually using Helm, and instead
using regular kubectl to deploy and manage your resources.

The configuration file you feed into kubecrt will be processed using the epp
templating tool, allowing you to inject variables at runtime, based on your own
conditional logic (production vs staging, etc...).

Installation

go get github.com/blendle/kubecrt

Usage

See kubecrt --help

Usage:
  kubecrt [options] CHARTS_CONFIG
  kubecrt -h | --help
  kubecrt --version
  kubecrt --config-docs

Where CHARTS_CONFIG is the location of the YAML file
containing the Kubernetes Charts configuration.

Arguments:
  CHARTS_CONFIG           Charts configuration file

Options:
  -h, --help              Show this message
  --version               Display the kubecrt version
  --namespace=<ns>        Sets the .Release.Namespace chart variable, used by
                          Charts during compilation
  -n, --name=<name>       Sets the .Release.Name chart variable, used by charts
                          during compilation
  -o, --output=<path>     Write output to a file, instead of stdout
  --config-docs           Show extended documentation on the Charts
                          configuration file

Charts Configuration File

Here's an example of a project's configuration file:

apiVersion: v1
charts:
  stable/factorio:
    resources:
      requests:
        memory: 1024Mi
        cpu: 750m
    factorioServer:
      name: {{ MY_SERVER_NAME | default:"hello world!" }}

  stable/minecraft:
    minecraftServer:
      difficulty: hard

Each Chart configuration starts with the chart location (a local path, or a
"Chart Repository" location), followed by the configuration for that chart,
which overrides the default configuration.

For the above example, see here for the default configurations:

The Chart Configuration file can also contain templated language which is
processed by epp.

In the above example, the "MY_SERVER_NAME" value is expanded using your
exported environment variables. If none is found, "hello world!" will be the
default name.

epp uses Pongo2 for its templating
functionality.