Skip to content

Conversation

@kaworu
Copy link
Member

@kaworu kaworu commented Sep 15, 2025

Better reviewed commit by commit.

manual test

Use 5s for cleanup and 1m for TTL to avoid waiting too long 😅

% sed -i -e 's/Minute/Second/;s/Hour/Minute/' pkg/hubble/observer/namespace/defaults.go

% git diff
diff --git a/pkg/hubble/observer/namespace/defaults.go b/pkg/hubble/observer/namespace/defaults.go
index 3a61e40cbf..276cd3c553 100644
--- a/pkg/hubble/observer/namespace/defaults.go
+++ b/pkg/hubble/observer/namespace/defaults.go
@@ -8,7 +8,7 @@ import "time"
 const (
        // cleanupInterval is the interval at which the namespace list from the
        // manager is garbage collected.
-       cleanupInterval = 5 * time.Minute
+       cleanupInterval = 5 * time.Second
        // namespaceTTL is the time after which a namespace is garbage collected.
-       namespaceTTL = 1 * time.Hour
+       namespaceTTL = 1 * time.Minute
 )

% make kind-image-fast

Check that the ns manager job has started, and we don't see default in the namespace list.

% kubectl logs -n kube-system ds/cilium | grep hubble-namespacemanager
Found 2 pods, using pod/cilium-hsvh6
time=2025-09-15T11:02:41.194394455Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/cell/lifecycle.go:126 msg="Executing start hook" function="*job.groupHooks.Start (agent.controlplane.hubble.hubble-namespacemanager)"
time=2025-09-15T11:02:41.194400266Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/cell/lifecycle.go:136 msg="Start hook executed" function="*job.groupHooks.Start (agent.controlplane.hubble.hubble-namespacemanager)" duration=301ns
time=2025-09-15T11:02:41.194409813Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/cell/lifecycle.go:126 msg="Executing start hook" function="*job.queuedJob.Start (agent.controlplane.hubble.hubble-namespacemanager)"
time=2025-09-15T11:02:41.194415254Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/cell/lifecycle.go:136 msg="Start hook executed" function="*job.queuedJob.Start (agent.controlplane.hubble.hubble-namespacemanager)" duration=1.122µs
time=2025-09-15T11:02:41.194452814Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:172 msg="Starting timer job" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:02:41.194580454Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/pkg/hive/health/provider.go:89 msg="upserting health status" module=health lastLevel=none reporter-id=agent.controlplane.hubble.hubble-namespacemanager.timer-job-hubble-namespace-cleanup status="agent.controlplane.hubble.hubble-namespacemanager.timer-job-hubble-namespace-cleanup: [OK] Primed"

% kubectl exec -it -n kube-system ds/cilium -- hubble list namespaces
NAMESPACE
kube-system
local-path-storage

Run curl from the default namespace to generate a Hubble flow, check the timestamp and that now default shows up in the Hubble namespace list.

% kubectl run -it --rm --image=curlimages/curl curl -- curl -v cilium.io | grep Date:
If you don't see a command prompt, try pressing enter.
< Date: Mon, 15 Sep 2025 11:04:35 GMT

% kubectl exec -it -n kube-system ds/cilium -- hubble list namespaces
NAMESPACE
default
kube-system
local-path-storage

wait for the TTL to expire

% sleep 1m

Now check the logs, the cleanup has been called every 5s as expected, and default is no longer part of the Hubble namespace list.

% kubectl logs -n kube-system ds/cilium | grep hubble-namespacemanager
Found 2 pods, using pod/cilium-hsvh6
time=2025-09-15T11:02:41.194394455Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/cell/lifecycle.go:126 msg="Executing start hook" function="*job.groupHooks.Start (agent.controlplane.hubble.hubble-namespacemanager)"
time=2025-09-15T11:02:41.194400266Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/cell/lifecycle.go:136 msg="Start hook executed" function="*job.groupHooks.Start (agent.controlplane.hubble.hubble-namespacemanager)" duration=301ns
time=2025-09-15T11:02:41.194409813Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/cell/lifecycle.go:126 msg="Executing start hook" function="*job.queuedJob.Start (agent.controlplane.hubble.hubble-namespacemanager)"
time=2025-09-15T11:02:41.194415254Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/cell/lifecycle.go:136 msg="Start hook executed" function="*job.queuedJob.Start (agent.controlplane.hubble.hubble-namespacemanager)" duration=1.122µs
time=2025-09-15T11:02:41.194452814Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:172 msg="Starting timer job" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:02:41.194580454Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/pkg/hive/health/provider.go:89 msg="upserting health status" module=health lastLevel=none reporter-id=agent.controlplane.hubble.hubble-namespacemanager.timer-job-hubble-namespace-cleanup status="agent.controlplane.hubble.hubble-namespacemanager.timer-job-hubble-namespace-cleanup: [OK] Primed"
time=2025-09-15T11:02:46.194736255Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:02:46.194896046Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:02:51.195169529Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:02:51.195287971Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:02:56.195247915Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:02:56.195349486Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:01.194938294Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:01.195038753Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:06.195530597Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:06.195655722Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:11.195306537Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:11.195423527Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:16.194719133Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:16.194850139Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:21.195456088Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:21.195587836Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:26.195184058Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:26.195284757Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:31.195160733Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:31.195255611Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:36.194821705Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:36.194919198Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:41.19551726Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:41.195562094Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:46.194573183Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:46.194687277Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:51.195184689Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:51.195295427Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:56.194719922Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:03:56.194825029Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:01.19535577Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:01.195455297Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:06.194727822Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:06.194853368Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:11.195415524Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:11.195511074Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:16.195165954Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:16.195254721Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:21.195453279Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:21.195561813Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:26.194758668Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:26.19483973Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:31.194531071Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:31.1946263Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:36.194715545Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:36.194816464Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:41.194802443Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:41.194862045Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:46.195526274Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:46.195629278Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:51.195239743Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:51.195382422Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:56.194640281Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:04:56.194710173Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:05:01.194584758Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:05:01.194762713Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:05:06.19488027Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:05:06.195109461Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:05:11.195231224Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:05:11.195458801Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:05:16.195324959Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:05:16.195420208Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:05:21.19465752Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:05:21.194758109Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:05:26.194866203Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:05:26.194982412Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:05:31.195392999Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:05:31.195488969Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:05:36.194576556Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:05:36.194681173Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:05:41.194460976Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:05:41.194509918Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:05:46.195237037Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:05:46.195337165Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:05:51.194488317Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:184 msg="Timer job triggered" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"
time=2025-09-15T11:05:51.194590168Z level=debug source=/home/alex/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/job/timer.go:200 msg="Timer job finished" module=agent.controlplane.hubble.hubble-namespacemanager name=hubble-namespace-cleanup func="namespace.init.func1.1 (.../observer/namespace/cell.go:21)"

% kubectl exec -it -n kube-system ds/cilium -- hubble list namespaces
NAMESPACE
kube-system
local-path-storage

Closes: #40064

@kaworu kaworu added this to the 1.19 milestone Sep 15, 2025
@kaworu kaworu self-assigned this Sep 15, 2025
@kaworu kaworu requested a review from a team as a code owner September 15, 2025 11:10
@kaworu kaworu added the kind/cleanup This includes no functional changes. label Sep 15, 2025
@kaworu kaworu requested a review from glrf September 15, 2025 11:10
@kaworu kaworu added release-note/misc This PR makes changes that have no direct user impact. area/hubble Impacts hubble server or relay labels Sep 15, 2025
@kaworu kaworu requested a review from devodev September 15, 2025 11:18
Copy link
Contributor

@glrf glrf left a comment

Choose a reason for hiding this comment

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

Overall LGTM, nice cleanup. Only question is, if we really want to introduce another module for this. But that's non blocking from my side.

Copy link
Contributor

@devodev devodev left a comment

Choose a reason for hiding this comment

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

I think I agree with @glrf about using a cell directly instead of a module.
Since the job is named clearly, I don't think we need the additional scope created by the module.

This is a move/rename only commit preparing the structure to refactor
the namespace manager as a Cell.

Signed-off-by: Alexandre Perrin <alex@isovalent.com>
For testing purposes, reducing the use of the public
namespace.NewManager.

Cosmetic dedup in local_observer_test.go on the way, making noopParser
accept testing.TB as param.

Signed-off-by: Alexandre Perrin <alex@isovalent.com>
Setup the namespace cleanup as a job.Timer instead of open-coding in our
own goroutine.

Signed-off-by: Alexandre Perrin <alex@isovalent.com>
@kaworu kaworu force-pushed the pr/kaworu/hubble/namespace-manager-cell branch from e634e9a to 8383e4f Compare September 17, 2025 15:38
@kaworu kaworu requested a review from glrf September 17, 2025 16:01
@kaworu
Copy link
Member Author

kaworu commented Sep 18, 2025

/test

@kaworu kaworu enabled auto-merge September 22, 2025 10:59
Copy link
Member

@rolinh rolinh left a comment

Choose a reason for hiding this comment

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

Nice, lgtm!

@kaworu kaworu added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Sep 23, 2025
@kaworu kaworu added this pull request to the merge queue Sep 23, 2025
Merged via the queue into cilium:main with commit b9de116 Sep 23, 2025
71 checks passed
@kaworu kaworu deleted the pr/kaworu/hubble/namespace-manager-cell branch September 23, 2025 09:02
@maintainer-s-little-helper maintainer-s-little-helper bot removed ready-to-merge This PR has passed all tests and received consensus from code owners to merge. labels Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/hubble Impacts hubble server or relay kind/cleanup This includes no functional changes. release-note/misc This PR makes changes that have no direct user impact.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hubble: refactor the namespace manager as a cell

4 participants