Commit Graph

2668 Commits

Author SHA1 Message Date
rcourtman ed67706824 Keep Standalone availability checks in focused tab 2026-05-25 17:51:09 +01:00
rcourtman 697634da76 Consolidate Standalone IA governance 2026-05-25 17:28:22 +01:00
rcourtman ce37d78772 Normalize Standalone landing decision 2026-05-25 17:19:46 +01:00
rcourtman ed1770c4f4 Rename Agents surface to Standalone 2026-05-25 17:15:31 +01:00
rcourtman d6f60963a1 Show availability checks on Agents page 2026-05-25 16:44:16 +01:00
rcourtman 322457c03b Move availability checks to monitoring settings 2026-05-25 16:08:47 +01:00
rcourtman bfc79ff06d Retire remaining settings route aliases 2026-05-25 15:10:33 +01:00
rcourtman cfb16e6da1 Retire legacy settings infrastructure aliases 2026-05-25 14:07:17 +01:00
rcourtman 3c0bd12fc6 Retire aggregate route-state path builders 2026-05-25 13:42:26 +01:00
rcourtman 3f9c8168fb Retire legacy top-level browser aliases 2026-05-25 13:16:42 +01:00
rcourtman 8b0b1b0c6e Retire aggregate top-level workspace routes 2026-05-25 12:34:57 +01:00
rcourtman c9be4c86f2 Clarify aggregate workspace routes 2026-05-25 11:43:35 +01:00
rcourtman e38f0b8e1f Remove legacy infrastructure route 2026-05-25 11:04:38 +01:00
rcourtman 052e344e1b Add Kubernetes RBAC inventory to the agent + canonical + UI
Closes the only API-coverage gap from the Docker / Kubernetes IA
maturity review: Roles, ClusterRoles, RoleBindings, and
ClusterRoleBindings now flow from the Kubernetes agent through the
canonical resource registry into the Kubernetes platform-page
Configuration tab.

Agent: pkg/agents/kubernetes/report.go gains four new report struct
types that carry summary counts plus subject-kind sets; individual
subject names and full PolicyRule contents are deliberately omitted
so Pulse stays a "what permissions exist where" surface, not an RBAC
enumeration tool. internal/kubernetesagent/agent.go gains four
collectors that call rbacv1.RoleList/ClusterRoleList/etc. through the
existing runKubernetesCallWithRetry wrapper, matching the
ServiceAccount collector's RBAC-forbidden retry pattern.

Canonical: internal/models mirrors with NormalizeCollections coverage;
convert* funcs in internal/monitoring/kubernetes_agents.go translate
agent report -> model; ResourceTypeK8sRole / K8sClusterRole /
K8sRoleBinding / K8sClusterRoleBinding join the canonical type set;
registry ingest* + adapter resourceFrom* functions emit one Resource
per RBAC object with ruleCount / roleKind / roleName / subjectCount /
subjectKinds / aggregationLabels on the K8s meta; search mapping in
internal/api/resources.go and the privacy allow-list in
internal/api/org_handlers.go pick up the four new type tokens; the
K8s privacy category in unifiedresources/policy_metadata.go classifies
them like the rest of K8s.

Frontend: ResourceType union + ResourceKubernetesMeta carry the new
kinds and RBAC summary fields; KubernetesPageSurface query asks for
them; the page model buckets them into the Configuration group;
KubernetesConfigTable renders Role / ClusterRole rule counts and the
aggregated flag, plus RoleBinding / ClusterRoleBinding role refs and
"N subjects · Kind1, Kind2 +overflow" subject summaries.

Curated demo seeds per-namespace Roles + RoleBindings plus an
aggregated ClusterRole + ClusterRoleBinding for pulse-demo-monitoring
in each cluster so the Configuration tab renders 18 RBAC rows across
the three demo clusters.

Contracts updated for the canonical-shape guard: monitoring,
api-contracts, unified-resources, frontend-primitives,
organization-settings (canonical) plus agent-lifecycle and
storage-recovery (dependent via Extension Points). Verification
proofs extended: kubernetes_registry_test.go, kubernetes_agents_test.go,
agent_inventory_test.go (new TestCollectRBACInventoryReportsSummaryCountsOnly
that pins the subject-name-omission contract), demo_scenarios_test.go,
adapter_coverage_test.go, contract_test.go, org_handlers_test.go,
resourceIdentity.test.ts, reportingResourceTypes.test.ts,
KubernetesConfigTable.test.tsx, and the
subsystem_lookup_test.py line-anchor bumps that the contract edits
shifted (api-contracts 246 -> 253, organization-settings 92 -> 93).

Verified:
- go build ./internal/... ./cmd/... clean
- go test ./internal/unifiedresources/..., ./internal/mock/...,
  ./internal/kubernetesagent/..., ./internal/api/...,
  the K8s subset of ./internal/monitoring/... all clean (three
  pre-existing unrelated monitoring failures noted earlier remain
  unchanged by this commit)
- npm run type-check, lint:eslint, lint:theme,
  lint:canonical-platforms clean
- vitest: 70 K8s frontend tests pass including the new RBAC render
  coverage in KubernetesConfigTable.test.tsx
- browser proof on /kubernetes/configuration: 36 config rows
  including 18 RBAC rows across three clusters; ClusterRole
  "pulse-demo-monitoring" shows "12 rules · Aggregated";
  ClusterRoleBinding shows "3 subjects · Group, ServiceAccount +1"
2026-05-25 09:25:03 +01:00
rcourtman 29b5a9cc00 Give each curated Kubernetes demo cluster a distinct story
Per-cluster node profiles, kubelet versions, and degraded scenarios
replace the global rotation that made every demo cluster look like a
copy of the same one. Production EU keeps its prod-euw1-k8s-{01..05}
nodes and the NotReady worker on prod-euw1-k8s-03 (preserving the
existing host-posture test contract). Staging EU runs
stage-euw1-k8s-{01..05} and carries the payments-worker
CrashLoopBackOff. Development EU runs dev-euw1-{01..05} and carries
an ImagePullBackOff on cron-nightly-backfill (re-labelled from the
previous "Pending / PodInitializing" rotation so the curated
reconciler doesn't recover it). The unused Edge profile gets distinct
edge-pop-{lax,nrt,fra,iad,sin}-01 names + k3s version for when the
cluster count is bumped above three.

A new TestKubernetesDemoClustersTellDistinctStories test guards the
slice goal: each cluster's nodes use its own prefix, exactly one
cluster carries each degraded scenario, and every cluster has a
unique kubelet version. The monitoring subsystem contract is updated
to reflect the new three-cluster cast (Production EU + Staging EU +
Development EU) plus the per-cluster scenario distribution.

Side effect: with distinct node names per cluster, the K8s page
model's cluster-to-node matching now resolves all five nodes for
each cluster (previously two clusters showed "0 nodes" because every
cluster's nodes shared the same prod-euw1-* names, breaking
buildKubernetesClusterChildCounts' clusterId lookup).

Verified:
- go vet ./internal/mock/..., go test ./internal/mock/... clean
- browser proof on /kubernetes/overview: three clusters render with
  distinct versions (v1.30.4 / v1.31.2 / v1.32.0-rc.1) and 5 nodes
  each (vs the previous 5/0/0 split)
- /kubernetes/nodes: 15 rows across the three clusters with three
  distinct name prefixes; one red NotReady dot on Production EU's
  prod-euw1-k8s-03; fourteen green Ready dots elsewhere
2026-05-25 08:28:20 +01:00
rcourtman 6d7ee5d732 Tighten platform overview IA 2026-05-24 19:41:29 +01:00
rcourtman c713027379 Normalize Kubernetes workflow tab contracts 2026-05-24 19:26:04 +01:00
rcourtman a590024ca0 Consolidate container and Kubernetes platform tabs 2026-05-24 19:20:14 +01:00
rcourtman 3403104662 Expose Docker and Kubernetes API tab fields 2026-05-24 18:47:55 +01:00
rcourtman 223b11185f Add native Docker containers table 2026-05-24 17:41:35 +01:00
rcourtman a76a75bdf6 Split Kubernetes workload tabs 2026-05-24 17:13:26 +01:00
rcourtman f59ec0ceaf Add Kubernetes controllers native table 2026-05-24 16:38:49 +01:00
rcourtman a353d11493 Split Docker inventory into native tables 2026-05-24 15:54:23 +01:00
rcourtman eab8f0969b Add Kubernetes events native table 2026-05-24 15:32:19 +01:00
rcourtman ad844ece90 Add Kubernetes autoscaling native table 2026-05-24 15:20:59 +01:00
rcourtman 65e7147f2e Add Kubernetes policy native table 2026-05-24 15:10:36 +01:00
rcourtman 9d149ac11a Add Kubernetes config native table 2026-05-24 14:53:03 +01:00
rcourtman aa14a96644 Add Kubernetes services native table 2026-05-24 14:34:13 +01:00
rcourtman ecd3e4d377 Add Kubernetes networking native table 2026-05-24 14:21:25 +01:00
rcourtman 0d22db1a27 Add Kubernetes storage native table 2026-05-24 14:05:34 +01:00
rcourtman c8380613d7 Seed native platform tab fixtures 2026-05-24 13:16:00 +01:00
rcourtman 7c58ca0f79 Promote Kubernetes nodes to platform tab 2026-05-24 12:52:54 +01:00
rcourtman 49c9ca7656 Use metadata-only Kubernetes config inventory 2026-05-24 12:36:50 +01:00
rcourtman 120dd5353a Expand Docker Swarm metadata inventory 2026-05-24 12:07:10 +01:00
rcourtman 0d67ca1b4a Expand Kubernetes API-native inventory surfaces
Collect native Kubernetes config, policy, and autoscaling objects.
Project the new resource types through API filters, unified resources, mock fixtures, and Kubernetes tabs.
Keep Secret inventory metadata-only and route k8s-secret policy as restricted local-only.
2026-05-24 11:12:33 +01:00
rcourtman 89abed099c Expand Docker runtime inventory coverage 2026-05-24 10:24:42 +01:00
rcourtman f18502fc24 Expand Kubernetes native inventory coverage 2026-05-24 09:40:58 +01:00
rcourtman 6346929328 Expand Docker and Kubernetes platform projections 2026-05-24 08:58:02 +01:00
rcourtman d3934e19e3 Harden repository advisory boundaries 2026-05-24 08:15:29 +01:00
rcourtman 2bec995c10 Normalize provider-first status summaries
Update release-control status summaries to point at the provider-first platform landing decision instead of the superseded Infrastructure default.
2026-05-23 21:21:09 +01:00
rcourtman e2b7920f9d Normalize provider-first landing docs
Remove stale Infrastructure-default landing language from frontend and performance contracts after the provider-first platform landing decision.
2026-05-23 21:15:42 +01:00
rcourtman e96b046fc3 Keep platform landing provider-first
Keep authenticated platform landing and shell ordering provider-first, with Agents reserved as the fallback for agent-only estates.
2026-05-23 21:10:27 +01:00
rcourtman 4c422aa2a2 Keep Agents secondary in platform navigation
Prefer provider and runtime platform pages ahead of Agents for landing, primary navigation, mobile ordering, preloading, and command palette ordering.
2026-05-23 20:45:40 +01:00
rcourtman 78d124a392 Align Agents page with platform machine tables 2026-05-23 17:22:42 +01:00
rcourtman 5900a0f782 Promote agent platform navigation 2026-05-23 16:50:23 +01:00
rcourtman a57217b194 Add Version + Uptime columns to vSphere Hosts table
VsphereHostsTable was missing the Version (ESXi build) and Uptime
columns that Proxmox / Docker / Kubernetes / TrueNAS host
equivalents carry. The data was already piped through the
canonical projection — ESXi version on resource.agent.osVersion
(e.g. "8.0.3"), host uptime on resource.uptime (lifted from
InventoryMetrics.UptimeSeconds via the sys.uptime.latest
PerformanceManager counter wired in 23ea4e487 this morning) —
the table just didn't render columns for them.

VsphereHostsTable now renders Version and Uptime cells, ordered
Version-adjacent-to-Host and Uptime before vCenter to mirror the
Proxmox Nodes layout. Column widths trimmed to fit. Uptime uses
the shared formatUptime util in condensed form (e.g. "163d")
with the full label as the cell title attribute. Detail row
colspan bumps 9 to 11 to keep the drawer spanning the full row.

Plumbing the canonical Resource.Uptime through to the frontend
required two fallback extensions surfaced by the column audit:

- useUnifiedResources.ts toResource: the uptime fallback chain
  ended on platform-specific carve-outs (agent.uptimeSeconds,
  proxmox.uptime, pbs/pmg/kubernetes); vSphere populates only
  the canonical Resource.Uptime, so the chain has to land on
  v2.uptime. Same shape as the workloads-hook fix in e5b31f484.
- internal/monitoring/monitor.go monitorUptime: the websocket
  broadcast converter walked the same platform-specific chain
  and silently dropped vSphere host/VM uptime, then merge-
  clobbered the REST-loaded value once WS reconnect replayed
  the broadcast. Add the canonical resource.Uptime fallback so
  the broadcast payload carries uptime for VMware-backed rows
  consistently with the REST contract. Carve-outs still take
  precedence so existing platforms keep prior behavior.

Verified: vSphere overview Hosts table now renders esxi-01..07
with Version 8.0.3 and Uptime 147d-167d cells. No regression in
Proxmox / Docker / Kubernetes / TrueNAS uptime paths.

Contracts:
- monitoring.md documents the canonical Resource.Uptime fallback
  in monitorUptime and the carve-out precedence.
- unified-resources.md adds the same canonical-uptime fallback
  rule to the toResource consumer-side contract.
- storage-recovery.md amends rule 29 to call out that the
  canonical Resource.Uptime fallback is descriptive host/VM
  uptime only and must not be reinterpreted as backup recency
  or recovery cadence.

Proofs:
- internal/monitoring/canonical_guardrails_test.go locks the
  monitorUptime fallback contract: canonical Resource.Uptime is
  surfaced when no carve-out is set, carve-outs take precedence,
  nil when nothing populates.
- frontend-modern/src/hooks/__tests__/useUnifiedResources.test.ts
  asserts the toResource v2.uptime fallback for a vSphere-shaped
  payload with no platform-specific uptime carve-out.
2026-05-23 15:11:49 +01:00
rcourtman 973cdab880 Track vSphere uptime + guest disk on phase-1 proof matrix
The vSphere VM uptime + guest filesystem usage support added in
23ea4e487 extended the live-vCenter validation surface without
landing on the canonical phase-1 proof checklist. Lock the new
code paths there so the next real-environment pass exercises them
on the same checklist that already gates the support claim.

VMWARE_VCENTER_PHASE1_PROOF_MATRIX.md:
- New VC-8 "Operational metric surface" scenario covering
  sys.uptime / sys.osUptime PerformanceManager counters, the
  /api/vcenter/vm/{vm}/guest/local-filesystem REST endpoint, the
  canonical Resource.Uptime + metrics.disk projection, and the
  non-fatal degradation paths for Tools-stopped, powered-off, and
  privilege-restricted VMs.
- Proof record contract bumped from VC-0..VC-7 to VC-0..VC-8 and
  explicitly demands the guest filesystem privilege be captured.
- Existing automated coverage (vmware client test, mock fixture
  test, useWorkloads test) listed under VC-8 so the proof record
  starts at the right baseline.

VMWARE_VCENTER_PHASE1_PROOF_RECORD_TEMPLATE.md adds the matching
VC-8 observed/captured-evidence section and bumps its preamble.

VMWARE_VCENTER_PHASE1_ONBOARDING_SPEC.md amends the explicit
"minimum privilege set" unknown to call out guest filesystem
reads specifically, so the first real proof pass tightens that
guess into a documented privilege bundle.

VMWARE_VCENTER_PHASE1_API_RUNTIME_SPEC.md primary-source basis
adds developer.vmware.com references for the guest filesystem
endpoint and the sys.uptime / sys.osUptime counter conventions so
the new code paths are anchored on official VMware docs.
2026-05-23 12:06:27 +01:00
rcourtman 23ea4e4872 Surface vSphere VM uptime and guest disk usage
The vSphere adapter's InventoryMetrics struct only carried
throughput / utilisation metrics. Uptime and guest filesystem
usage weren't piped through at all, so the workloads table
rendered "0s" and empty cells for every vSphere VM.

Backend (internal/vmware):
- InventoryMetrics gains UptimeSeconds plus DiskUsedBytes /
  DiskTotalBytes / DiskPercent. Documented in the struct comment
  with the API sources they come from.
- PerformanceManager counter catalog adds sys.uptime.latest for
  hosts and VMs and sys.osUptime.latest for VMs. The mapping
  prefers guest OS uptime when present (Tools-reported) and falls
  back to VMX-process uptime. Counters verified against vSphere 8
  developer documentation.
- New per-VM REST collector calls
  GET /api/vcenter/vm/{vm}/guest/local-filesystem and aggregates
  per-mount capacity / free_space into DiskTotal / DiskUsed /
  DiskPercent. A 503 from vCenter (Tools not reporting) is
  classified as a non-fatal enrichment issue and the row stays
  blank rather than failing the collection.
- enrichInventorySnapshot now takes automationSessionID so the
  signals path can hit the REST endpoint alongside the VI/JSON
  PerformanceManager queries.
- Resource projection layer wires UptimeSeconds onto
  Resource.Uptime for hosts and VMs and the disk fields onto
  metrics.disk; cloneInventoryMetrics tracks the new pointers.

Mock (internal/mock):
- refreshVMwareInventoryMetrics synthesizes plausible per-resource
  uptime (1h - 30d base, climbing forward with snapshot time) and,
  for VMs only, a stable guest filesystem total (32-256 GiB) with
  naturally-oscillating used bytes via SampleMetric. Powered-off
  VMs drop the new pointers so the frontend renders "-" rather
  than zero, matching how the canonical "no data" signal already
  works for offline guests.

Frontend (useWorkloads.ts):
- The WorkloadGuest uptime fallback chain now lands on the
  canonical resource.uptime field. vSphere doesn't populate a
  platform-specific carve-out (only the canonical field), so the
  earlier proxmox/agent/docker/kubernetes-only chain was silently
  dropping vSphere uptime.

Contracts:
- monitoring.md documents the new InventoryMetrics fields, their
  vSphere collection sources, and the mock-fixture expectation.
- performance-and-scalability.md adds the canonical
  resource.uptime fallback rule to the workload mapping section.

Proofs:
- internal/mock/platform_fixtures_test.go asserts that powered-on
  vSphere VMs surface uptime + guest disk fields and powered-off
  VMs drop them.
- frontend-modern/src/hooks/__tests__/useWorkloads.test.ts adds a
  vSphere uptime fallback case.
- Existing vmware client test
  (TestClientCollectInventoryPreservesBaseInventoryWhenOptionalEnrichmentDegrades)
  teaches the mock vCenter to serve the new endpoint and updates
  the assertions to match the additional non-fatal issue surfaced
  when the unavailableVMGuestInfo knob also degrades the
  filesystem read.
2026-05-23 10:07:21 +01:00
rcourtman 5016cbc2ba Add vSphere network inventory
Project vCenter network inventory through canonical resources and add the vSphere Networks table backed by vCenter network topology. Align resource presentation coalescing so state and resource APIs share the same host contract.
2026-05-22 20:26:56 +01:00
rcourtman 6c7d64ae43 Carry vSphere cluster services
Project vCenter cluster HA and DRS service state through the VMware resource facet so existing hosts and VMs expose cluster posture as read-only topology context.
2026-05-22 19:18:46 +01:00