Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-21.05] linkerd: 2020-05-01 -> edge-21.6.2 #127154

Merged
merged 3 commits into from
Jun 20, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 64 additions & 20 deletions pkgs/applications/networking/cluster/linkerd/default.nix
Original file line number Diff line number Diff line change
@@ -1,27 +1,71 @@
{ lib, fetchFromGitHub, buildGoModule }:
{ lib, fetchFromGitHub, buildGoModule, installShellFiles }:

buildGoModule {
pname = "linkerd-unstable";
version = "2020-05-01";
let generic = { channel, version, sha256, vendorSha256 }:
buildGoModule rec {
pname = "linkerd-${channel}";
inherit version vendorSha256;

src = fetchFromGitHub {
owner = "linkerd";
repo = "linkerd2";
rev = "9e9f3bb1e2aeab8cf20f98f5cad159bbb6f24883";
sha256 = "1pvj31wz1klwhcqga1m8kixdqsxwmppp9ix6r3wpp4dwfig45fm0";
};
src = fetchFromGitHub {
owner = "linkerd";
repo = "linkerd2";
rev = "${channel}-${version}";
inherit sha256;
};

subPackages = [ "cli" ];
runVend = true;

preBuild = ''
env GOFLAGS="" go generate ./pkg/charts/static
env GOFLAGS="" go generate ./jaeger/static
env GOFLAGS="" go generate ./multicluster/static
env GOFLAGS="" go generate ./viz/static
'';

buildFlagsArray = [
"-tags=prod"
];

ldflags = [
"-s" "-w"
"-X github.com/linkerd/linkerd2/pkg/version.Version=${src.rev}"
];

vendorSha256 = "0vls58ld50jca5yn73kvg3lx4z83cc7skky54a90pkbj737y58pz";
nativeBuildInputs = [ installShellFiles ];

doCheck = false;
postInstall = ''
mv $out/bin/cli $out/bin/linkerd
installShellCompletion --cmd linkerd \
--bash <($out/bin/linkerd completion bash) \
--zsh <($out/bin/linkerd completion zsh) \
--fish <($out/bin/linkerd completion fish)
'';

subPackages = [ "cli/cmd" ];
doInstallCheck = true;
installCheckPhase = ''
$out/bin/linkerd version --client | grep ${src.rev} > /dev/null
'';

meta = with lib; {
description = "A service mesh for Kubernetes and beyond";
homepage = "https://linkerd.io/";
license = licenses.asl20;
maintainers = with maintainers; [ Gonzih ];
broken = true;
meta = with lib; {
description = "A simple Kubernetes service mesh that improves security, observability and reliability";
downloadPage = "https://github.com/linkerd/linkerd2/";
homepage = "https://linkerd.io/";
license = licenses.asl20;
maintainers = with maintainers; [ Gonzih bryanasdev000 superherointj ];
};
};
}
in
{
stable = generic {
channel = "stable";
version = "2.10.2";
sha256 = "sha256-dOD0S4FJ2lXE+1VZooi8tKvC8ndGEHAxmAvSqoWI/m0=";
vendorSha256 = "sha256-Qb0FZOvKL9GgncfUl538PynkYbm3V8Q6lUpApUoIp5s=";
};
edge = generic {
channel = "edge";
version = "21.6.2";
sha256 = "sha256-kgdKH+cIYRg5A3+wrJJ7jcY6Xl206EwBYa37PT3xn1k";
vendorSha256 = "sha256-QVLg1ZRsNQPM4lERVHpZLbd+I32JZ1pbGNSGIVTbseg=";
};
}
4 changes: 3 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24631,7 +24631,9 @@ in

fluxcd = callPackage ../applications/networking/cluster/fluxcd { };

linkerd = callPackage ../applications/networking/cluster/linkerd { };
linkerd_stable = (callPackage ../applications/networking/cluster/linkerd { }).stable;
linkerd_edge = (callPackage ../applications/networking/cluster/linkerd { }).edge;
linkerd = linkerd_edge;

kile-wl = callPackage ../applications/misc/kile-wl { };

Expand Down