Merge pull request #321410 from mogeko/rke2

rke2: add killall script
This commit is contained in:
Jonas Chevalier 2024-07-11 12:15:24 +02:00 committed by GitHub
commit 87fa27e3aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View file

@ -241,7 +241,7 @@ in
"kernel.panic_on_oops" = 1;
};
systemd.services.rke2 = {
systemd.services."rke2-${cfg.role}" = {
description = "Rancher Kubernetes Engine v2";
documentation = [ "https://github.com/rancher/rke2#readme" ];
after = [ "network-online.target" ];

View file

@ -7,6 +7,9 @@ lib: { rke2Version, rke2RepoSha256, rke2VendorHash, updateScript
# Runtime dependencies
, procps, coreutils, util-linux, ethtool, socat, iptables, bridge-utils, iproute2, kmod, lvm2
# Killall Script dependencies
, systemd, gnugrep, gnused
# Testing dependencies
, nixosTests, testers, rke2
}:
@ -72,6 +75,11 @@ buildGoModule rec {
install -D $GOPATH/bin/rke2 $out/bin/rke2
wrapProgram $out/bin/rke2 \
--prefix PATH : ${lib.makeBinPath buildInputs}
install -D ./bundle/bin/rke2-killall.sh $out/bin/rke2-killall.sh
wrapProgram $out/bin/rke2-killall.sh \
--prefix PATH : ${lib.makeBinPath [ systemd gnugrep gnused ]} \
--prefix PATH : ${lib.makeBinPath buildInputs}
'';
doCheck = false;