Files
home-network-k3s-impl/platform/kubevirt
jakman85andClaude Opus 4.8 b57b3e9d71 fix(kubevirt): correct KubeVirtControlPlaneDown expr — wrong metric name + job label
The alert fired continuously for ~21h while the control plane was fully
healthy (both virt-controller and virt-api pods 1/1 Ready, KubeVirt CR
Deployed/Available=True). Two bugs, each making it fire regardless of state:

  1. `kubevirt_virt_controller_ready` does not exist — the real metric is
     `kubevirt_virt_controller_ready_status` (KubeVirt suffixes `_status`),
     so that clause was always ABSENT (never matched).
  2. `absent(up{job="kubevirt"} == 1)` — the KubeVirt scrape job label is
     `kubevirt-prometheus-metrics` (the Service name), not `kubevirt`, so
     `up{job="kubevirt"}` matched nothing and absent() was permanently 1.

Fix: use `sum(kubevirt_virt_{controller,api}_ready_status) == 0` (fires only
when every replica is unready) and the correct job label. virt-api added to
match the alert's stated scope (virt-controller/virt-api).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-26 10:45:23 -05:00
..

platform/kubevirt

KubeVirt + CDI — run application VMs (IaaS) as Kubernetes resources on the same control plane, network, storage, and GitOps flow as containers.

What this stub is

A Kustomization that will pull the pinned KubeVirt operator + CDI operator release manifests (commented TODO — added in Phase 5), plus the KubeVirt and CDI custom resources that tune them. VM disks land on Longhorn PVCs via CDI; VMs inherit Cilium default-deny + egress classes.

Layer distinction (docs/01): these are Layer-2 application VMs (a feature the platform offers), NOT the Layer-1 cluster-node VMs (which WS-INFRA provisions with OpenTofu/libvirt). Do not conflate them.

Cross-workstream prerequisite

Nodes must expose virtualization extensions (nested virt in dev KVMs; native on prod) — a node baseline prerequisite owned by WS-INFRA (docs/02). Coordinate before Phase 5.

TODO (later phases — Phase 5, gated on Phases 2–3)

  • Add pinned operator release manifests as Kustomize bases; let Renovate maintain versions.
  • Run one representative application VM via a ServiceDefinition kind: vm; prove create/start/stop/ destroy via kubectl/virtctl, Longhorn-backed disk survives rebuild, default-deny + egress apply, guest auto-updates (Phase-5 exit gates).