tfy-tailscale-config
by TrueFoundry
Tailscale custom resources for TrueFoundry clusters - ProxyClasses, ProxyGroups, session recording, and tailnet-backed RBAC
About this chart
tfy-tailscale-config
Tailscale custom resources for a TrueFoundry cluster: ProxyClasses, ProxyGroups,
session recording, and the RBAC that tailnet identities are impersonated into.
This chart does not install the Tailscale operator. It ships only custom resources, in
the same way tfy-cert-manager-config ships only Issuers and Certificates. The operator —
and with it the tailscale.com CRDs — must already be installed and reconciled before this
chart is applied. Installing both in a single Helm release is not possible: the operator
chart templates its CRDs rather than using Helm's crds/ directory, and Helm resolves REST
mappings for every rendered object before applying any of them.
Prerequisites
All of these fail silently — a missing one shows up as a ProxyGroup stuck at
0/N proxy backends ready with nothing logged:
- The Tailscale Kubernetes operator, running and reconciled.
- Every tag this chart derives, present in the tailnet policy file's
tagOwners. - A matching
autoApprovers.servicesentry for each Service tag. Note the asymmetry: the key is a tag the Service carries, the value is the tags of devices allowed to advertise it. The recorder deliberately gets no entry. - An OAuth client or federated identity carrying the
servicesscope. - The tailnet-wide HTTPS Certificates toggle enabled in the admin console.
- The RBAC bindings applied before the policy file impersonates their groups.
Device tags vs service tags
The single most costly thing to get wrong here. Devices tagged one way and Services another reports healthy and is unreachable.
| Set by | What it tags | Matched by access rules | |
|---|---|---|---|
tailnet.roleTags.* | ProxyGroup.spec.tags (a YAML list) | the proxy devices | no |
serviceTags.* | proxyConfig.defaultTags or the tailscale.com/tags annotation (a comma-separated string) | the Tailscale Services | yes |
The authoritative value for Ingress- and LoadBalancer-backed Services is
proxyConfig.defaultTags on the operator release, which this chart does not own. An
explicit tailscale.com/tags annotation overrides it for that Service, so the two must be
kept in step.
Egress inverts this. An egress ProxyGroup advertises no Tailscale Service, so there
is nothing for serviceTags or proxyConfig.defaultTags to attach to. The only identity
in play is the proxy device's, from ProxyGroup.spec.tags — and it appears in the grant as
src, not dst. It also needs no autoApprovers.services entry, which is the one
place in the policy file where that absence is correct rather than the usual silent stall.
Write-once values
Changing any of these re-registers the device on a new 100.x address and orphans any DNS
record pointing at it:
clusterSlugproxyGroups.ingress.hostnamePrefixproxyGroups.apiserver.hostnameproxyGroups.apiserver.hostnamePrefixproxyGroups.egress.hostnamePrefixrecorder.name
Tags are not in this set — retagging needs no device recreate, though a change must be
applied to both spec.tags and the device API or it reverts at next provisioning.
Reducing replicas on a ProxyGroup deletes devices and their state Secrets. The
ProxyGroup and Recorder templates carry argocd.argoproj.io/sync-options: Prune=false
for the same reason.
Cluster archetypes
ci/ holds four worked examples, which double as lint fixtures:
| File | Shape |
|---|---|
control-plane-values.yaml | full install — ingress proxies, recorder, L3 tailnet Services |
gateway-pop-values.yaml | kubectl access only — no ingress proxies, no recorder |
compute-plane-values.yaml | egress only — reaches the tailnet, exposes nothing to it |
minimal-values.yaml | portable core, no TrueFoundry-specific infrastructure |
Parameters
Cluster identity
| Name | Description | Value |
|---|---|---|
clusterName | Name of the cluster, as supplied by the inframold. | cluster-name |
clusterSlug | Short identifier used in tailnet hostnames and ACL tags. Defaults to clusterName with a leading "tfy-" removed, if present. | "" |
Tailnet device tags
| Name | Description | Value |
|---|---|---|
tailnet.baseTag | Device tag carried by every proxy. Never name this in an access rule -- it is the chart default on every cluster, so a rule naming it silently widens to the whole fleet. | tag:k8s |
tailnet.roleTags | Per-role DEVICE tags. Each defaults to "tag:k8s--". Override to pin an existing tag; tags must match ^tag:[a-zA-Z][a-zA-Z0-9-]*$ (no underscores). | {} |
tailnet.coarse.env | Environment token -- dev, stage, prod, demo. | "" |
tailnet.coarse.cloud | Cloud token -- aws, azu, gcp. | "" |
tailnet.coarse.plane | Plane token -- ctl, cmp, gtw. | "" |
Tailnet service tags
| Name | Description | Value |
|---|---|---|
serviceTags.ingress | Comma-separated tags applied to Services fronted by the ingress ProxyGroup. Note this is a STRING, not a list -- unlike ProxyGroup.spec.tags. Defaults to "<tailnet.baseTag>,<tailnet.roleTags.ingress>". | "" |
Placement
| Name | Description | Value |
|---|---|---|
placement.tolerations | Tolerations for Tailscale proxy and recorder pods. | [] |
placement.affinity | Affinity for Tailscale proxy and recorder pods. | {} |
placement.podLabels | Labels applied to proxy and recorder pods. | {} |
placement.resources | Baseline resource requests and limits for Tailscale proxy and recorder containers. Each component below can override this; an override REPLACES this block rather than merging into it. | {} |
Proxy classes
| Name | Description | Value |
|---|---|---|
proxyClasses.default.enabled | Create the default ProxyClass, used by ingress proxies. | true |
proxyClasses.default.name | Name of the default ProxyClass. | tfy-default |
proxyClasses.default.metricsEnabled | Expose proxy metrics. | true |
proxyClasses.default.serviceMonitor.enabled | Have the operator create a Prometheus Operator ServiceMonitor for these proxies. Needs metricsEnabled and the monitoring.coreos.com CRDs. | false |
proxyClasses.default.serviceMonitor.labels | Labels on the ServiceMonitor. Set whatever the Prometheus serviceMonitorSelector matches (for kube-prometheus-stack, release: ), or it is created and never scraped. | {} |
proxyClasses.default.resources | Overrides placement.resources for the ingress/egress ProxyClass. REPLACES that block outright -- it is not merged, so restate requests as well as limits. | {} |
proxyClasses.apiserver.enabled | Create the ProxyClass used by the kube-apiserver ProxyGroup. | true |
proxyClasses.apiserver.name | Name of the kube-apiserver ProxyClass. | tfy-apiserver |
proxyClasses.apiserver.image | Pinned k8s-proxy image. This image is NOT settable through the operator chart's values -- a ProxyClass is the only way to override it, and leaving it unpinned runs :latest on the highest-privilege pod in the namespace. | tailscale/k8s-proxy:v1.102.2 |
proxyClasses.apiserver.metricsEnabled | Expose proxy metrics. | true |
proxyClasses.apiserver.serviceMonitor.enabled | Have the operator create a Prometheus Operator ServiceMonitor for these proxies. Needs metricsEnabled and the monitoring.coreos.com CRDs. | false |
proxyClasses.apiserver.serviceMonitor.labels | Labels on the ServiceMonitor. Set whatever the Prometheus serviceMonitorSelector matches (for kube-prometheus-stack, release: ), or it is created and never scraped. | {} |
proxyClasses.apiserver.resources | Overrides placement.resources for the kube-apiserver ProxyClass. REPLACES that block outright -- it is not merged, so restate requests as well as limits. | {} |
Proxy groups
| Name | Description | Value |
|---|---|---|
proxyGroups.ingress.enabled | Deploy a ProxyGroup of type "ingress". | true |
proxyGroups.ingress.name | Kubernetes object name of the ingress ProxyGroup. | ingress-proxies |
proxyGroups.ingress.replicas | Number of ingress proxy replicas. Reducing this DELETES devices and their state Secrets -- it is not a safe casual edit. | 2 |
proxyGroups.ingress.hostnamePrefix | Tailnet-global device hostname prefix. Defaults to "-ing". Max 62 chars, lowercase, must match ^[a-z0-9][a-z0-9-]{0,61}$. | "" |
proxyGroups.apiserver.enabled |
Deploy tfy-tailscale-config with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has tfy-tailscale-config on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the charttfy-tailscale-config is pinned at v0.2.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply