diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1154ee68..57138ba8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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 diff --git a/README.md b/README.md index e2429c2c..37f38ac7 100644 --- a/README.md +++ b/README.md @@ -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`: diff --git a/deploy/twingate-operator/Chart.yaml b/deploy/twingate-operator/Chart.yaml index 0f9b24f5..6df0bfab 100644 --- a/deploy/twingate-operator/Chart.yaml +++ b/deploy/twingate-operator/Chart.yaml @@ -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