The broker is now load-bearing (heat pump, energy meters, EV charging, HA all ride on it) but was a slow-to-recover SPOF: single replica on a Ceph RWO PVC, no priority, default 5-min fault tolerations. mosquitto can't cluster, so rather than fake HA this minimizes recovery time and removes the storage coupling.
Changes
persistence false + drop the Ceph PVC. The db was only ~178 KB of retained messages (evcc state, HA discovery configs, Gen1 Shelly announce/state) — and I verified all of it is re-published by clients on reconnect (evcc republishes, Shellies re-send announce/online, HA re-publishes discovery). So the broker no longer needs Ceph to start, and reschedules with no RWO volume to fence/detach/reattach (the slowest part of failover today). Trade-off: a broker restart briefly empties retained state until clients reconnect — self-healing.
PriorityClass home-critical (1e6, below system-cluster-critical) — evicted last under node pressure, reschedules ahead of ordinary workloads. (New cluster-scoped resource in infrastructure/cluster-settings, which apps dependsOn, so it exists before the deployment references it.)
not-ready/unreachable tolerations → 30s (was default 300s): node-failure reschedule in ~30s instead of ~5min.
terminationGracePeriodSeconds 10 for faster Recreate rollovers.
Single replica + Recreate retained (two brokers would split clients/state). Net effect: Ceph-coupled, slow RWO failover → stateless, reschedules anywhere in seconds. Both kustomizations build clean.
Apply
Recreates the pod (brief MQTT reconnect; retained state re-populates as clients reconnect).
The old mosquitto-data PVC has prune: disabled, so Flux won't delete it — reclaim the Ceph space manually with kubectl -n home-assistant delete pvc mosquitto-data once you're happy.
This is the last big item from the review. Only path to true active-active HA beyond this would be re-platforming to a clustered broker (EMQX/VerneMQ) — out of scope.
The broker is now load-bearing (heat pump, energy meters, EV charging, HA all ride on it) but was a **slow-to-recover SPOF**: single replica on a **Ceph RWO PVC**, no priority, default **5-min** fault tolerations. mosquitto can't cluster, so rather than fake HA this **minimizes recovery time and removes the storage coupling**.
## Changes
- **`persistence false` + drop the Ceph PVC.** The db was only **~178 KB** of retained messages (evcc state, HA discovery configs, Gen1 Shelly announce/state) — and I verified all of it is **re-published by clients on reconnect** (evcc republishes, Shellies re-send `announce`/`online`, HA re-publishes discovery). So the broker no longer needs Ceph to start, and reschedules with **no RWO volume to fence/detach/reattach** (the slowest part of failover today). *Trade-off:* a broker restart briefly empties retained state until clients reconnect — self-healing.
- **PriorityClass `home-critical`** (1e6, below `system-cluster-critical`) — evicted last under node pressure, reschedules ahead of ordinary workloads. (New cluster-scoped resource in `infrastructure/cluster-settings`, which `apps` dependsOn, so it exists before the deployment references it.)
- **not-ready/unreachable tolerations → 30s** (was default 300s): node-failure reschedule in ~30s instead of ~5min.
- **terminationGracePeriodSeconds 10** for faster `Recreate` rollovers.
Single replica + `Recreate` retained (two brokers would split clients/state). Net effect: **Ceph-coupled, slow RWO failover → stateless, reschedules anywhere in seconds.** Both kustomizations build clean.
## Apply
- Recreates the pod (brief MQTT reconnect; retained state re-populates as clients reconnect).
- The old `mosquitto-data` PVC has `prune: disabled`, so Flux won't delete it — reclaim the Ceph space manually with `kubectl -n home-assistant delete pvc mosquitto-data` once you're happy.
This is the last big item from the review. Only path to *true* active-active HA beyond this would be re-platforming to a clustered broker (EMQX/VerneMQ) — out of scope.
The broker is now load-bearing (heat pump, energy meters, EV charging, HA all
depend on it) but was a slow-to-recover SPOF: single replica on a Ceph RWO PVC
with no priority and default 5-min fault tolerations. mosquitto can't cluster,
so instead of faking HA this minimizes recovery time and removes the storage
coupling.
- persistence false + drop the Ceph PVC. The db was only ~178 KB of retained
messages (evcc state, HA discovery, Gen1 Shelly announce/state) — all of
which clients re-publish on reconnect. Removing it means the broker no
longer depends on Ceph to start, and reschedules with no RWO volume to
fence/detach/reattach. Trade-off: a restart briefly empties retained state
until clients reconnect (self-healing).
- PriorityClass `home-critical` (1e6, below system-cluster-critical) so the
broker is evicted last and reschedules ahead of ordinary workloads.
- not-ready/unreachable tolerations at 30s (was default 300s) → node-failure
reschedule in ~30s instead of ~5min.
- terminationGracePeriodSeconds 10 for faster Recreate rollovers.
Single replica + Recreate retained (two brokers would split clients/state).
Apply notes:
- Recreates the pod (brief MQTT reconnect; retained state re-populates).
- The old PVC has prune:disabled, so Flux won't delete it — reclaim manually
with `kubectl -n home-assistant delete pvc mosquitto-data` once happy.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The broker is now load-bearing (heat pump, energy meters, EV charging, HA all ride on it) but was a slow-to-recover SPOF: single replica on a Ceph RWO PVC, no priority, default 5-min fault tolerations. mosquitto can't cluster, so rather than fake HA this minimizes recovery time and removes the storage coupling.
Changes
persistence false+ drop the Ceph PVC. The db was only ~178 KB of retained messages (evcc state, HA discovery configs, Gen1 Shelly announce/state) — and I verified all of it is re-published by clients on reconnect (evcc republishes, Shellies re-sendannounce/online, HA re-publishes discovery). So the broker no longer needs Ceph to start, and reschedules with no RWO volume to fence/detach/reattach (the slowest part of failover today). Trade-off: a broker restart briefly empties retained state until clients reconnect — self-healing.home-critical(1e6, belowsystem-cluster-critical) — evicted last under node pressure, reschedules ahead of ordinary workloads. (New cluster-scoped resource ininfrastructure/cluster-settings, whichappsdependsOn, so it exists before the deployment references it.)Recreaterollovers.Single replica +
Recreateretained (two brokers would split clients/state). Net effect: Ceph-coupled, slow RWO failover → stateless, reschedules anywhere in seconds. Both kustomizations build clean.Apply
mosquitto-dataPVC hasprune: disabled, so Flux won't delete it — reclaim the Ceph space manually withkubectl -n home-assistant delete pvc mosquitto-dataonce you're happy.This is the last big item from the review. Only path to true active-active HA beyond this would be re-platforming to a clustered broker (EMQX/VerneMQ) — out of scope.