mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2024-10-30 07:59:38 +01:00
d1d7864337
Signed-off-by: Nicolas JENDROWIAK <75165555+shkuviak@users.noreply.github.com>
30 lines
963 B
Django/Jinja
30 lines
963 B
Django/Jinja
[Unit]
|
|
Description=Lightweight Kubernetes
|
|
Documentation=https://k3s.io
|
|
Wants=network-online.target
|
|
After=network-online.target
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
|
|
[Service]
|
|
Type=notify
|
|
EnvironmentFile=-/etc/default/%N
|
|
EnvironmentFile=-/etc/sysconfig/%N
|
|
EnvironmentFile=-/etc/systemd/system/k3s-agent.service.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/local/bin/k3s agent --data-dir {{ k3s_server_location }} --server https://{{ api_endpoint }}:{{ api_port }} --token {{ token }} {{ extra_agent_args }}
|