talos-extensions/power/nut-client
Mateusz Urbanek efcb066a66
docs: add SBOM for more extensions
Partial for #10940

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2025-07-31 16:17:06 +02:00
..
files feat: add nut-client 2022-09-08 10:36:06 +05:30
patches feat: bump dependencies 2025-05-08 20:16:40 +04:00
manifest.yaml chore: use machined for shutdown calls 2023-07-19 17:18:55 +05:30
nut-client.yaml feat: use ExtensionServiceConfig document 2024-02-15 20:42:20 +05:30
pkg.yaml docs: add SBOM for more extensions 2025-07-31 16:17:06 +02:00
README.md docs: improve nut-client docs 2024-06-24 09:12:08 +05:30
vars.yaml chore: adjust extension versions (tags) to drop Talos version 2024-01-31 17:05:13 +04:00

nut-client extension

Installation

See Installing Extensions.

Usage

Configure the extension via ExtensionServiceConfig document. You must replace upsmonHost, upsmonUser and upsmonPasswd to match configuration on your nut server. See upsd.users man page for details.

On Talos, SHUTDOWNCMD must be /sbin/poweroff.

---
apiVersion: v1alpha1
kind: ExtensionServiceConfig
name: nut-client
configFiles:
  - content: |-
        MONITOR ${upsmonHost} 1 ${upsmonUser} ${upsmonPass} secondary
        SHUTDOWNCMD "/sbin/poweroff"        
    mountPath: /usr/local/etc/nut/upsmon.conf

Then apply the patch to your node's MachineConfig:

$ talosctl patch mc -p @nut-config.yaml

You will then be able to verify that it is in place with the following command

$ talosctl get extensionserviceconfigs
NODE     NAMESPACE   TYPE                     ID           VERSION
mynode   runtime     ExtensionServiceConfig   nut-client   1

Testing

Confirm extension service is running:

$ talosctl service ext-nut-client
NODE     192.168.1.1
ID       ext-nut-client
STATE    Running
HEALTH   ?
EVENTS   [Running]: Started task ext-nut-client (PID 2263) for container ext-nut-client (59m59s ago)
         [Preparing]: Creating service runner (59m59s ago)
         [Preparing]: Running pre state (59m59s ago)
         [Waiting]: Waiting for service "cri" to be "up" (59m59s ago)
         [Waiting]: Waiting for service "cri" to be "up", network (1h0m0s ago)
         [Waiting]: Waiting for service "cri" to be registered, network (1h0m1s ago)
         [Waiting]: Waiting for service "containerd" to be "up", service "cri" to be registered, network (1h0m2s ago)
         [Waiting]: Waiting for service "containerd" to be "up", service "cri" to be "up", network (1h0m3s ago)

Trigger a “Full System Shutdown” on the NUT server:

$ upsmon -c fsd

CAUTION ⚠️ This will power off all connected systems.

All connected upsmon clients should perform a full shutdown and power off.