Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,29 +72,29 @@ jobs:
run: |
git config --global user.email "action@github.com"
git config --global user.name "Github Action"
git checkout master
git checkout main
make package
git add .
git commit -m "Publishing $TAG_VERSION to the Helm repository"
git push origin master
git push origin main
env:
TAG_VERSION: ${{ steps.versioning.outputs.tag_version }}
title: Release ${{ github.ref }}

- name: Publish to to GHCR
run: |
echo ${{ secrets.HELM_TOKEN }} | helm registry login ghcr.io --username ${{ github.actor }} --password-stdin
helm push docs/onechart-${CHART_VERSION}.tgz oci://ghcr.io/opsta
helm push docs/cron-job-${CHART_VERSION}.tgz oci://ghcr.io/opsta
helm push docs/static-site-${STATIC_SITE_CHART_VERSION}.tgz oci://ghcr.io/opsta
echo ${{ secrets.HELM_TOKEN }} | helm registry login ghcr.io --username ${{ github.repository_owner }} --password-stdin
helm push docs/onechart-${CHART_VERSION}.tgz oci://ghcr.io/${{ github.repository_owner }}
helm push docs/cron-job-${CHART_VERSION}.tgz oci://ghcr.io/${{ github.repository_owner }}
helm push docs/static-site-${STATIC_SITE_CHART_VERSION}.tgz oci://ghcr.io/${{ github.repository_owner }}
env:
CHART_VERSION: ${{ steps.chart_version.outputs.chart_version }}
STATIC_SITE_CHART_VERSION: ${{ steps.chart_version.outputs.static_site_chart_version }}
- name: Preparing the next release version
run: |
git config --global user.email "action@github.com"
git config --global user.name "Github Action"
git checkout master
git checkout main

without_major_version=${CHART_VERSION#*.}
without_patch_version=${without_major_version%.*}
Expand All @@ -106,10 +106,11 @@ jobs:
sed -i "s/version: $CHART_VERSION/version: $increased_version/" charts/onechart/Chart.yaml
sed -i "s/version: $CHART_VERSION/version: $increased_version/" charts/cron-job/Chart.yaml
sed -i "s/version: $CHART_VERSION/version: $increased_version/" charts/static-site/Chart.yaml
sed -i "s/--version $CHART_VERSION/--version $increased_version/" README.md

git status
git add .
git commit -m "The next release version will be $increased_version"
git push origin master
git push origin main
env:
CHART_VERSION: ${{ steps.chart_version.outputs.chart_version }}
48 changes: 14 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,39 @@
# One chart to rule them all

This repository is a fork of the [Gimlet OneChart project](https://github.com/gimlet-io/onechart).

A generic Helm chart for your application deployments.

Because no-one can remember the Kubernetes yaml syntax.

https://gimlet.io/docs/reference/onechart-reference


## Getting started

OneChart is a generic Helm Chart for web applications. The idea is that most Kubernetes manifest look alike, only very few parts actually change.

Add the Onechart Helm repository:
You can also template and install onechart from an OCI repository as follows:

Check the generated Kubernetes yaml:

```bash
helm repo add onechart https://chart.onechart.dev
helm template my-release oci://ghcr.io/opsta/onechart --version 0.75.0 \
--set image.repository=nginx \
--set image.tag=1.19.3
```

Set your image name and version, the boilerplate is generated.
Deploy with Helm:

```bash
helm template my-release onechart/onechart \
helm install my-release oci://ghcr.io/opsta/onechart --version 0.75.0 \
--set image.repository=nginx \
--set image.tag=1.19.3
```

The example below deploys your application image, sets environment variables and configures the Kubernetes Ingress domain name:

```bash
helm repo add onechart https://chart.onechart.dev
helm template my-release onechart/onechart -f values.yaml
helm template my-release oci://ghcr.io/opsta/onechart --version 0.75.0 -f values.yaml

# values.yaml
image:
Expand All @@ -44,30 +48,9 @@ ingress:
host: my-app.mycompany.com
```

### Alternative: using an OCI repository
You can also template and install onechart from an OCI repository as follows:

Check the generated Kubernetes yaml:

```bash
helm template my-release oci://ghcr.io/gimlet-io/onechart --version 0.62.0 \
--set image.repository=nginx \
--set image.tag=1.19.3
```

Deploy with Helm:

```bash
helm install my-release oci://ghcr.io/gimlet-io/onechart --version 0.62.0 \
--set image.repository=nginx \
--set image.tag=1.19.3
```

See all [Examples](/website/docs/examples/)

## Contribution Guidelines

Thank you for your interest in contributing to the Gimlet project.
Thank you for your interest in contributing to the OneChart project.

Below are some guidelines and best practices for contributing to this repository:

Expand Down Expand Up @@ -100,8 +83,5 @@ For installation, refer to the CI workflow at `.github/workflows/build.yaml`.

## Release process

`make all` to test and package the Helm chart.
The chart archives are put under `docs/` together with the Helm repository manifest (index.yaml)
It is then served with Github Pages on https://chart.onechart.dev

Github Actions is used to automate the make calls on git tag events.
* Create a new tag with the format `v<major>.<minor>.<patch>`.
* Github Actions will be triggered and test, lint, package the Helm chart and push to the OCI repository.