You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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>
2 years ago
..
addlicense all: update tools that manage copyright headers 3 years ago
build-webclient client/web: precompress assets 2 years ago
cloner cmd/cloner: fix typo in test type's name 2 years ago
connector-gen cmd/connector-gen: add helper tool for wide app connector configurations 2 years ago
containerboot cmd/{containerboot,k8s-operator/deploy/manifests}: optionally allow proxying cluster traffic to a cluster target via ingress proxy (#11036) 2 years ago
derper tailscale: update tailfs file and package names (#11590) 2 years ago
derpprobe cmd/{derper,derpprobe}: add --version flag 2 years ago
dist cmd/dist: update logs for synology builds 2 years ago
get-authkey util/cmpx: delete now that we're using Go 1.22 2 years ago
gitops-pusher cmd/gitops-pusher: only use OAuth creds if non-empty string 2 years ago
hello cmd/hello: link to the Hello KB article (#11022) 2 years ago
k8s-nameserver cmd/{k8s-nameserver,k8s-operator},k8s-operator: add a kube nameserver, make operator deploy it (#11017) 2 years ago
k8s-operator cmd/k8s-operator: fix failing tests (#11541) 2 years ago
mkmanifest cmd/mkmanifest, cmd/tailscale, cmd/tailscaled: remove Windows arm32 resources from OSS 3 years ago
mkpkg go.mod: upgrade nfpm to v2 (#8786) 2 years ago
mkversion version/mkversion: open-source version generation logic 3 years ago
nardump all: update copyright and license headers 3 years ago
netlogfmt util/cmpx: remove code that's in the stdlib now 2 years ago
nginx-auth tailcfg,all: add and use Node.IsTagged() 3 years ago
pgproxy various: add golangci-lint, fix issues (#7905) 3 years ago
printdep cmd/printdep: print correct toolchain URL 3 years ago
proxy-to-grafana tailcfg,all: add and use Node.IsTagged() 3 years ago
sniproxy go.mod, all: move away from inet.af domain seized by Taliban 2 years ago
speedtest all: update copyright and license headers 3 years ago
ssh-auth-none-demo all: replace deprecated ioutil references 2 years ago
stunc all: update copyright and license headers 3 years ago
stund util/cmpx: delete now that we're using Go 1.22 2 years ago
sync-containers all: adjust some build tags for plan9 2 years ago
tailscale cli/configure: respect $KUBECONFIG (#11604) 2 years ago
tailscaled wgengine/netstack: remove SubnetRouterWrapper 2 years ago
testcontrol all: update copyright and license headers 3 years ago
testwrapper cmd/testwrapper: apply results of all unit tests to coverage for all packages 2 years ago
tsconnect logtail: delete unused code from old way to configure zstd 2 years ago
tsidp cmd/tsidp: add start of OIDC Tailscale IdP 2 years ago
tsshd all: update copyright and license headers 3 years ago
viewer cmd/viewer: import views when generating byteSliceField 2 years ago