talos
talos copied to clipboard
Swap disk/file
Feature Request
Make possible to add swap disk/file to the system at boot time.
Description
When memory is not enough or memory pressure, system processes need a few extra memory to finish some jobs/gracefully stop pods etc. A small swap disk can help with that.
Proposal:
# example
machine:
swap:
disk: /dev/sda
# or
size: 1Gb
The swap can be disk/partition (azure has special disk for swap) or file in ephemeral storage.
Swap has to be alway encrypted. The encryption key is auto generated at boot time.
Sysctl param sets to vm.swappiness=1
If disk param is not set - Talos creates a swap-file with defined size.
disk and size cannot be set in the same time(?)