Skip to content

Commit 6535cf9

Browse files
v4 helm chart and docs (#2195)
* v4 helm chart * ignore packaged chart archives * chart publish prep * add helm chart release workflow * enable draft gh release * stateful services should be statefulsets * expose internal otel config * podAnnotations for all services * postgresql.extraArgs * postgresql -> postgres * add clickhouse vars as extraEnv examples * support external secrets * improve clickhouse config improve clickhouse config * disable internal otel config by default * allow nil internal config * fix gh release permission * fix validation step for ci * secrets.enabled * simplify secret keys * bump chart version * fix contents permission * remove redundant print steps * remove helm release heading * optimise clickhouse config * support wait-for-it.sh * fix ch overrides * add low-resource ch overrides to compose setup * supervisor bootstrap config * disable otel trace logging * retain shared volume * enable clickhouse for compose setup * disable trace logging * bump chart * add extraManifests * telemetry config * add repo namespace config * scope cluster role to namespace to support multiple installs * external s3 config * values tweaks * helm docs * bump chart * set contents read permission Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * add object store root credentials warning * run init containers as uid 1000 * pass ch user creds with explicit flag * improve ingress anotation handling * remove duplicate colume claim block * trim htpasswd auth * lock curl images used for tests * add v4-beta package version warning * make schema and sslmode configurable * package tag info -> warning * improve secrets config example * update docs * bump version * bump webapp reqs to account for ch * make ch creds more easily configurable * publish ch http port * example point at latest beta chart * small docs tweaks --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent aaf40c3 commit 6535cf9

36 files changed

+4018
-19
lines changed

.github/workflows/release-helm.yml

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
name: 🧭 Helm Chart Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'helm-v*'
7+
workflow_dispatch:
8+
inputs:
9+
chart_version:
10+
description: 'Chart version to release'
11+
required: true
12+
type: string
13+
14+
env:
15+
REGISTRY: ghcr.io
16+
CHART_NAME: trigger
17+
18+
jobs:
19+
lint-and-test:
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Set up Helm
28+
uses: azure/setup-helm@v4
29+
with:
30+
version: "3.18.3"
31+
32+
- name: Lint Helm Chart
33+
run: |
34+
helm lint ./hosting/k8s/helm/
35+
36+
- name: Render templates
37+
run: |
38+
helm template test-release ./hosting/k8s/helm/ \
39+
--values ./hosting/k8s/helm/values.yaml \
40+
--output-dir ./helm-output
41+
42+
- name: Validate manifests
43+
uses: docker://ghcr.io/yannh/kubeconform:v0.7.0
44+
with:
45+
entrypoint: '/kubeconform'
46+
args: "-summary -output json ./helm-output"
47+
48+
release:
49+
needs: lint-and-test
50+
runs-on: ubuntu-latest
51+
permissions:
52+
contents: write # for gh-release
53+
packages: write
54+
steps:
55+
- name: Checkout
56+
uses: actions/checkout@v4
57+
58+
- name: Set up Helm
59+
uses: azure/setup-helm@v4
60+
with:
61+
version: "3.18.3"
62+
63+
- name: Log in to Container Registry
64+
uses: docker/login-action@v3
65+
with:
66+
registry: ${{ env.REGISTRY }}
67+
username: ${{ github.actor }}
68+
password: ${{ secrets.GITHUB_TOKEN }}
69+
70+
- name: Extract version from tag or input
71+
id: version
72+
run: |
73+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
74+
VERSION="${{ github.event.inputs.chart_version }}"
75+
else
76+
VERSION="${{ github.ref_name }}"
77+
VERSION="${VERSION#helm-v}"
78+
fi
79+
echo "version=$VERSION" >> $GITHUB_OUTPUT
80+
echo "Releasing version: $VERSION"
81+
82+
- name: Check Chart.yaml version matches release version
83+
run: |
84+
VERSION="${{ steps.version.outputs.version }}"
85+
CHART_VERSION=$(grep '^version:' ./hosting/k8s/helm/Chart.yaml | awk '{print $2}')
86+
echo "Chart.yaml version: $CHART_VERSION"
87+
echo "Release version: $VERSION"
88+
if [ "$CHART_VERSION" != "$VERSION" ]; then
89+
echo "❌ Chart.yaml version does not match release version!"
90+
exit 1
91+
fi
92+
echo "✅ Chart.yaml version matches release version."
93+
94+
- name: Package Helm Chart
95+
run: |
96+
helm package ./hosting/k8s/helm/ --destination /tmp/
97+
98+
- name: Push Helm Chart to GHCR
99+
run: |
100+
VERSION="${{ steps.version.outputs.version }}"
101+
CHART_PACKAGE="/tmp/${{ env.CHART_NAME }}-${VERSION}.tgz"
102+
103+
# Push to GHCR OCI registry
104+
helm push "$CHART_PACKAGE" "oci://${{ env.REGISTRY }}/${{ github.repository_owner }}/charts"
105+
106+
- name: Create GitHub Release
107+
id: release
108+
uses: softprops/action-gh-release@v1
109+
if: github.event_name == 'push'
110+
with:
111+
tag_name: ${{ github.ref_name }}
112+
name: "Helm Chart ${{ steps.version.outputs.version }}"
113+
body: |
114+
### Installation
115+
```bash
116+
helm upgrade --install trigger \
117+
oci://${{ env.REGISTRY }}/${{ github.repository_owner }}/charts/${{ env.CHART_NAME }} \
118+
--version ${{ steps.version.outputs.version }}
119+
```
120+
121+
### Changes
122+
See commit history for detailed changes in this release.
123+
files: |
124+
/tmp/${{ env.CHART_NAME }}-${{ steps.version.outputs.version }}.tgz
125+
token: ${{ secrets.GITHUB_TOKEN }}
126+
draft: true
127+
prerelease: true

docs/docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@
178178
"pages": [
179179
"self-hosting/overview",
180180
"self-hosting/docker",
181+
"self-hosting/kubernetes",
181182
{
182183
"group": "Environment variables",
183184
"pages": ["self-hosting/env/webapp", "self-hosting/env/supervisor"]

docs/self-hosting/docker.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ To run the webapp and worker components, you will need:
4242

4343
This machine will host the webapp, postgres, redis, and related services.
4444

45-
- 2+ vCPU
46-
- 4+ GB RAM
45+
- 3+ vCPU
46+
- 6+ GB RAM
4747

4848
### Worker
4949

@@ -345,6 +345,10 @@ TRIGGER_IMAGE_TAG=v4.0.0-v4-beta.21
345345
346346
This section highlights some of the CLI commands and options that are useful when self-hosting. Please check the [CLI reference](/cli-introduction) for more in-depth documentation.
347347
348+
<Warning>
349+
While v4 is in beta, always use `@v4-beta` instead of `@latest`. For example: `npx trigger.dev@v4-beta dev`
350+
</Warning>
351+
348352
### Login
349353
350354
To avoid being redirected to [Trigger.dev Cloud](https://cloud.trigger.dev) when using the CLI, you need to specify the URL of your self-hosted instance with the `--api-url` or `-a` flag. For example:

0 commit comments

Comments
 (0)