tailscale/cmd/k8s-operator
Brad Fitzpatrick 692f84df8d wgengine,wgcfg,feature/netlog: move network flow logging behind a feature hook
wgcfg.Config.NetworkLogging carried the network flow logging identity
inside the WireGuard config, where it was unrelated to WireGuard; it
lived there mainly so that identity changes would defeat Reconfig's
ErrNoChanges check and reach the netlog startup/shutdown logic.

Remove the field and move the whole netlog lifecycle into a new
feature/netlog package, installed on the engine via the new
wgengine.HookNewNetLogger hook, like other feature/* packages. The
logging identity now comes from LocalBackend's current netmap via the
widened NetLogSource interface (replacing Engine.SetNetLogNodeSource),
so nmcfg no longer parses audit log IDs into the config. The engine
still calls the hook before its ErrNoChanges return and before
router.Set (to capture initial packets), and again after router.Set
(to capture final packets), preserving the previous ordering.

Core wgengine no longer imports wgengine/netlog, so minimal builds
drop it entirely. tailscaled keeps netlog via feature/condregister,
and tsnet imports feature/condregister/netlog explicitly to keep
netlog enabled by default in tsnet-based binaries (tsidp,
k8s-operator).

This is pulled out of a future change that removes wgcfg.Config.Peers,
to make that PR smaller.

Updates #12542
Updates #12614

Change-Id: I41ca7dfe43c51e977c41b5f8e934bd1f0e6e6e24
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2026-07-09 12:56:37 -07:00
..
deploy cmd/k8s-operator: workload identity support for multi-tailnet (#20016) 2026-06-10 10:22:19 +01:00
e2e cmd/k8s-operator: use dynamic resource names in e2e ingress tests (#19536) 2026-04-27 13:40:46 +01:00
generate cmd/k8s-operator,k8s-operator: define ProxyGroupPolicy reconciler (#18654) 2026-02-18 09:34:55 +00:00
api-server-proxy-pg_test.go cmd/k8s-operator: migrate to tailscale-client-go-v2 (#19010) 2026-04-09 14:39:46 +01:00
api-server-proxy-pg.go cmd/k8s-operator: rework [unexpected] log lines (#20065) 2026-06-11 14:48:48 +01:00
api-server-proxy.go types/ptr: deprecate ptr.To, use Go 1.26 new 2026-03-05 20:13:18 -08:00
connector_test.go cmd/{containerboot,k8s-operator}: add 4via6 support in singleton egress (#19983) 2026-06-18 16:13:10 +01:00
connector.go cmd/{containerboot,k8s-operator}: add 4via6 support in singleton egress (#19983) 2026-06-18 16:13:10 +01:00
depaware.txt wgengine,wgcfg,feature/netlog: move network flow logging behind a feature hook 2026-07-09 12:56:37 -07:00
dnsrecords_test.go k8s-operator/dnsrecords: fix dnsRR dropping reconcile events on lock err (#19968) 2026-06-26 13:52:05 +01:00
dnsrecords.go k8s-operator/dnsrecords: fix dnsRR dropping reconcile events on lock err (#19968) 2026-06-26 13:52:05 +01:00
egress-eps_test.go all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
egress-eps.go cmd/k8s-operator: rework [unexpected] log lines (#20065) 2026-06-11 14:48:48 +01:00
egress-pod-readiness_test.go types/ptr: deprecate ptr.To, use Go 1.26 new 2026-03-05 20:13:18 -08:00
egress-pod-readiness.go cmd/k8s-operator: rework [unexpected] log lines (#20065) 2026-06-11 14:48:48 +01:00
egress-services_test.go cmd/k8s-operator: ensure EndpointSlices exist on every egress reconcile (#20347) 2026-07-08 16:39:20 +01:00
egress-services-readiness_test.go all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
egress-services-readiness.go cmd/k8s-operator: rework [unexpected] log lines (#20065) 2026-06-11 14:48:48 +01:00
egress-services.go cmd/k8s-operator: ensure EndpointSlices exist on every egress reconcile (#20347) 2026-07-08 16:39:20 +01:00
ingress_test.go Construct IPv6 ingress URLs correctly 2026-05-20 17:21:35 -07:00
ingress-for-pg_test.go cmd/k8s-operator: migrate to tailscale-client-go-v2 (#19010) 2026-04-09 14:39:46 +01:00
ingress-for-pg.go cmd/k8s-operator: rework [unexpected] log lines (#20065) 2026-06-11 14:48:48 +01:00
ingress.go Construct IPv6 ingress URLs correctly 2026-05-20 17:21:35 -07:00
logger.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
metrics_resources.go cmd/k8s-operator: truncate long label values in metrics resources (#18895) 2026-04-28 14:11:59 +01:00
nameserver_test.go cmd/k8s-operator: add nodeSelector to DNSConfig resource (#19429) 2026-04-29 15:56:33 +01:00
nameserver.go cmd/k8s-operator: add nodeSelector to DNSConfig resource (#19429) 2026-04-29 15:56:33 +01:00
nodeport-service-ports.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
nodeport-services-ports_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
operator_test.go cmd/k8s-operator: migrate to tailscale-client-go-v2 (#19010) 2026-04-09 14:39:46 +01:00
operator.go cmd/k8s-operator: rework [unexpected] log lines (#20065) 2026-06-11 14:48:48 +01:00
proxyclass_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
proxyclass.go cmd/k8s-operator: rework [unexpected] log lines (#20065) 2026-06-11 14:48:48 +01:00
proxygroup_specs.go cmd/k8s-operator: rework [unexpected] log lines (#20065) 2026-06-11 14:48:48 +01:00
proxygroup_test.go cmd/k8s-operator: stabilize StaticEndpoints order in ProxyGroup reconciles (#19755) 2026-05-27 14:28:04 +01:00
proxygroup.go cmd/k8s-operator: stabilize StaticEndpoints order in ProxyGroup reconciles (#19755) 2026-05-27 14:28:04 +01:00
sts_test.go cmd/vet: add subtestnames analyzer; fix all existing violations 2026-04-05 15:52:51 -07:00
sts.go all: fix more typos caused by unnecessary repetition 2026-07-06 10:36:17 +01:00
svc_test.go cmd/k8s-operator: migrate to tailscale-client-go-v2 (#19010) 2026-04-09 14:39:46 +01:00
svc-for-pg_test.go cmd/k8s-operator: scope HA Service hostname check per-tailnet (#20114) 2026-06-23 14:25:11 +01:00
svc-for-pg.go cmd/k8s-operator: scope HA Service hostname check per-tailnet (#20114) 2026-06-23 14:25:11 +01:00
svc.go all: fix more typos caused by unnecessary repetition 2026-07-06 10:36:17 +01:00
testutils_test.go cmd/k8s-operator: migrate to tailscale-client-go-v2 (#19010) 2026-04-09 14:39:46 +01:00
tsclient.go cmd/k8s-operator: fix token exchange for identity federation (#19845) 2026-05-27 16:45:07 +01:00
tsrecorder_specs_test.go cmd/vet: add subtestnames analyzer; fix all existing violations 2026-04-05 15:52:51 -07:00
tsrecorder_specs.go all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
tsrecorder_test.go cmd/k8s-operator: add authkey reissuing to recorder reconciler (#19556) 2026-05-01 18:26:55 +01:00
tsrecorder.go cmd/k8s-operator: add authkey reissuing to recorder reconciler (#19556) 2026-05-01 18:26:55 +01:00