Commit b26ccee6 authored by Aos Dabbagh's avatar Aos Dabbagh
Browse files

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 :-)
parent 8df695fe
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
{ 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 { };

}
+34 −0
Original line number Diff line number Diff line
{ 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 ];
  };
}