Skip to content

In-cluster HA: host fencing + automatic VM restart - #137

Open
epheo wants to merge 5 commits into
mainfrom
feat/ha-fencing
Open

In-cluster HA: host fencing + automatic VM restart#137
epheo wants to merge 5 commits into
mainfrom
feat/ha-fencing

Conversation

@epheo

@epheo epheo commented Jul 31, 2026

Copy link
Copy Markdown
Owner

The vSphere HA analog, GitOps-shaped. Enabling stages the Medik8s Node Health
Check operator install + a NodeHealthCheck CR into the platform repo; on merge,
unresponsive workers are fenced (Self Node Remediation, resource-deletion
strategy) and KubeVirt restarts their VMs on surviving hosts.

Mirrors the DRS tier exactly, one file set per layer:

  • hagen: renders the NHC file set (namespace, all-namespaces OperatorGroup,
    NHC + SNR Subscriptions, CR). SNR is subscribed explicitly: its OLM
    dependency from NHC does not resolve on every catalog (observed live), and
    the NodeHealthCheck is dead weight without the SelfNodeRemediationTemplate
    CRD. Control-plane nodes are excluded from fencing (etcd quorum). The SNR
    resource-deletion template also deletes VolumeAttachments, which is what
    frees RWO volumes for restart.
  • nodehealth: discovery-gated SA reflector over NodeHealthCheck; absence
    reads as "not installed", never an error loop.
  • changeset/draft: declarative HA staging (wholesale replace, base-equal
    files skipped, re-submit-committed = cancel), atomic unstage.
  • /api/ha: GET view across git/draft/live planes, POST/DELETE gated on the
    caller's nodehealthchecks-create SSAR; nodehealthchecks joins the
    platform-author family.
  • web: HA card + modal under cluster Configure, beside DRS. Surfaces live
    fencing in progress, operator self-disable reason (e.g. a conflicting
    MachineHealthCheck), and the reboot consequence before staging.

Spec knobs kept minimal: detection patience (60-3600s, default 300) and
minimum-healthy brake (default 51%). SelfNodeRemediation needs no BMC
hardware; Fence Agents Remediation stays a follow-up (its credentials must
not live in git; NHC would then switch to escalatingRemediations - FAR
first, SNR fallback).

Deliberate skip: no issues-plane rule. Issues derive from the streamed
Inventory only; HA degradation surfaces in the card, same as DRS.

Tests: hagen render/validate/round-trip incl. the explicit SNR Subscription,
nodehealth live-state (remediating sort, Disabled reason), changeset staging
flows incl. atomic unstage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant