Setup for club machines and the club tailnet tail4ccb95.ts.net. Car code stays in each car's repo.
pi-image/: SD card image for the Pi 4 and Pi 5. See its README.tailscale/policy.hujson: the tailnet policy..github/workflows/tailscale.ymltests it on every PR and applies it on push tomain.
The handoff checklist, how-tos (join the tailnet, register a Pi on RedRover, flash a card), and
the cev-router notes live in Confluence.
PR runs can rewrite the workflow, so they get an identity that can only read and validate the
policy. Only the apply job, in an environment that deploys from main alone, can write it.
- In GitHub, create the environment
tailscale-applyand limit its deployment branches tomain. Add a ruleset onmainthat requires a reviewed PR. - In the Tailscale admin console, create two federated identities for this repo. This repo uses
GitHub's immutable OIDC subject, which carries the org and repo IDs
(
gh api repos/cornellev/infra/actions/oidc/customization/subshows the prefix):infra gitops test: scopespolicy_file:read,devices:core:read,devices:posture_attributes:read, subjectrepo:cornellev@157062924/infra@1409428931:pull_requestinfra gitops apply: scopespolicy_file,devices:core:read,devices:posture_attributes, subjectrepo:cornellev@157062924/infra@1409428931:environment:tailscale-apply
- Add repo variables (not secrets), using the names from Tailscale's GitOps docs:
TS_TAILNET(from the admin console's General settings page), andTS_OAUTH_IDandTS_AUDIENCEfrom the test identity. In thetailscale-applyenvironment, addTS_OAUTH_IDandTS_AUDIENCEagain with the apply identity's values. Environment variables override repo ones, so only theapplyjob gets the identity that can write. None is a credential: Tailscale only accepts a GitHub-signed token from this repo. - Turn on the admin console's warning that the policy is managed externally. Edits made there
are overwritten on the next push to
main.
tailscale/policy.hujson replaces the live policy on every push to main that passes its tests.
Change it through a PR, so the test job checks it first.