All checks were successful
continuous-integration/drone/push Build is passing
31 lines
1.1 KiB
Django/Jinja
31 lines
1.1 KiB
Django/Jinja
[Unit]
|
|
Description=Lightweight Kubernetes
|
|
Documentation=https://k3s.io
|
|
After=network-online.target
|
|
|
|
[Service]
|
|
Type=notify
|
|
EnvironmentFile=/etc/systemd/system/k3s.service.env
|
|
{% if kubernetes_master|bool %}
|
|
{% if vars['KubernetesMasterConfigured_' ~ kubernetes_cluster_name] is not defined %}
|
|
ExecStart=/usr/local/bin/k3s server --flannel-backend=wireguard --disable traefik --secrets-encryption --cluster-init
|
|
{% else %}
|
|
ExecStart=/usr/local/bin/k3s server --flannel-backend=wireguard --disable traefik --secrets-encryption --server https://{{ kubernetes_master }}:6443 --token ${NODE_TOKEN}
|
|
{% endif %}
|
|
{% else %}
|
|
ExecStart=/usr/local/bin/k3s agent --server https://{{ kubernetes_master }}:6443 --token ${NODE_TOKEN}
|
|
{% endif %}
|
|
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
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|