Skip to content

Commit 45f3a88

Browse files
authored
docs: document TENV_GITHUB_TOKEN for production runner pods (#329) (#912)
* chore: add secrets/credentials patterns to .gitignore * docs: document TENV_GITHUB_TOKEN for production runner pods (#329) Add a "Recommended environment variables for runner pods" section to the Advanced configuration page that explains why setting `TENV_GITHUB_TOKEN` on runner pods is strongly recommended at scale (GitHub public API rate limit) and shows a production-shaped example that references a Kubernetes Secret rather than an inline value. The variable is already documented for local development in Contributing -> Advanced Settings; this addition is the production/high-scale guidance asked for in the issue. Closes #329 --------- Co-authored-by: Shunta Hayashi <201278530+taiman724@users.noreply.github.com>
1 parent ea9a5bb commit 45f3a88

2 files changed

Lines changed: 41 additions & 0 deletions

File tree

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,13 @@ test.out/*
4141
env/
4242
venv/
4343

44+
# secrets / credentials
45+
.env.*
46+
*.key
47+
*.pem
48+
secrets/
49+
credentials/
50+
.aws/
51+
4452
test-repo/
4553
TIltfile

docs/operator-manual/advanced-configuration.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,36 @@ Currently, runners' configuration is not exposed.
3737

3838
!!! info
3939
You can override some of the runner's pod spec. See [override the runner pod spec](../user-guide/override-runner.md) documentation.
40+
41+
## Recommended environment variables for runner pods
42+
43+
Burrito's runner pods use [`tenv`](https://github.com/tofuutils/tenv) to download Terraform, Terragrunt or OpenTofu binaries on demand. By default, `tenv` reaches GitHub's public API to discover versions, which is subject to a low unauthenticated rate limit (about 60 requests per hour per source IP).
44+
45+
For production or high-scale deployments where many runner pods may launch in a short window, it is **strongly recommended** to set `TENV_GITHUB_TOKEN` on the runner pods so that `tenv` makes authenticated requests to GitHub and is subject to the much higher authenticated rate limit.
46+
47+
Create a GitHub token with no specific permissions (a fine-grained personal access token with no repository or account access is sufficient — `tenv` only reads public release metadata), store it in a Kubernetes `Secret`, and reference it from the `overrideRunnerSpec` on your `TerraformRepository` (or `TerraformLayer`):
48+
49+
```yaml
50+
apiVersion: config.terraform.padok.cloud/v1alpha1
51+
kind: TerraformRepository
52+
metadata:
53+
name: my-repo
54+
namespace: burrito
55+
spec:
56+
repository:
57+
url: https://github.com/<org>/<repo>
58+
terraform:
59+
enabled: true
60+
overrideRunnerSpec:
61+
env:
62+
- name: TENV_GITHUB_TOKEN
63+
valueFrom:
64+
secretKeyRef:
65+
name: tenv-github-token
66+
key: token
67+
```
68+
69+
The same variable is already documented for local development setups in [Contributing → Advanced Settings](../contributing.md#advanced-settings); the snippet above is the production-shaped equivalent (Secret reference rather than an inline value).
70+
71+
!!! tip
72+
Apply the override on the `TerraformRepository` so that every linked `TerraformLayer` inherits it, instead of repeating the setting on each layer. See [override the runner pod spec](../user-guide/override-runner.md) for the merge rules.

0 commit comments

Comments
 (0)