Skip to content

Conversation

@davidsbond
Copy link
Contributor

@davidsbond davidsbond commented Sep 12, 2025

This commit modifies the k8s operator to wrap its logger using the logtail
logger provided via the tsnet server. This causes any logs written by
the operator to make their way to Tailscale in the same fashion as
wireguard logs to be used by support.

This functionality can also be opted-out of entirely using the
"TS_NO_LOGS_NO_SUPPORT" environment variable.

Updates https://github.com/tailscale/corp/issues/32037

@davidsbond davidsbond force-pushed the davidb/k8s-operator-control-logging branch 5 times, most recently from 6e15213 to a0201b3 Compare September 12, 2025 14:34
@davidsbond davidsbond marked this pull request as ready for review September 12, 2025 17:24
@davidsbond davidsbond requested review from a team, ChaosInTheCRD and tomhjp September 12, 2025 17:24
@ChaosInTheCRD ChaosInTheCRD self-requested a review September 16, 2025 12:33
@ChaosInTheCRD
Copy link
Contributor

Sorry I gave this approval because lgtm, but I'm gonna test it myself just to be sure!

Copy link
Contributor

@ChaosInTheCRD ChaosInTheCRD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just putting this here to remove the approval for now - I'll manually test then approve again

@davidsbond davidsbond dismissed ChaosInTheCRD’s stale review September 16, 2025 13:00

Accidental approval/request

@davidsbond davidsbond force-pushed the davidb/k8s-operator-control-logging branch from a0201b3 to 133ead6 Compare September 16, 2025 13:47
@davidsbond davidsbond force-pushed the davidb/k8s-operator-control-logging branch 2 times, most recently from 9b5345f to 126f0ff Compare September 19, 2025 11:59
@davidsbond davidsbond force-pushed the davidb/k8s-operator-control-logging branch 2 times, most recently from 34d5faa to 84b493b Compare September 22, 2025 12:39
This commit modifies the k8s operator to wrap its logger using the logtail
logger provided via the tsnet server. This causes any logs written by
the operator to make their way to Tailscale in the same fashion as
wireguard logs to be used by support.

This functionality can also be opted-out of entirely using the
"TS_NO_LOGS_NO_SUPPORT" environment variable.

Updates tailscale/corp#32037

Signed-off-by: David Bond <davidsbond93@gmail.com>
@davidsbond davidsbond force-pushed the davidb/k8s-operator-control-logging branch from 84b493b to c6f410c Compare September 22, 2025 12:43
Copy link
Member

@tomhjp tomhjp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🎉

Comment on lines +23 to +24
// We use a tee logger here so that logs are written to stdout/stderr normally while at the same time being
// sent upstream.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this comment is sort of redundant as it's covered by the good comment on the function

@davidsbond davidsbond merged commit cc1761e into main Sep 22, 2025
106 of 109 checks passed
@davidsbond davidsbond deleted the davidb/k8s-operator-control-logging branch September 22, 2025 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants