kleinwuerfel

Crates.iokleinwuerfel
lib.rskleinwuerfel
version0.4.0
sourcesrc
created_at2022-10-13 21:49:20.546438
updated_at2022-10-25 20:10:50.111951
descriptionTool to interact with minikube and deploy a set of helm charts.
homepage
repositoryhttps://github.com/icepuma/kleinwuerfel
max_upload_size
id687502
size43,363
Stefan Ruzitschka (icepuma)

documentation

README

kleinwuerfel

https://crates.io/crates/kleinwuerfel https://github.com/icepuma/kleinwuerfel/actions/workflows/ci.yaml

Opinionated command line tool to interact with minikube. An easy way to deploy a given set of helm charts.

"kleinwuerfel" means more or less "minikube" in German.

InstallationUsage

Prerequisites

As kleinwuerfel interacts with other command line tools, you have install:

  • minikube
  • helm
  • kubectl

Installation

  • cargo
    cargo install kleinwuerfel
    
  • Precompiled binary

Usage

Config file

[minikube]
# Amount of CPUs
cpus = 4

# Memory in MB
memory = 8192

# Optional -> added via --set to each "helm upgrade"
[default_values]
"imageRegistry.username" = "${env.HARBOR_USERNAME}"
"imageRegistry.password" = "${env.HARBOR_SECRET}"

[[helm_chart_repo]]
# Name to be referenced in [[helmchart]] blocks
name = "helm-chart-repo-1"

# URL for "helm repo add ..." and "helm login" when "username" and "password" are both set
url = "some.registry.url/chartrepo"

# Optional
username = "${env.HARBOR_USERNAME}"

# Optional
password = "${env.HARBOR_SECRET}"

[[helmchart]]
# Reference to name of [[helm_chart_repo]] block
helm_chart_repo = "helm-chart-repo-1"
# Is combined for "helm upgrade ... helm-chart-1 helm-chart-repo-1/helm-chart-1"
name = "helm-chart-1"
# Port fowarding
ports = [8080, 9999]

# Optional -> added via --set to "helm upgrade". Overrides "default_values"
[values]
"some.additional.value" = "true"

[[helmchart]]
# Reference to name of [[helm_chart_repo]] block
helm_chart_repo = "helm-chart-repo-1"
# Is combined for "helm upgrade ... helm-chart-1 helm-chart-repo-1/helm-chart-2"
name = "helm-chart-2"

Up (start minikube and deploy helm charts)

  • If minikube status exits with 0, we assume that it is already running and skip the minikube start part
kleinwuerfel up [--no-deploy]

Down

  • Calls minikube delete right now
kleinwuerfel down

Ideas

  • Better error handling
  • More testing
Commit count: 51

cargo fmt