Skip to content

Commit

Permalink
docs: further documentation changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian May committed Nov 28, 2024
1 parent 02318f0 commit 409c277
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 22 deletions.
64 changes: 44 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# helmci

helmci is a program that takes a set of helm release values, typically from a dedicated repo, and automatically deploys them to a Kubernetes cluster.
helmci is a program that takes a set of helm release values, typically from a
dedicated repo, and automatically deploys them to a Kubernetes cluster.

## Quick Start

Expand All @@ -16,8 +17,10 @@ helm plugin install https://github.com/databus23/helm-diff

Edit kubectl context in `example/helm-values/envs/dev/dev-cluster/config.yaml`.

There are three output methods. By default the text output is used if nothing else specified.
Add `--output text` (gitlab flavoured text), `--output slack` or `--output tui` full screen text mode to the following commands. By default `text` is used.
There are three output methods. By default the text output is used if nothing
else specified. Add `--output text` (gitlab flavoured text), `--output slack`
or `--output tui` full screen text mode to the following commands. By default
`text` is used.

The `tui` full screen text mode has the following keyboard bindings:

Expand All @@ -31,7 +34,7 @@ The `tui` full screen text mode has the following keyboard bindings:
- `left`/`right` scroll the details pane left/right.

Edit the `./example/helm-values/envs/dev/dev-cluster/config.yaml` file and
insert the arn of an available cluster.
insert the context of an available cluster.

Run commands such as:

Expand All @@ -57,7 +60,8 @@ Use `--cluster=dev-cluster` to limit releases to that cluster.

Use `--env=dev` to limit releases to that env.

Use `--release-filter` to apply more filters. Supported are `chart_type`, `chart_name` and `release_name`.
Use `--release-filter` to apply more filters. Supported are `chart_type`,
`chart_name` and `release_name`.

Example:

Expand Down Expand Up @@ -118,11 +122,20 @@ The helm diff will compare against the previous helm install. If you made
changes to the kerbernetes yaml files directly, then changes may not be
detected, and you might have to bypass the diff check.

The `-b` or `--bypass-upgrade-on-no-changes` option allows you to bypass the upgrade process if no changes are detected. This can be useful to save time and resources when you are confident that no changes have been made to the release values.
The `-b` or `--bypass-upgrade-on-no-changes` option allows you to bypass the
upgrade process if no changes are detected. This can be useful to save time and
resources when you are confident that no changes have been made to the release
values.

The `-y` or `--yes` suboption can be used in conjunction with the `--bypass-upgrade-on-no-changes` option to automatically proceed with the upgrade even if no changes are detected. This is useful for automated scripts where manual intervention is not possible.
The `-y` or `--yes` suboption can be used in conjunction with the
`--bypass-upgrade-on-no-changes` option to automatically proceed with the
upgrade even if no changes are detected. This is useful for automated scripts
where manual intervention is not possible.

The `-n` or `--no` suboption can be used in conjunction with the `--bypass-upgrade-on-no-changes` option to automatically skip the upgrade if no changes are detected. This is useful when you want to ensure that upgrades are only performed when necessary without manual intervention.
The `-n` or `--no` suboption can be used in conjunction with the
`--bypass-upgrade-on-no-changes` option to automatically skip the upgrade if no
changes are detected. This is useful when you want to ensure that upgrades are
only performed when necessary without manual intervention.

If neither `--no` or `--yes` are supplied then `--no` is assumed.

Expand All @@ -145,18 +158,19 @@ You can have zero or more environments.

An environment can have zero or more clusters.

A cluster can have zero or more releases, which corresponds to a helm release that gets installed.
A cluster can have zero or more releases, which corresponds to a helm release
that gets installed.

### Environment config

```yaml
cat example/helm-values/envs/dev/config.yaml
locked: false
```
- Setting `locked` to true disables all releases under the env.

The name of the directory corresponds to the name of the environment. In the above case it will be called `dev`.
The name of the directory corresponds to the name of the environment. In the
above case it will be called `dev`.

### Cluster config

Expand All @@ -170,11 +184,14 @@ locked: false
- `context` is the `--kube-context` parameter passed to helm.
- Setting `locked` to true disables all releases under the cluster dir.

The name of the directory corresponds to the name of the cluster. Which can be different from the context value provided. In the above example, the cluster is called `dev-cluster` and uses the parameter `--kube-context 1234-dev-cluster`.
The name of the directory corresponds to the name of the cluster. Which can be
different from the context value provided. In the above example, the cluster is
called `dev-cluster` and uses the parameter `--kube-context 1234-dev-cluster`.

### Release config

For example `example/helm-values/envs/dev/dev-cluster/kube-prometheus-stack/config.yaml`:
For example
`example/helm-values/envs/dev/dev-cluster/kube-prometheus-stack/config.yaml`:

```yaml
auto: true
Expand All @@ -194,15 +211,19 @@ depends: []
- Setting `locked` to false disables all deploys.
- `namespace` is the kubernetes namespace to use for deploys.
- `release` is the release name for the helm chart.
- `depends` is a list of releases that must be installed first. `$namespace/$release` format.
- `depends` is a list of releases that must be installed first.
`$namespace/$release` format.
- `release_chart` is how to find the chart to install (see below).

Note: the value of the `release` is used as the release name, not the name of the directory.
Note: the value of the `release` is used as the release name, not the name of
the directory.

The `values.yaml` and (optionally) `values.secrets` files contain the helm values. Note `values.secrets` can be encrypted, but if so must be decrypted using whatever mechanism before running helmci.
The `values.yaml` and (optionally) `values.secrets` files contain the helm
values. Note `values.secrets` can be encrypted, but if so must be decrypted
using whatever mechanism before running helmci.

There is also a `lock.json` file for each release that contains meta
information for the downloaded chart.
information for the downloaded chart. This file is managed automatically.

### Helm chart config

Expand Down Expand Up @@ -237,7 +258,8 @@ release_chart:

## History

There are a number of existing solutions of deploying stuff on a kubernetes cluster. The main contenders are:
There are a number of existing solutions of deploying stuff on a kubernetes
cluster. The main contenders are:

- [argocd](https://argoproj.github.io/cd/)
- [spinnaker](https://spinnaker.io/)
Expand All @@ -246,11 +268,13 @@ There are a number of existing solutions of deploying stuff on a kubernetes clus
Unfortunately, these all had limitations:

- argocd, while it supports helm charts, it does not support saving helm values in git.
- Can overcome this issue by creating git repo of charts containing helm sub-charts, but this is ugly and requires modifying the helm values.
- Can overcome this issue by creating git repo of charts containing helm
sub-charts, but this is ugly and requires modifying the helm values.
- spinnaker seems rather heavy weight to install, haven't succeeded yet.
- harness is mostly proprietary solution.

As a result a Python program was written as an alternative solution. This is a rewrite of the Python program.
As a result a Python program was written as an alternative solution. The Python
program was never released outside EA. This is a rewrite of the Python program.

## Current Limitations

Expand Down
2 changes: 1 addition & 1 deletion example/helm-values/envs/dev/dev-cluster/config.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
context: dev-cluster
context: arn:aws:eks:us-east-2:136983895179:cluster/muspelheim
locked: false
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ release_chart:
type: helm
repo_url: https://prometheus-community.github.io/helm-charts
chart_name: kube-prometheus-stack
chart_version: 35.5.1
chart_version: '35.5.1'
depends: []

0 comments on commit 409c277

Please sign in to comment.