Skip to content

Commit

Permalink
feat: Publish versioned helm chart to GitHub OCI reposiotry (#479)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekampf authored Dec 23, 2024
1 parent e8adb5d commit 971ba7e
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 1 deletion.
34 changes: 34 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,40 @@ jobs:
body: ${{ steps.changelog.outputs.changes }}
token: ${{ secrets.GITHUB_TOKEN }}

release_prod_helm:
runs-on: ubuntu-latest
name: Release PROD Helm Chart
needs: [create_release, release_prod]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: ${{ env.POETRY_VERSION }}
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

- uses: azure/setup-helm@v4.2.0
- uses: chrisdickinson/setup-yq@latest

- name: Set env vars
run: |
echo "CHART_VERSION=$(poetry version -s)" >> $GITHUB_ENV
- name: Helm Publish (Github)
env:
REGISTRY: ghcr.io
run: |
echo ${{ secrets.GITHUB_TOKEN }} | helm registry login -u twingate --password-stdin $REGISTRY
helm package deploy/twingate-operator --version $CHART_VERSION
helm push twingate-operator-$CHART_VERSION.tgz oci://$REGISTRY/twingate/helmcharts
release_prod:
name: Release PROD
runs-on: ubuntu-latest
Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,25 @@ Trust Network.

## Installation

### Helm via OCI (recommended)

The operator's helm chart is published to the following OCI repository:
`oci://ghcr.io/twingate/helmcharts/twingate-operator`

Follow these steps to install the operator:

[default-values-yaml]: https://github.com/Twingate/kubernetes-operator/blob/main/deploy/twingate-operator/values.yaml

1. Create a custom `values.yaml` (You can start by copying the [default values .yaml file][default-values-yaml]):
1. Edit the settings in the file and specifically `twingateOperator`.
1. Deploy (add `-n [namespace]` if you want to install to a specific namespace):

```bash
helm upgrade twop oci://ghcr.io/twingate/helmcharts/twingate-operator --install --wait -f ./values.yaml
```

### Helm by closing the git repository

1. Clone this repository to your local machine.
1. Use the `helm` chart in `./deploy/twingate-operator`:

Expand Down
5 changes: 4 additions & 1 deletion deploy/twingate-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ apiVersion: v2
name: twingate-operator
description: A Helm chart for installing twingate-operator
type: application
version: 0.1.11
version: 0.1.12 # This version value no longer used - its overriden when publishing the OCI in `release.yaml` CI workflow
home: https://twingate.com
sources:
- https://github.com/Twingate/kubernetes-operator

0 comments on commit 971ba7e

Please sign in to comment.