The systemd unit for k3s should differ between agents and servers

This commit is contained in:
John Axel Eriksson 2020-04-22 23:00:14 +02:00
parent af3e5fc48a
commit 41a95b1b7d
No known key found for this signature in database
GPG Key ID: 04ED6F42C62F42E9

View File

@ -81,8 +81,8 @@ in
after = mkIf cfg.docker [ "docker.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
# Taken from https://github.com/rancher/k3s/blob/v1.17.4+k3s1/contrib/ansible/roles/k3s/node/templates/k3s.service.j2
Type = "notify";
# See: https://github.com/rancher/k3s/blob/dddbd16305284ae4bd14c0aade892412310d7edc/install.sh#L197
Type = if cfg.role == "agent" then "exec" else "notify";
KillMode = "process";
Delegate = "yes";
Restart = "always";