Skip to content

Commit

Permalink
update readme, test data / examples and build pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
tuunit committed May 13, 2023
1 parent 3371515 commit 558f5e6
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
types: [completed]
branches: [main]

name: CD
name: Build

jobs:
cd:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
run: make install
- uses: helm/[email protected]
- name: Run Helm Compose
run: helm compose up -f testdata/helm-compose.yaml
run: helm compose up -f examples/simple-compose.yaml
35 changes: 28 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,45 @@
![helm-compose-banner](https://user-images.githubusercontent.com/18513179/212496531-1d166236-ed88-411d-8403-ad1f94d28846.png)

# Helm Compose

[![Build Status](https://github.com/seacrew/helm-compose/actions/workflows/build.yml/badge.svg)](https://github.com/seacrew/helm-compose/actions/workflows/build.yml)
[![Go Report Card](https://goreportcard.com/badge/github.com/seacrew/helm-compose)](https://goreportcard.com/report/github.com/seacrew/helm-compose)
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/seacrew/helm-compose)

# IMPORTANT NOTICE: THIS IS A WORK IN PROGRESS
As of yet, this plugin should __NOT__ be treated as a stable tool and shouldn't be used in an production environment.

As of yet, this plugin should **NOT** be treated as a stable tool and shouldn't be used in an production environment.

## About

Helm Compose is a tool for managing multiple releases for one or many different Helm charts. It is an extension of the package manager idea behind Helm and is heavily inspired by Docker Compose.

## Installation

Install a specific version (recommended). Click [here](https://github.com/seacrew/helm-compose/releases/latest) for the latest. version.

```
helm plugin install https://github.com/seacrew/helm-compose --version 1.0.0-alpha.2
```

Install latest unstable version from main branch.

```
helm plugin install https://github.com/seacrew/helm-compose
```

## Quick Start Guide

Helm Compose makes it easy to define a Compose file containing a list of Releases and necessary Repositories for the charts you use.

Install your releases:
Install your releases:

```bash
$ helm compose up -f helm-compose.yaml
```

Uninstall your releases

```bash
$ helm compose down -f helm-compose.yaml
```
Expand Down Expand Up @@ -60,22 +73,27 @@ repositories:
```
## Compose file reference
The compose file is a [YAML](https://yaml.org/) file for defining your Helm releases and necessary Helm repositories. This allows you manage multiple releases. Scenarios in which this might be useful:
- Multiple deployments of the same helm chart but with different versions (in the same or different namespaces)
- Multiple interdependent helm chart deployments (in the same or different namespaces)
- Multiple deployments in multiple k8s clusters
- Multiple deployments of the same helm chart but with different versions (in the same or different namespaces)
- Multiple interdependent helm chart deployments (in the same or different namespaces)
- Multiple deployments in multiple k8s clusters
### `state`
To keep track of the changes in your compose file. A snapshot / state of your compose file is stored every time you make an update. Similar to how helm stores single release information as a secret inside the same namespace as the release. With helm compose you have two options:

To keep track of the changes in your compose file. A snapshot / state of your compose file is stored every time you make an update. Similar to how helm stores single release information as a secret inside the same namespace as the release. With helm compose you have two options:

`local` (default): Stores the 10 lastest states inside the .hcstate directory

```yaml
state:
name: mycompose
storage: local
```

`kubernetes`: Similar to helm itself this option stores the 10 latest states as secrets inside a specified namespace

```yaml
state:
name: mycompose
Expand All @@ -84,7 +102,9 @@ state:
```

### `releases`

You can define as many releases as you want to treat them as a single entity. All fields are optional except for the chart.

```yaml
releases:
wordpress:
Expand All @@ -100,9 +120,10 @@ releases:
```

### `repositories`

You can define as many repositories as you want and need for your charts to be available.

```yaml
repositories:
bitnami: https://charts.bitnami.com/bitnami
```
```
21 changes: 21 additions & 0 deletions examples/simple-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: 1.0

state:
name: simple
storage: local

releases:
default:
chart: bitnami/nginx
chartVersion: 14.2.1
jekyll:
chart: bitnami/nginx
chartVersion: 14.2.1
values:
cloneStaticSiteFromGit:
enabled: true
repository: https://github.com/jekyll/jekyll
branch: gh-pages

repositories:
bitnami: https://charts.bitnami.com/bitnami
9 changes: 9 additions & 0 deletions examples/values/wordpress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
wordpressUsername: user
wordpressEmail: [email protected]
allowEmptyPassword: false
mariadb:
primary:
persistence:
enabled: false
persistence:
enabled: false
34 changes: 34 additions & 0 deletions examples/wordpress-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: 1.0

state:
name: wordpress
storage: local

releases:
site1:
chart: bitnami/wordpress
chartVersion: 14.3.2
namespace: site1
createNamespace: true
valueFiles:
- ./values/wordpress.yaml
values:
wordpressBlogName: Awesome Site
wordpressPassword: awesome
mariadb.auth:
rootPassword: "awesome-password"
site2:
chart: bitnami/wordpress
chartVersion: 14.3.2
namespace: site2
createNamespace: true
valueFiles:
- ./values/wordpress.yaml
values:
wordpressBlogName: Super Awesome Site
wordpressPassword: super-awesome
mariadb.auth:
rootPassword: "super-awesome-password"

repositories:
bitnami: https://charts.bitnami.com/bitnami
23 changes: 0 additions & 23 deletions testdata/helm-compose.yaml

This file was deleted.

0 comments on commit 558f5e6

Please sign in to comment.