1
0
mirror of https://github.com/tboerger/nixos-config synced 2024-11-22 18:21:58 +01:00

feat: add kubectl plugins

This commit is contained in:
Thomas Boerger 2022-12-04 01:15:24 +01:00
parent b5acc2ea31
commit 5642b97943
No known key found for this signature in database
GPG Key ID: 09745AFF9D63C79B
11 changed files with 238 additions and 25 deletions

@ -18,6 +18,13 @@ self: super:
};
};
protoc-gen-openapiv2 = super.callPackage ./protoc-gen-openapiv2 { };
kubectl-ktop = super.callPackage ./kubectl-ktop { };
kubectl-neat = super.callPackage ./kubectl-neat { };
kubectl-oomd = super.callPackage ./kubectl-oomd { };
kubectl-pexec = super.callPackage ./kubectl-pexec { };
kubectl-realname-diff = super.callPackage ./kubectl-realname-diff { };
kubectl-resource-versions = super.callPackage ./kubectl-resource-versions { };
kubectl-view-secret = super.callPackage ./kubectl-view-secret { };
kubectl-whoami = super.callPackage ./kubectl-whoami { };
tailscale-systray = super.callPackage ./tailscale-systray { };
}

@ -0,0 +1,29 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "kubectl-ktop";
version = "0.3.0";
src = fetchFromGitHub {
owner = "vladimirvivien";
repo = "ktop";
rev = "v${version}";
sha256 = "sha256-9TKXOKGsxtmyTGGVq7GDy4v3I9BF5SDc48dhrj1pw9Q=";
};
vendorSha256 = "sha256-IbWdq6t9tgly7MRRIRJK5sDHus+sF0AT843aI4quO3c=";
doCheck = false;
subPackages = [ "." ];
postInstall = ''
mv $out/bin/ktop $out/bin/kubectl-ktop
'';
meta = with lib; {
description = "A top-like tool for your Kubernetes clusters";
homepage = "https://github.com/vladimirvivien/ktop/";
license = licenses.asl20;
maintainers = with maintainers; [ tboerger ];
};
}

@ -0,0 +1,25 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "kubectl-neat";
version = "2.0.3";
src = fetchFromGitHub {
owner = "itaysk";
repo = "kubectl-neat";
rev = "v${version}";
sha256 = "sha256-j8v0zJDBqHzmLamIZPW9UvMe9bv/m3JUQKY+wsgMTFk=";
};
vendorSha256 = "sha256-vGXoYR0DT9V1BD/FN/4szOal0clsLlqReTFkAd2beMw=";
doCheck = false;
subPackages = [ "." ];
meta = with lib; {
description = "A kubectl plugin that cleans up Kubernetes yaml and json output to make it readable";
homepage = "https://github.com/itaysk/kubectl-neat/";
license = licenses.asl20;
maintainers = with maintainers; [ tboerger ];
};
}

@ -0,0 +1,29 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "kubectl-oomd";
version = "0.0.6";
src = fetchFromGitHub {
owner = "jdockerty";
repo = "kubectl-oomd";
rev = "v${version}";
sha256 = "sha256-OqiBIS0I20P8xfGats3eKIpzWmMEYFRdKQxqRMu6aYk=";
};
vendorSha256 = "sha256-7zqbvsYHCZB8b5YGfyTVBCXgtsRtRN7v01QsKdo1gDU=";
doCheck = false;
subPackages = [ "cmd/plugin" ];
postInstall = ''
mv $out/bin/plugin $out/bin/kubectl-oomd
'';
meta = with lib; {
description = "A kubectl plugin that shows pods/containers which have recently been OOMKilled";
homepage = "https://github.com/jdockerty/kubectl-oomd/";
license = licenses.asl20;
maintainers = with maintainers; [ tboerger ];
};
}

@ -0,0 +1,29 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "kubectl-pexec";
version = "0.4.0";
src = fetchFromGitHub {
owner = "ssup2";
repo = "kpexec";
rev = "v${version}";
sha256 = "sha256-3teKIjBc8ToCON+LcVD+WCOSzmYmDHW0T1t8tbodg3Q=";
};
vendorSha256 = "sha256-HmRwez3NFSF97Dc6fD/Tt78qNDjovkhlfqloYo2qG68=";
doCheck = false;
subPackages = [ "cmd/kpexec" ];
postInstall = ''
mv $out/bin/kpexec $out/bin/kubectl-pexec
'';
meta = with lib; {
description = "A kubectl plugin to run commands in a container with high privileges";
homepage = "https://github.com/ssup2/kpexec/";
license = licenses.mit;
maintainers = with maintainers; [ tboerger ];
};
}

@ -0,0 +1,25 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "kubectl-realname-diff";
version = "0.2.3";
src = fetchFromGitHub {
owner = "hhiroshell";
repo = "kubectl-realname-diff";
rev = "v${version}";
sha256 = "sha256-H9+a7nb90AI2VUiii0LbDdik+Ihe1blSdLYwJRVRE8w=";
};
vendorSha256 = "sha256-Hw7f9nJvcslr6wbmjz9XtMxAm2XYVb4yhW2LssQOxrQ=";
doCheck = false;
subPackages = [ "cmd/kubectl-realname_diff" ];
meta = with lib; {
description = "A kubectl plugin that diffs live and local resources ignoring Kustomize hash-suffixes";
homepage = "https://github.com/hhiroshell/kubectl-realname-diff/";
license = licenses.asl20;
maintainers = with maintainers; [ tboerger ];
};
}

@ -0,0 +1,29 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "kubectl-resource-versions";
version = "0.1.2";
src = fetchFromGitHub {
owner = "chengshiwen";
repo = "kubectl-resource-versions";
rev = "v${version}";
sha256 = "sha256-iHxJCM7mTHAQXbcrAvfocs+EEw/1xliA7qd1AcAEaPc=";
};
vendorSha256 = "sha256-7tVHrQGfU8/GhGI4P7he8OeE1vZ3wrnu+tbT97WxVAU=";
doCheck = false;
subPackages = [ "." ];
postInstall = ''
mv $out/bin/kubectl-resource-versions $out/bin/kubectl-resource_versions
'';
meta = with lib; {
description = "A kubectl plugin to print the supported API resources";
homepage = "https://github.com/chengshiwen/kubectl-resource-versions/";
license = licenses.asl20;
maintainers = with maintainers; [ tboerger ];
};
}

@ -0,0 +1,29 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "kubectl-view-secret";
version = "0.10.0";
src = fetchFromGitHub {
owner = "elsesiy";
repo = "kubectl-view-secret";
rev = "v${version}";
sha256 = "sha256-YBPwJQFP0B0YhJ/ecbCW+ko8byu4Y4Yv2IGH7GQT4PA=";
};
vendorSha256 = "sha256-DyC9HiUt4Oyc6q1nFN7Uis+odREW6e/oQpzf2DNvJz8=";
doCheck = false;
subPackages = [ "cmd" ];
postInstall = ''
mv $out/bin/cmd $out/bin/kubectl-view_secret
'';
meta = with lib; {
description = "A kubectl plugin to decode Kubernetes secrets";
homepage = "https://github.com/elsesiy/kubectl-view-secret/";
license = licenses.mit;
maintainers = with maintainers; [ tboerger ];
};
}

@ -0,0 +1,25 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "kubectl-whoami";
version = "0.0.44";
src = fetchFromGitHub {
owner = "rajatjindal";
repo = "kubectl-whoami";
rev = "v${version}";
sha256 = "sha256-HYHQIkmKlwfk/TylBiLY4X+317tqzeC48+e/QOtRBxo=";
};
vendorSha256 = "sha256-tezDL7YZKGpYzXShPylsUXDiLWos3C2Wt6jJCd61FYo=";
doCheck = false;
subPackages = [ "." ];
meta = with lib; {
description = "A kubectl plugin that gets the subject name using the effective kubeconfig";
homepage = "https://github.com/rajatjindal/kubectl-whoami/";
license = licenses.asl20;
maintainers = with maintainers; [ tboerger ];
};
}

@ -1,24 +0,0 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "protoc-gen-openapiv2";
version = "2.12.0";
src = fetchFromGitHub {
owner = "grpc-ecosystem";
repo = "grpc-gateway";
rev = "v${version}";
sha256 = "sha256-OthyGEMVQnK0jN9svlfAZUl52lt19jtLd1Oj3cuirx4=";
};
vendorSha256 = "sha256-UjwpFjHVaQT4irhbt2GGlYeNhDs9Dv73PcHKhMrQfQs=";
subPackages = [ "protoc-gen-openapiv2" ];
meta = with lib; {
description = "OpenAPI v2 support for Google's protocol buffers";
homepage = "https://grpc-ecosystem.github.io/grpc-gateway/";
license = licenses.bsd3;
maintainers = with maintainers; [ tboerger ];
};
}

@ -35,7 +35,17 @@ in
kind
krew
kubectl
kubectl-images
kubectl-ktop
kubectl-neat
kubectl-oomd
kubectl-pexec
kubectl-realname-diff
kubectl-resource-versions
kubectl-view-secret
kubectl-whoami
kubectx
kubelogin
kubernetes-helm
kustomize
kustomize-sops