From 8df695fef421b739013e263e9ac0cb6cb62f65b9 Mon Sep 17 00:00:00 2001 From: Aos Dabbagh <25783780+aos@users.noreply.github.com> Date: Fri, 5 Apr 2024 17:26:33 -0400 Subject: [PATCH 1/2] maintainers: add aos --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 6903a1e2581f..b952b91be319 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -1431,6 +1431,12 @@ githubId = 5411704; name = "Manuel Sanchez Pinar"; }; + aos = { + email = "n@aos.sh"; + github = "aos"; + githubId = 25783780; + name = "aos"; + }; apeschar = { email = "albert@peschar.net"; github = "apeschar"; From b26ccee60e3cabf50994727ef02d62719b1627f8 Mon Sep 17 00:00:00 2001 From: Aos Dabbagh <25783780+aos@users.noreply.github.com> Date: Fri, 5 Apr 2024 23:25:16 -0400 Subject: [PATCH 2/2] kubernetes-helm-mapkubeapis: init at 0.4.1 Was looking for this plugin, but couldn't find it. I found this open PR: NixOS#217530 but it seems to have gone stale (no activity in over a year). I posted in it but figured everyone is too busy so I just decided to resubmit, addressing comments :-) --- .../cluster/helm/plugins/default.nix | 4 +-- .../cluster/helm/plugins/helm-mapkubeapis.nix | 34 +++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 pkgs/applications/networking/cluster/helm/plugins/helm-mapkubeapis.nix diff --git a/pkgs/applications/networking/cluster/helm/plugins/default.nix b/pkgs/applications/networking/cluster/helm/plugins/default.nix index 1a6aa12a91e5..8ac059e98a24 100644 --- a/pkgs/applications/networking/cluster/helm/plugins/default.nix +++ b/pkgs/applications/networking/cluster/helm/plugins/default.nix @@ -1,17 +1,17 @@ { callPackage }: { + helm-cm-push = callPackage ./helm-cm-push.nix { }; helm-diff = callPackage ./helm-diff.nix { }; helm-git = callPackage ./helm-git.nix { }; - helm-cm-push = callPackage ./helm-cm-push.nix { }; + helm-mapkubeapis = callPackage ./helm-mapkubeapis.nix { }; helm-s3 = callPackage ./helm-s3.nix { }; helm-secrets = callPackage ./helm-secrets.nix { }; helm-unittest = callPackage ./helm-unittest.nix { }; - } diff --git a/pkgs/applications/networking/cluster/helm/plugins/helm-mapkubeapis.nix b/pkgs/applications/networking/cluster/helm/plugins/helm-mapkubeapis.nix new file mode 100644 index 000000000000..21cb8b065e7e --- /dev/null +++ b/pkgs/applications/networking/cluster/helm/plugins/helm-mapkubeapis.nix @@ -0,0 +1,34 @@ +{ buildGoModule, fetchFromGitHub, lib }: + +buildGoModule rec { + pname = "helm-mapkubeapis"; + version = "0.4.1"; + + src = fetchFromGitHub { + owner = "helm"; + repo = "helm-mapkubeapis"; + rev = "v${version}"; + hash = "sha256-6NeePXTdp5vlBLfIlWeXQZMZ0Uz/e1ZCgZmJvBJfaFw="; + }; + + vendorHash = "sha256-rVrQqeakPQl3rjzmqzHw74ffreLEVzP153wWJ8TEOIM="; + + # NOTE: Remove the install and upgrade hooks. + postPatch = '' + sed -i '/^hooks:/,+2 d' plugin.yaml + ''; + + postInstall = '' + install -dm755 $out/helm-mapkubeapis + mv $out/bin $out/helm-mapkubeapis/ + install -m644 -Dt $out/helm-mapkubeapis/config/ config/Map.yaml + install -m644 -Dt $out/helm-mapkubeapis plugin.yaml + ''; + + meta = { + description = "A Helm plugin which maps deprecated or removed Kubernetes APIs in a release to supported APIs"; + homepage = "https://github.com/helm/helm-mapkubeapis"; + license = with lib.licenses; [ asl20 ]; + maintainers = with lib.maintainers; [ aos ]; + }; +}