Skip to content

marianogg9/helmfiling

Repository files navigation

Helmfile(ing)

Running an example Helmfile release deploying httpbin app in Minikube.

Please have a look at the blog article I wrote for a better overview.

Schema

.
├── README.md
├── charts
│   └── httpbin
│       ├── Chart.yaml
│       └── templates
│           ├── deployment.yaml
│           ├── service.yaml
│           └── serviceaccount.yaml
├── default-values.yaml
├── environments.yaml
├── example-environment-values.yaml
├── helmfile.yaml
└── values.yaml.gotmpl
  • charts/ contains a minimal httpbin Helm chart definition and all the resources' templates.
  • default-values.yaml is the default environment set of values.
  • environments.taml defines both default and example environments with their respective values files.
  • example-environment-values.yaml is the example environment set of values.
  • helmfile.yaml is where all releases are defined.
  • values.yaml.gotmpl uses GO templating to reference different values. This template will be used as a centralised definition to be used by different environments.

Installation

I am using a Mac, so every installation is pointing to using that OS; all the below have their options when it comes to different platforms.

  • As a first prerequisite, Minikube.

    brew install minikube
  • Kubectl.

    curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl"
  • Then Helmfile

    brew install helmfile

Deploying

Start Minikube cluster.

minikube start

Clone this repository.

git clone https://github.com/marianogg9/helmfiling.git
cd helmfiling

Run Helmfile in dry-run mode (to see what will be deployed).

helmfile -e example diff

Then deploy resources.

helmfile -e example apply

To check deployment status.

helmfile status

And many more CLI commands to explore.

Updating

To modify a value, release, template or resource, just update its definition and visualize future changes.

helmfile -e example diff

And then deploy.

helmfile -e example apply

Cleaning up

Once finished, let's clean all up by deleting Helmfile releases (all resources defined in a release will be deleted).

helmfile -e example destroy

Keep in mind the above destroy command will not ask for a confirmation.

Then delete Minikube cluster.

minikube delete --all