-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
57 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
enable sshd-keygen.service | ||
|
||
# systemd-repart already runs in initrd, no reason to re-run it after switching to rootfs | ||
disable systemd-repart.service | ||
# Make sure k3s is not enabled by default | ||
disable k3s.service | ||
disable k3s-agent.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[Unit] | ||
Description=K3s agent | ||
Documentation=https://k3s.io | ||
Wants=network-online.target | ||
After=network-online.target | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
|
||
[Service] | ||
Type=notify | ||
EnvironmentFile=-/etc/systemd/system/%n.env | ||
KillMode=process | ||
Delegate=yes | ||
# Having non-zero Limit*s causes performance problems due to accounting overhead | ||
# in the kernel. We recommend using cgroups to do container-local accounting. | ||
LimitNOFILE=1048576 | ||
LimitNPROC=infinity | ||
LimitCORE=infinity | ||
TasksMax=infinity | ||
TimeoutStartSec=0 | ||
Restart=always | ||
RestartSec=5s | ||
ExecStartPre=/bin/sh -xc '! /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service' | ||
ExecStartPre=-/sbin/modprobe br_netfilter | ||
ExecStartPre=-/sbin/modprobe overlay | ||
ExecStart=/usr/bin/k3s agent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[Unit] | ||
Description=K3s server | ||
Documentation=https://k3s.io | ||
Wants=network-online.target | ||
After=network-online.target | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
|
||
[Service] | ||
Type=notify | ||
EnvironmentFile=-/etc/systemd/system/%n.env | ||
KillMode=process | ||
Delegate=yes | ||
# Having non-zero Limit*s causes performance problems due to accounting overhead | ||
# in the kernel. We recommend using cgroups to do container-local accounting. | ||
LimitNOFILE=1048576 | ||
LimitNPROC=infinity | ||
LimitCORE=infinity | ||
TasksMax=infinity | ||
TimeoutStartSec=0 | ||
Restart=always | ||
RestartSec=5s | ||
ExecStartPre=/bin/sh -xc '! /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service' | ||
ExecStartPre=-/sbin/modprobe br_netfilter | ||
ExecStartPre=-/sbin/modprobe overlay | ||
ExecStart=/usr/bin/k3s server |