feat(tailscale): manage tailnet policy with gitops - #6
Merged
Conversation
Track the tailnet policy file in git and sync it with a GitHub Action: validate on pull requests, apply on merge to master. Authenticates with a Tailscale workload identity federation credential, so no long-lived secret is stored in the repository. Drops tag:dntls, which is no longer used.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes git the source of truth for the tailnet policy file.
tailscale/policy.hujson— the current tailnet policy, with everytag:dntlselement removed (tag owner, both ACL rules, and the admin SSH rule). Comments
record the intent of each section.
.github/workflows/tailscale-acl.yml— validates the policy on pull requestsand applies it on merge to
masteror manual dispatch, usingtailscale/gitops-acl-actionpinned by commit. Authenticates with a Tailscaleworkload identity federation credential, so no long-lived secret is stored.
.gitignore— ignoresversion-cache.json, the etag cachegitops-pusherwrites at runtime.
Validation
github.com/tailscale/hujson;Standardizeproducesexactly the intended JSON.
actionlintreports no issues for the workflow.Tailscale ACLcheck on this pull request validates the policy against thetailnet.
Notes
Documentation is the companion pull request GilmanLab/root#9: ADR-0002, the
Tailscale policy reference, and the policy change runbook. Console editing gets
locked after the first successful apply.