k8s.io/test-infra@v0.0.0-20240520184403-27c6b4c223d8/jobs/e2e_node/crio/templates/base/swap-1G.yaml (about)

     1  ---
     2  systemd:
     3    units:
     4      - name: swap-enable.service
     5        enabled: true
     6        contents: |
     7          [Unit]
     8          Description=Enable swap on CoreOS
     9          Before=crio-install.service
    10  
    11          [Service]
    12          Type=oneshot
    13          ExecStart=/bin/sh -c "sudo dd if=/dev/zero of=/var/swapfile count=1024 bs=1MiB && sudo chmod 600 /var/swapfile && sudo mkswap /var/swapfile && sudo swapon /var/swapfile && free -h"
    14  
    15          [Install]
    16          WantedBy=multi-user.target