-
-
-
-
-
Some Kubernetes readings are stale
-
- Readiness and alerts may reflect an older report. Check that the Pulse agent is still
- reporting Kubernetes data.
-
-
-
-
{/*
Problems lead, inventory follows: active health signals, then the
nodes that are not Ready or have an open alert, before the cluster
diff --git a/frontend-modern/src/features/kubernetes/__tests__/KubernetesPageSurface.contract.test.tsx b/frontend-modern/src/features/kubernetes/__tests__/KubernetesPageSurface.contract.test.tsx
index c6cb4cb990..de48293cf1 100644
--- a/frontend-modern/src/features/kubernetes/__tests__/KubernetesPageSurface.contract.test.tsx
+++ b/frontend-modern/src/features/kubernetes/__tests__/KubernetesPageSurface.contract.test.tsx
@@ -278,6 +278,61 @@ describe('KubernetesPageSurface contract', () => {
expect(screen.queryByText('Some Kubernetes readings are stale')).toBeNull();
});
+ it.each([
+ ['/kubernetes/nodes', 'k8s-node', 'nodes-table'],
+ ['/kubernetes/workloads', 'k8s-deployment', 'deployments-table'],
+ ['/kubernetes/services', 'k8s-service', 'services-table'],
+ ['/kubernetes/storage', 'k8s-storage-class', 'storage-table'],
+ ['/kubernetes/configuration', 'k8s-configmap', 'config-table'],
+ ['/kubernetes/events', 'k8s-event', 'events-table'],
+ ] as const)(
+ 'shows and clears the stale Kubernetes banner on %s without hiding tab rows',
+ (path, type, tableTestId) => {
+ mockPathname.mockReturnValue(path);
+ const [sourceStatus, setSourceStatus] = createStore
>({
+ agent: { status: 'online', lastSeen: '2026-12-01T19:00:00Z' },
+ kubernetes: { status: 'pending', lastSeen: '2026-12-01T19:00:00Z' },
+ });
+ setResources([
+ makeResource({ id: 'cluster-1', type: 'k8s-cluster', sourceStatus }),
+ makeResource({ id: `${type}-1`, type, sourceStatus }),
+ ]);
+ renderSurface();
+
+ const warning = () => screen.queryByText('Some Kubernetes readings are stale');
+ const table = screen.getByTestId(tableTestId);
+ expect(warning()).toBeNull();
+ expect(table).toHaveAttribute('data-rows', '1');
+
+ setSourceStatus('kubernetes', 'status', 'stale');
+ const notice = warning()?.closest('[role="status"]');
+ expect(notice).toHaveTextContent('Readiness and alerts may reflect an older report.');
+ expect(
+ notice!.compareDocumentPosition(table) & Node.DOCUMENT_POSITION_FOLLOWING,
+ ).toBeTruthy();
+ expect(table).toBeVisible();
+
+ setSourceStatus('kubernetes', 'status', 'online');
+ expect(warning()).toBeNull();
+ expect(table).toBeVisible();
+ },
+ );
+
+ it('does not infer stale Kubernetes readings from a stale agent source on non-Overview tabs', () => {
+ mockPathname.mockReturnValue('/kubernetes/nodes');
+ setResources([
+ makeResource({
+ id: 'node-1',
+ type: 'agent',
+ sources: ['agent', 'kubernetes'],
+ sourceStatus: { agent: { status: 'stale', lastSeen: '2026-12-01T18:00:00Z' } },
+ kubernetes: { ready: true },
+ }),
+ ]);
+ renderSurface();
+ expect(screen.queryByText('Some Kubernetes readings are stale')).toBeNull();
+ });
+
it('names a Ready node with an open alert among the nodes needing attention', () => {
setResources([
makeResource({ id: 'cluster-1', type: 'k8s-cluster' }),