cozystack/pkg/registry
Aleksei Sviridkin d369b64d71
fix(application): address review feedback for WorkloadMonitor integration
Tenant applications live in a child namespace computed from the Tenant
name, not in the HelmRelease's namespace. Scope the WorkloadMonitor
watch cluster-wide when kindName is Tenant and reverse-map WM events
back to the owning HelmRelease via computeTenantNamespace. The
condition-enrichment path now looks up monitors in the computed child
namespace too, so WorkloadsReady is populated for Tenants.

Buffer WorkloadMonitor events that arrive before the initial-events-end
bookmark and replay them once the bookmark is emitted, to preserve the
watch-list contract while not dropping workload-state transitions that
happen during the snapshot window.

Pass the fresh WorkloadMonitor object from the watch event into the
conversion path so WorkloadsReady reflects the state that triggered
the event, even when the cache client is lagging behind the watch
client.

Derive WorkloadsReady.LastTransitionTime from a stable source
(max of HelmRelease creation and condition timestamps, plus monitor
timestamps) instead of metav1.Now(), so repeated conversions of the
same underlying state produce identical timestamps.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-04-15 17:22:15 +03:00
..
apps/application fix(application): address review feedback for WorkloadMonitor integration 2026-04-15 17:22:15 +03:00
core fix(apiserver): properly handle Watch resourceVersion and bookmarks 2026-01-16 16:02:44 +01:00
fields fix(registry): implement field selector filtering for label-based resources 2026-01-10 01:44:20 +01:00
sorting [registry] Remove unused ObjectMetaWrapper 2025-12-26 13:06:35 +03:00
registry.go [cozystack-api] Implement TenantNamespace, TenantModules, TenantSecret and TenantSecretsTable resources 2025-09-24 18:27:54 +02:00
utils.go fix(apiserver): properly handle Watch resourceVersion and bookmarks 2026-01-16 16:02:44 +01:00