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
Tom Proctor 74d4652144
cmd/{containerboot,k8s-operator},k8s-operator: new options to expose user metrics (#14035)
containerboot:

Adds 3 new environment variables for containerboot, `TS_LOCAL_ADDR_PORT` (default
`"${POD_IP}:9002"`), `TS_METRICS_ENABLED` (default `false`), and `TS_DEBUG_ADDR_PORT`
(default `""`), to configure metrics and debug endpoints. In a follow-up PR, the
health check endpoint will be updated to use the `TS_LOCAL_ADDR_PORT` if
`TS_HEALTHCHECK_ADDR_PORT` hasn't been set.

Users previously only had access to internal debug metrics (which are unstable
and not recommended) via passing the `--debug` flag to tailscaled, but can now
set `TS_METRICS_ENABLED=true` to expose the stable metrics documented at
https://tailscale.com/kb/1482/client-metrics at `/metrics` on the addr/port
specified by `TS_LOCAL_ADDR_PORT`.

Users can also now configure a debug endpoint more directly via the
`TS_DEBUG_ADDR_PORT` environment variable. This is not recommended for production
use, but exposes an internal set of debug metrics and pprof endpoints.

operator:

The `ProxyClass` CRD's `.spec.metrics.enable` field now enables serving the
stable user metrics documented at https://tailscale.com/kb/1482/client-metrics
at `/metrics` on the same "metrics" container port that debug metrics were
previously served on. To smooth the transition for anyone relying on the way the
operator previously consumed this field, we also _temporarily_ serve tailscaled's
internal debug metrics on the same `/debug/metrics` path as before, until 1.82.0
when debug metrics will be turned off by default even if `.spec.metrics.enable`
is set. At that point, anyone who wishes to continue using the internal debug
metrics (not recommended) will need to set the new `ProxyClass` field
`.spec.statefulSet.pod.tailscaleContainer.debug.enable`.

Users who wish to opt out of the transitional behaviour, where enabling
`.spec.metrics.enable` also enables debug metrics, can set
`.spec.statefulSet.pod.tailscaleContainer.debug.enable` to false (recommended).

Separately but related, the operator will no longer specify a host port for the
"metrics" container port definition. This caused scheduling conflicts when k8s
needs to schedule more than one proxy per node, and was not necessary for allowing
the pod's port to be exposed to prometheus scrapers.

Updates #11292

---------

Co-authored-by: Kristoffer Dalby <kristoffer@tailscale.com>
Signed-off-by: Tom Proctor <tomhjp@users.noreply.github.com>
2 days ago
..
addlicense all: update tools that manage copyright headers 2 years ago
build-webclient client/web: precompress assets 12 months ago
cloner cmd/cloner, cmd/viewer, util/codegen: add support for aliases of cloneable types 3 months ago
connector-gen cmd/connector-gen: add helper tool for wide app connector configurations 11 months ago
containerboot cmd/{containerboot,k8s-operator},k8s-operator: new options to expose user metrics (#14035) 2 days ago
derper tsweb: change RequestID format to have a date in it 3 days ago
derpprobe cmd/derpprobe,prober: add ability to restrict derpprobe to a single region 1 week ago
dist release/dist/qnap: add qnap target builder 7 months ago
get-authkey client/tailscale,cmd/{cli,get-authkey,k8s-operator}: set distinct User-Agents 1 month ago
gitops-pusher cmd/gitops-pusher: ignore previous etag if local acls match control (#13068) 4 months ago
hello cmd/hello: link to the Hello KB article (#11022) 10 months ago
k8s-nameserver cmd/k8s-nameserver: fix AAAA record query response (#12412) 6 months ago
k8s-operator cmd/{containerboot,k8s-operator},k8s-operator: new options to expose user metrics (#14035) 2 days ago
mkmanifest cmd/mkmanifest, cmd/tailscale, cmd/tailscaled: remove Windows arm32 resources from OSS 2 years ago
mkpkg go.mod: upgrade nfpm to v2 (#8786) 1 year ago
mkversion version/mkversion: open-source version generation logic 2 years ago
nardump all: update copyright and license headers 2 years ago
natc cmd/natc: fix nil pointer 2 months ago
netlogfmt all: use Go 1.22 range-over-int 7 months ago
nginx-auth tailcfg,all: add and use Node.IsTagged() 2 years ago
pgproxy tsnet: split user facing and backend logging 7 months ago
printdep cmd/printdep: print correct toolchain URL 2 years ago
proxy-to-grafana cmd/proxy-to-grafana: add flag for alternative control server 5 months ago
sniproxy all: use math/rand/v2 more 6 months ago
speedtest all: update copyright and license headers 2 years ago
ssh-auth-none-demo all: replace deprecated ioutil references 1 year ago
stunc cmd/stunc: support user-specified port (#12469) 5 months ago
stund tsweb: change RequestID format to have a date in it 3 days ago
stunstamp cmd/stunstamp: add protocol context to timeout logs (#13422) 3 months ago
sync-containers all: adjust some build tags for plan9 1 year ago
systray cmd/systray: handle reconnects to IPN bus (#13386) 3 months ago
tailscale cli: present risk warning when setting up app connector on macOS (#14181) 2 days ago
tailscaled derp/derphttp: don't link websockets other than on GOOS=js 2 weeks ago
testcontrol all: use Go 1.22 range-over-int 7 months ago
testwrapper cmd/testwrapper: add pkg runtime to output (#13894) 1 month ago
tl-longchain cmd/tl-longchain: tool to re-sign nodes with long rotation signatures 3 months ago
tsconnect all: use iterators over slice views more 2 weeks ago
tsidp cmd/tsidp: add --dir flag 2 months ago
tsshd all: update copyright and license headers 2 years ago
tta cmd/tta: pull out test driver dialing into a type, fix bugs 3 months ago
viewer cmd/viewer: import types/views when generating a getter for a map field 1 month ago
vnet tstest/natlab/vnet: add start of IPv6 support 3 months ago
xdpderper all: add test for package comments, fix, add comments as needed 5 months ago