forked from mirrors/nixpkgs
The systemd unit for k3s should differ between agents and servers
This commit is contained in:
parent
af3e5fc48a
commit
41a95b1b7d
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue