Annotations
About 736 words
Every annotation the plugin reads. They all live under metadata.annotations. List values are comma-separated, and spaces around entries are ignored.
| Annotation | On | Value |
|---|---|---|
specht-labs.de/tailnet-group | Group | one tailnet group name |
specht-labs.de/tailnet-login | User | one Tailscale login |
specht-labs.de/tailnet-dst | API | destinations |
specht-labs.de/tailnet-ports | API | ports |
specht-labs.de/tailnet-allow | API | groups, users, autogroups, tags |
specht-labs.de/tailnet-client-tag | API | one tag |
specht-labs.de/tailnet-src | Component | tags |
specht-labs.de/tailnet-device-reason | Tailscale entity of spec.type: tag | free text |
The API and Component annotations only make grants when a policy has catalogGrants: true. The entity cards read tailnet-src and tailnet-dst either way, to show which tags and Services an entity is.
specht-labs.de/tailnet-group
specht-labs.de/tailnet-group: group:adminsMakes the Group a tailnet group of that name. Its members are the Group's Users (the hasMember relation), rendered as their logins. Every annotated Group appears in the groups section of every policy. If two Groups carry the same name, one of them wins; avoid it.
Without the annotation, a Group named admins still answers to group:admins when a rule uses it, but an annotated Group takes precedence.
specht-labs.de/tailnet-login
specht-labs.de/tailnet-login: alice@githubThe User's Tailscale login. user:alice in a rule renders as this value, and so does Alice as a group member. A User without it can't be used as user:alice, and as a group member it's an error.
specht-labs.de/tailnet-dst
specht-labs.de/tailnet-dst: svc:paymentsWhere the API is reached on the tailnet: one or more of svc:<name> and tag:<name>, with names in lowercase letters, digits and hyphens. Required when the API has any other tailnet annotation. Tags must be declared by a tag entity of the policy.
specht-labs.de/tailnet-ports
specht-labs.de/tailnet-ports: tcp:443, tcp:8443The ports the API is reached on. Required next to tailnet-dst. Each entry is a port or a range, optionally with a protocol: 443, 1000-2000, tcp:443, udp:53. Wildcards (*, tcp:*) and ranges covering every port aren't accepted. backstage-tailscale-diff also uses these ports to read a grant to a Service on * as the Service's ports.
specht-labs.de/tailnet-allow
specht-labs.de/tailnet-allow: group:admins, user:alice, bob@github, autogroup:member, tag:debug-boxWho else may use the API, besides the Components that consume it. Each entry is group:…, tag:…, autogroup:…, user:…, or a login with @. Each gets a grant to the API's destinations on its ports.
specht-labs.de/tailnet-client-tag
specht-labs.de/tailnet-client-tag: tag:idp-clientThe tag every consumer reaches this API as, when that tag comes with using the API rather than with the consumer. Exactly one tag:<name>. Consumers' own tailnet-src is ignored for this API, and they don't need one.
specht-labs.de/tailnet-src
specht-labs.de/tailnet-src: tag:reportingThe tags the Component's traffic comes from, such as its egress proxy's or its host's. Tags only. A Component that consumes an annotated API across the tailnet without it gets no grant.
specht-labs.de/tailnet-device-reason
specht-labs.de/tailnet-device-reason: Backups pull from every server's own address.On a Tailscale tag entity: why grants reach devices with this tag directly rather than through a Tailscale Service. Turns off the device warning for the tag. Shown by backstage-tailscale-diff next to the device. Not needed for peer meshes or capability targets.
When an annotation is malformed
An API or Component with a malformed tailnet annotation is left out of catalog grants completely, and the problem goes to catalog.invalid in /api/tailscale/overview. The messages:
| Message | Cause |
|---|---|
the tailnet annotations need specht-labs.de/tailnet-dst | an API has -ports, -allow or -client-tag but no -dst |
specht-labs.de/tailnet-dst: only tag:… and svc:… allowed, not … | a destination of another form |
specht-labs.de/tailnet-dst needs specht-labs.de/tailnet-ports next to it | no ports |
specht-labs.de/tailnet-ports: needs concrete ports, not … | a port that doesn't parse, or a wildcard |
specht-labs.de/tailnet-allow: only groups, users, autogroups and tags, not … | an entry of another form |
specht-labs.de/tailnet-client-tag: one tag:…, not … | not exactly one tag |
specht-labs.de/tailnet-src: only tag:… allowed, not … | a Component source that isn't a tag |
