tailscale/cmd
Chloé Vulquin 0f3a292ebd
cli/configure: respect $KUBECONFIG (#11604)
cmd/tailscale/cli: respect $KUBECONFIG

* `$KUBECONFIG` is a `$PATH`-like: it defines a *list*.
`tailscale config kubeconfig` works like the rest of the
ecosystem so that if $KUBECONFIG is set it will write to the first existant file in the list, if none exist then
the final entry in the list.
* if `$KUBECONFIG` is an empty string, the old logic takes over.

Notes:

* The logic for file detection is inlined based on what `kind` does.
Technically it's a race condition, since the file could be removed/added
in between the processing steps, but the fallout shouldn't be too bad.
https://github.com/kubernetes-sigs/kind/blob/v0.23.0-alpha/pkg/cluster/internal/kubeconfig/internal/kubeconfig/paths.go

* The sandboxed (App Store) variant relies on a specific temporary
entitlement to access the ~/.kube/config file.
The entitlement is only granted to specific files, and so is not
applicable to paths supplied by the user at runtime.
While there may be other ways to achieve this access to arbitrary
kubeconfig files, it's out of scope for now.

Updates #11645

Signed-off-by: Chloé Vulquin <code@toast.bunkerlabs.net>
2024-04-08 16:49:43 +01:00
..
addlicense all: update tools that manage copyright headers 2023-01-27 15:36:29 -08:00
build-webclient client/web: precompress assets 2023-12-07 20:57:31 -05:00
cloner cmd/cloner: fix typo in test type's name 2023-09-30 10:18:18 -07: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,k8s-operator/deploy/manifests}: optionally allow proxying cluster traffic to a cluster target via ingress proxy (#11036) 2024-02-08 06:45:42 +00:00
derper tailscale: update tailfs file and package names (#11590) 2024-04-02 13:32:30 -07:00
derpprobe cmd/{derper,derpprobe}: add --version flag 2024-04-02 12:48:07 -07:00
dist cmd/dist: update logs for synology builds 2024-02-08 14:36:55 -05:00
get-authkey util/cmpx: delete now that we're using Go 1.22 2024-02-07 18:10:15 -08:00
gitops-pusher cmd/gitops-pusher: only use OAuth creds if non-empty string 2024-02-09 10:55:59 -05:00
hello cmd/hello: link to the Hello KB article (#11022) 2024-02-02 15:48:31 -08:00
k8s-nameserver cmd/{k8s-nameserver,k8s-operator},k8s-operator: add a kube nameserver, make operator deploy it (#11017) 2024-03-27 20:18:17 +00:00
k8s-operator cmd/k8s-operator: fix failing tests (#11541) 2024-03-27 20:56:07 +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 all: update copyright and license headers 2023-01-27 15:36:29 -08:00
netlogfmt util/cmpx: remove code that's in the stdlib now 2023-12-19 09:18:53 -05:00
nginx-auth tailcfg,all: add and use Node.IsTagged() 2023-03-13 08:44:25 -07:00
pgproxy various: add golangci-lint, fix issues (#7905) 2023-04-17 18:38:24 -04:00
printdep cmd/printdep: print correct toolchain URL 2023-02-11 17:57:36 +00:00
proxy-to-grafana tailcfg,all: add and use Node.IsTagged() 2023-03-13 08:44:25 -07:00
sniproxy go.mod, all: move away from inet.af domain seized by Taliban 2024-02-13 19:21:09 -08:00
speedtest all: update copyright and license headers 2023-01-27 15:36:29 -08:00
ssh-auth-none-demo all: replace deprecated ioutil references 2023-08-23 23:53:19 +01:00
stunc all: update copyright and license headers 2023-01-27 15:36:29 -08:00
stund util/cmpx: delete now that we're using Go 1.22 2024-02-07 18:10:15 -08:00
sync-containers all: adjust some build tags for plan9 2023-08-24 15:42:35 -07:00
tailscale cli/configure: respect $KUBECONFIG (#11604) 2024-04-08 16:49:43 +01:00
tailscaled wgengine/netstack: remove SubnetRouterWrapper 2024-04-07 15:44:41 -07:00
testcontrol all: update copyright and license headers 2023-01-27 15:36:29 -08:00
testwrapper cmd/testwrapper: apply results of all unit tests to coverage for all packages 2024-02-21 13:08:17 -06:00
tsconnect logtail: delete unused code from old way to configure zstd 2024-04-01 20:43:06 -07:00
tsidp cmd/tsidp: add start of OIDC Tailscale IdP 2023-11-15 14:27:39 -08:00
tsshd all: update copyright and license headers 2023-01-27 15:36:29 -08:00
viewer cmd/viewer: import views when generating byteSliceField 2024-03-08 14:48:26 -06:00