Developer builds Kubernetes operator to automate homelab responses to network state changes
A software developer built UniFi Reactor, a Kubernetes operator that monitors UniFi network hardware state and triggers automated cluster responses based on conditions like power outages or WAN failovers. The tool was created after the developer noticed that adding a UPS and backup internet connection exposed a gap: Kubernetes had no awareness of network or power state changes. UniFi Reactor polls the UniFi Network API, normalizes data into state keys covering WAN status, UPS condition, and device health, and reconciles these against user-defined automation rules. For example, when the UPS switches to battery power, the operator can automatically scale down non-essential workloads like machine learning jobs and restore them when mains power returns. Unlike monitoring tools such as Prometheus, which alert on state changes, UniFi Reactor is designed to actively modify cluster behavior for the duration of a given condition.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in