tailscale/cmd
David Bond 2cb86cf65e
Some checks failed
checklocks / checklocks (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
Dockerfile build / deploy (push) Has been cancelled
CI / gomod-cache (push) Has been cancelled
CI / fuzz (push) Has been cancelled
tailscale.com/cmd/vet / vet (push) Has been cancelled
CI / race-root-integration (1/4) (push) Has been cancelled
CI / race-root-integration (2/4) (push) Has been cancelled
CI / race-root-integration (3/4) (push) Has been cancelled
CI / race-root-integration (4/4) (push) Has been cancelled
CI / test (-race, amd64, 1/3) (push) Has been cancelled
CI / test (-race, amd64, 2/3) (push) Has been cancelled
CI / test (-race, amd64, 3/3) (push) Has been cancelled
CI / test (386) (push) Has been cancelled
CI / test (amd64) (push) Has been cancelled
CI / Windows (${{ matrix.name || matrix.shard}}) (win-bench, benchmarks) (push) Has been cancelled
CI / Windows (${{ matrix.name || matrix.shard}}) (win-shard-1-2, 1/2) (push) Has been cancelled
CI / Windows (${{ matrix.name || matrix.shard}}) (win-shard-2-2, 2/2) (push) Has been cancelled
CI / Windows (win-tool-go) (push) Has been cancelled
CI / privileged (push) Has been cancelled
CI / vm (push) Has been cancelled
CI / cross (386, linux) (push) Has been cancelled
CI / cross (amd64, darwin) (push) Has been cancelled
CI / cross (amd64, freebsd) (push) Has been cancelled
CI / cross (amd64, openbsd) (push) Has been cancelled
CI / cross (amd64, windows) (push) Has been cancelled
CI / cross (arm, 5, linux) (push) Has been cancelled
CI / cross (arm, 7, linux) (push) Has been cancelled
CI / cross (arm64, darwin) (push) Has been cancelled
CI / cross (arm64, linux) (push) Has been cancelled
CI / cross (arm64, windows) (push) Has been cancelled
CI / cross (loong64, linux) (push) Has been cancelled
CI / ios (push) Has been cancelled
CI / crossmin (amd64, illumos) (push) Has been cancelled
CI / crossmin (amd64, plan9) (push) Has been cancelled
CI / crossmin (amd64, solaris) (push) Has been cancelled
CI / crossmin (ppc64, aix) (push) Has been cancelled
CI / android (push) Has been cancelled
CI / wasm (push) Has been cancelled
CI / tailscale_go (push) Has been cancelled
CI / depaware (push) Has been cancelled
CI / go_generate (push) Has been cancelled
CI / go_mod_tidy (push) Has been cancelled
CI / licenses (push) Has been cancelled
CI / staticcheck (${{ matrix.name }}) (--with-tags-all=darwin, arm64, darwin, macOS) (push) Has been cancelled
CI / staticcheck (${{ matrix.name }}) (--with-tags-all=linux, amd64, linux, Linux) (push) Has been cancelled
CI / staticcheck (${{ matrix.name }}) (--with-tags-all=windows, amd64, windows, Windows) (push) Has been cancelled
CI / staticcheck (${{ matrix.name }}) (--without-tags-any=windows,darwin,linux --shard=1/4, amd64, linux, Portable (1/4)) (push) Has been cancelled
CI / staticcheck (${{ matrix.name }}) (--without-tags-any=windows,darwin,linux --shard=2/4, amd64, linux, Portable (2/4)) (push) Has been cancelled
CI / staticcheck (${{ matrix.name }}) (--without-tags-any=windows,darwin,linux --shard=3/4, amd64, linux, Portable (3/4)) (push) Has been cancelled
CI / staticcheck (${{ matrix.name }}) (--without-tags-any=windows,darwin,linux --shard=4/4, amd64, linux, Portable (4/4)) (push) Has been cancelled
CI / notify_slack (push) Has been cancelled
CI / merge_blocker (push) Has been cancelled
CI / check_mergeability_strict (push) Has been cancelled
CI / check_mergeability (push) Has been cancelled
cmd/k8s-operator,k8s-operator: Allow the use of multiple tailnets (#18344)
This commit contains  the implementation of multi-tailnet support within the Kubernetes Operator

Each of our custom resources now expose the `spec.tailnet` field. This field is a string that must match the name of an existing `Tailnet` resource. A `Tailnet` resource looks like this:

```yaml
apiVersion: tailscale.com/v1alpha1
kind: Tailnet
metadata:
  name: example  # This is the name that must be referenced by other resources
spec:
  credentials:
    secretName: example-oauth
```

Each `Tailnet` references a `Secret` resource that contains a set of oauth credentials. This secret must be created in the same namespace as the operator:

```yaml
apiVersion: v1
kind: Secret
metadata:
  name: example-oauth # This is the name that's referenced by the Tailnet resource.
  namespace: tailscale
stringData:
  client_id: "client-id"
  client_secret: "client-secret"
```

When created, the operator performs a basic check that the oauth client has access to all required scopes. This is done using read actions on devices, keys & services. While this doesn't capture a missing "write" permission, it catches completely missing permissions. Once this check passes, the `Tailnet` moves into a ready state and can be referenced. Attempting to use a `Tailnet` in a non-ready state will stall the deployment of `Connector`s, `ProxyGroup`s and `Recorder`s until the `Tailnet` becomes ready.

The `spec.tailnet` field informs the operator that a `Connector`, `ProxyGroup`, or `Recorder` must be given an auth key generated using the specified oauth client. For backwards compatibility, the set of credentials the operator is configured with are considered the default. That is, where `spec.tailnet` is not set, the resource will be deployed in the same tailnet as the operator. 

Updates https://github.com/tailscale/corp/issues/34561
2026-01-21 12:35:44 +00:00
..
addlicense all: fix golangci-lint errors 2025-01-07 13:05:37 -08:00
build-webclient client/web: precompress assets 2023-12-07 20:57:31 -05:00
checkmetrics cmd/checkmetrics: add command for checking metrics against kb 2024-12-02 10:30:46 +01:00
cigocacher .github,cmd/cigocacher: add flags --version --stats --cigocached-host 2025-12-15 13:17:03 +00:00
cloner cmd/cloner: support cloning arbitrarily-nested maps 2025-11-13 14:04:47 -05:00
connector-gen cmd/connector-gen: add helper tool for wide app connector configurations 2023-12-15 09:29:42 -08:00
containerboot cmd/containerboot: allow for automatic ID token generation 2026-01-14 09:47:12 -07:00
derper metrics: add a NewLabelMap helper to create and register label maps 2026-01-13 20:08:24 +00:00
derpprobe cmd/derpprobe,prober: add run all probes handler (#16875) 2025-08-16 09:42:25 -04:00
dist {cmd/dist,release/dist}: add support for intermediary QNAP signing certificates 2025-08-15 16:27:46 -05:00
distsign cmd/distsign: add CLI for verifying package signatures (#18239) 2026-01-07 11:04:14 -08:00
featuretags feature/featuretags,cmd/omitsize: support feature dependencies 2025-09-19 07:04:57 -07:00
get-authkey cmd,tsnet,internal/client: create internal shim to deprecated control plane API 2025-02-18 10:23:04 -06:00
gitops-pusher cmd,internal,feature: add workload idenity support to gitops pusher 2026-01-08 12:59:22 -07:00
hello cmd/hello: display native ipv4 (#15191) 2025-03-04 08:47:35 -07:00
jsonimports cmd/jsonimports: add static analyzer for consistent "json" imports (#17669) 2025-10-28 14:48:02 -07:00
k8s-nameserver k8s-operator: add IPv6 support for DNS records (#16691) 2025-09-25 11:26:43 -04:00
k8s-operator cmd/k8s-operator,k8s-operator: Allow the use of multiple tailnets (#18344) 2026-01-21 12:35:44 +00:00
k8s-proxy all: rename variables with lowercase-l/uppercase-I 2025-11-18 09:12:34 +00:00
mkmanifest cmd/mkmanifest, cmd/tailscale, cmd/tailscaled: remove Windows arm32 resources from OSS 2023-03-01 15:45:12 -07:00
mkpkg go.mod: upgrade nfpm to v2 (#8786) 2023-08-03 13:00:45 -07:00
mkversion version/mkversion: open-source version generation logic 2023-02-18 05:21:05 +00:00
nardump cmd/nardump: support symlinks, add basic test 2025-04-07 19:24:51 -07:00
natc all: rename variables with lowercase-l/uppercase-I 2025-11-18 09:12:34 +00:00
netlogfmt cmd/netlogfmt: allow empty --resolve-addrs flag (#18103) 2025-12-02 09:08:48 -08:00
nginx-auth tailcfg,all: add and use Node.IsTagged() 2023-03-13 08:44:25 -07:00
omitsize feature/featuretags,cmd/omitsize: support feature dependencies 2025-09-19 07:04:57 -07:00
pgproxy all: use new LocalAPI client package location 2025-02-05 14:41:42 -08:00
printdep cmd/printdep: print correct toolchain URL 2023-02-11 17:57:36 +00:00
proxy-test-server net/tlsdial: fix TLS cert validation of HTTPS proxies 2025-06-18 14:20:39 -07:00
proxy-to-grafana scripts/check_license_headers.sh: delete, rewrite as a Go test 2025-06-16 13:35:38 -07:00
sniproxy all: rename variables with lowercase-l/uppercase-I 2025-11-18 09:12:34 +00:00
speedtest all: update copyright and license headers 2023-01-27 15:36:29 -08:00
ssh-auth-none-demo ssh,tempfork/gliderlabs/ssh: replace github.com/tailscale/golang-x-crypto/ssh with golang.org/x/crypto/ssh 2025-01-31 16:36:39 -06:00
stunc cmd/stunc: enforce read timeout deadline (#14309) 2024-12-06 14:27:52 -05:00
stund cmd/cigocacher,go.mod: add cigocacher cmd 2025-11-24 21:15:46 +00:00
stunstamp all: rename variables with lowercase-l/uppercase-I 2025-11-18 09:12:34 +00:00
sync-containers all: rename variables with lowercase-l/uppercase-I 2025-11-18 09:12:34 +00:00
systray client/systray: allow specifying tailscaled socket 2025-08-05 09:19:49 -07:00
tailscale cmd,feature: add identity token auto generation for workload identity (#18373) 2026-01-14 15:00:59 +00:00
tailscaled net/udprelay: advertise addresses from cloud metadata service (#18368) 2026-01-19 18:03:30 -08:00
testcontrol all: use Go 1.22 range-over-int 2024-04-16 15:32:38 -07:00
testwrapper cmd/testwrapper/flakytest: use t.Attr annotation on flaky tests 2025-10-06 10:58:48 -07:00
tl-longchain all: rename variables with lowercase-l/uppercase-I 2025-11-18 09:12:34 +00:00
tsconnect types/netmap,*: remove some redundant fields from NetMap 2025-11-18 07:56:10 -08:00
tsidp cmd,feature: add identity token auto generation for workload identity (#18373) 2026-01-14 15:00:59 +00:00
tsshd all: update copyright and license headers 2023-01-27 15:36:29 -08:00
tta all: use new LocalAPI client package location 2025-02-05 14:41:42 -08:00
vet k8s-operator,kube: allowing k8s api request events to be enabled via grants (#18393) 2026-01-16 13:29:12 +00:00
viewer cmd/{cloner,viewer}: handle maps of views 2025-11-12 22:09:49 -05:00
vnet cmd/vnet: add wsproxy mode 2025-03-29 11:02:42 -07:00
xdpderper tsweb: split promvarz into an optional dependency 2025-03-18 16:57:04 -07:00