Fix klogs

This commit is contained in:
Lukas Cech 2025-02-03 13:09:50 +01:00
parent f9ed5be670
commit d16b8262c9

View File

@ -139,9 +139,11 @@ in
klogs = lib.mkDefault "${pkgs.writeShellScript "klogs" '' klogs = lib.mkDefault "${pkgs.writeShellScript "klogs" ''
ctx="$1" ctx="$1"
namespace="$2" shift
label="$3" namespace="$1"
echo=${pkgs.coreutils}/bin/echo shift
label="$1"
shift
if [[ "$ctx" == "" || "$namespace" == "" || "$label" == "" ]]; then if [[ "$ctx" == "" || "$namespace" == "" || "$label" == "" ]]; then
echo "Usage: klogs context namespace label" echo "Usage: klogs context namespace label"
@ -154,7 +156,7 @@ in
exit 1 exit 1
fi fi
kubectl --context "$ctx" logs -f -n "$namespace" -l "$label" kubectl --context "$ctx" logs -f -n "$namespace" -l "$label" $@
''}"; ''}";
nixfix = lib.mkDefault "nix fmt ./**/*.nix"; nixfix = lib.mkDefault "nix fmt ./**/*.nix";