2019-04-26 21:10:27 +02:00
|
|
|
[Unit]
|
|
|
|
Description=Lightweight Kubernetes
|
|
|
|
Documentation=https://k3s.io
|
2023-11-09 00:16:28 +01:00
|
|
|
Wants=network-online.target
|
2019-04-30 01:28:58 +02:00
|
|
|
After=network-online.target
|
2020-03-01 15:01:31 +01:00
|
|
|
|
2023-11-09 00:16:28 +01:00
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
|
2019-04-26 21:10:27 +02:00
|
|
|
[Service]
|
2020-03-01 15:01:31 +01:00
|
|
|
Type=notify
|
2023-11-09 00:16:28 +01:00
|
|
|
EnvironmentFile=-/etc/default/%N
|
|
|
|
EnvironmentFile=-/etc/sysconfig/%N
|
|
|
|
EnvironmentFile=-/etc/systemd/system/k3s.service.env
|
2019-04-26 21:10:27 +02:00
|
|
|
KillMode=process
|
|
|
|
Delegate=yes
|
2020-05-03 09:27:54 +02:00
|
|
|
# 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
|
2019-04-26 21:10:27 +02:00
|
|
|
LimitNPROC=infinity
|
|
|
|
LimitCORE=infinity
|
|
|
|
TasksMax=infinity
|
2020-04-29 21:34:54 +02:00
|
|
|
TimeoutStartSec=0
|
2019-05-08 02:54:40 +02:00
|
|
|
Restart=always
|
2019-07-26 20:05:54 +02:00
|
|
|
RestartSec=5s
|
2023-11-09 00:16:28 +01:00
|
|
|
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/local/bin/k3s agent --data-dir {{ k3s_server_location }} --server https://{{ api_endpoint }}:{{ api_port }} --token {{ token }} {{ extra_agent_args }}
|