about summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-03-26 12:06:41 +0000
committerGitHub <noreply@github.com>2021-03-26 12:06:41 +0000
commiteddd1a74ecc621a6abccb01713e6cddf99e463b0 (patch)
treeedec8ca164a2331c7da946e6463d36011a5ac4e0 /pkgs/applications/networking/cluster
parent26fdaef6b2784ce5c1d84fafb507fce6bfcefc6f (diff)
parent36f2c10ca51ebb44d7494ee20c73648c644859c7 (diff)
downloadnixlib-eddd1a74ecc621a6abccb01713e6cddf99e463b0.tar
nixlib-eddd1a74ecc621a6abccb01713e6cddf99e463b0.tar.gz
nixlib-eddd1a74ecc621a6abccb01713e6cddf99e463b0.tar.bz2
nixlib-eddd1a74ecc621a6abccb01713e6cddf99e463b0.tar.lz
nixlib-eddd1a74ecc621a6abccb01713e6cddf99e463b0.tar.xz
nixlib-eddd1a74ecc621a6abccb01713e6cddf99e463b0.tar.zst
nixlib-eddd1a74ecc621a6abccb01713e6cddf99e463b0.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/applications/networking/cluster')
-rw-r--r--pkgs/applications/networking/cluster/helm/wrapper.nix4
-rw-r--r--pkgs/applications/networking/cluster/k3s/default.nix23
-rw-r--r--pkgs/applications/networking/cluster/k3s/patches/0001-Use-rm-from-path-in-go-generate.patch25
-rw-r--r--pkgs/applications/networking/cluster/kubeconform/default.nix22
-rw-r--r--pkgs/applications/networking/cluster/octant/default.nix8
5 files changed, 43 insertions, 39 deletions
diff --git a/pkgs/applications/networking/cluster/helm/wrapper.nix b/pkgs/applications/networking/cluster/helm/wrapper.nix
index edad7fa1bc99..21a29e31243b 100644
--- a/pkgs/applications/networking/cluster/helm/wrapper.nix
+++ b/pkgs/applications/networking/cluster/helm/wrapper.nix
@@ -1,6 +1,4 @@
-{ stdenv, symlinkJoin, lib, makeWrapper
-, writeText
-}:
+{ symlinkJoin, lib, makeWrapper, writeText }:
 
 helm:
 
diff --git a/pkgs/applications/networking/cluster/k3s/default.nix b/pkgs/applications/networking/cluster/k3s/default.nix
index 739992e6bc0b..7c79c4896bc0 100644
--- a/pkgs/applications/networking/cluster/k3s/default.nix
+++ b/pkgs/applications/networking/cluster/k3s/default.nix
@@ -19,6 +19,7 @@
 , fetchurl
 , fetchzip
 , fetchgit
+, zstd
 }:
 
 with lib;
@@ -43,9 +44,9 @@ with lib;
 # Those pieces of software we entirely ignore upstream's handling of, and just
 # make sure they're in the path if desired.
 let
-  k3sVersion = "1.19.4+k3s2";     # k3s git tag
+  k3sVersion = "1.20.4+k3s1";     # k3s git tag
   traefikChartVersion = "1.81.0"; # taken from ./scripts/download at the above k3s tag
-  k3sRootVersion = "0.7.1";       # taken from ./scripts/download at the above k3s tag
+  k3sRootVersion = "0.8.1";       # taken from ./scripts/download at the above k3s tag
   k3sCNIVersion = "0.8.6-k3s1";   # taken from ./scripts/version.sh at the above k3s tag
   # bundled into the k3s binary
   traefikChart = fetchurl {
@@ -64,7 +65,7 @@ let
   k3sRoot = fetchzip {
     # Note: marked as apache 2.0 license
     url = "https://github.com/k3s-io/k3s-root/releases/download/v${k3sRootVersion}/k3s-root-amd64.tar";
-    sha256 = "1wjg54816plbdwgv0dibq6dzmcakcmx0wiqijvr4f3gsxgk59zwf";
+    sha256 = "sha256-r3Nkzl9ccry7cgD3YWlHvEWOsWnnFGIkyRH9sx12gks=";
     stripRoot = false;
   };
   k3sPlugins = buildGoPackage rec {
@@ -95,7 +96,7 @@ let
     url = "https://github.com/k3s-io/k3s";
     rev = "v${k3sVersion}";
     leaveDotGit = true; # ./scripts/version.sh depends on git
-    sha256 = "1qxjdgnq8mf54760f0vngcqa2y3b048pcmfsf1g593b2ij1kg1zi";
+    sha256 = "0rmn3nh8a94axv6lb2xjnn3gpq0scnvj69bvcs74azvw62fvq016";
   };
   # Stage 1 of the k3s build:
   # Let's talk about how k3s is structured.
@@ -126,7 +127,12 @@ let
 
     src = k3sRepo;
 
-    patches = [ ./patches/0001-Use-rm-from-path-in-go-generate.patch ./patches/0002-Add-nixpkgs-patches.patch ];
+    # Patch build scripts so that we can use them.
+    # This makes things more dynamically linked (because nix can deal with
+    # dynamically linked dependencies just fine), removes the upload at the
+    # end, and skips building runc + cni, since we have our own derivations for
+    # those.
+    patches = [ ./patches/0002-Add-nixpkgs-patches.patch ];
 
     nativeBuildInputs = [ git pkg-config ];
     buildInputs = [ libseccomp ];
@@ -166,9 +172,10 @@ let
 
     src = k3sRepo;
 
-    patches = [ ./patches/0001-Use-rm-from-path-in-go-generate.patch ./patches/0002-Add-nixpkgs-patches.patch ];
+    # See the above comment in k3sBuildStage1
+    patches = [ ./patches/0002-Add-nixpkgs-patches.patch ];
 
-    nativeBuildInputs = [ git pkg-config ];
+    nativeBuildInputs = [ git pkg-config zstd ];
     # These dependencies are embedded as compressed files in k3s at runtime.
     # Propagate them to avoid broken runtime references to libraries.
     propagatedBuildInputs = [ k3sPlugins k3sBuildStage1 runc ];
@@ -255,10 +262,12 @@ stdenv.mkDerivation rec {
   # Use a wrapper script to reference all the binaries that k3s tries to
   # execute, but that we didn't bundle with it.
   installPhase = ''
+    runHook preInstall
     mkdir -p "$out/bin"
     makeWrapper ${k3sBin}/bin/k3s "$out/bin/k3s" \
       --prefix PATH : ${lib.makeBinPath k3sRuntimeDeps} \
       --prefix PATH : "$out/bin"
+    runHook postInstall
   '';
 
   meta = {
diff --git a/pkgs/applications/networking/cluster/k3s/patches/0001-Use-rm-from-path-in-go-generate.patch b/pkgs/applications/networking/cluster/k3s/patches/0001-Use-rm-from-path-in-go-generate.patch
deleted file mode 100644
index c439241e8558..000000000000
--- a/pkgs/applications/networking/cluster/k3s/patches/0001-Use-rm-from-path-in-go-generate.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From e79ddef65d08599ae3fe8ff39d202ea2416650b8 Mon Sep 17 00:00:00 2001
-From: Euan Kemp <euank@euank.com>
-Date: Sun, 31 May 2020 17:27:05 -0700
-Subject: [PATCH 1/2] Use 'rm' from path in go generate
-
-/bin/rm is less portable. On some distros, like nixos, it doesn't exist
-at all.
----
- main.go | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/main.go b/main.go
-index 62908bb7bb..0527222887 100644
---- a/main.go
-+++ b/main.go
-@@ -1,5 +1,5 @@
- //go:generate go run pkg/codegen/cleanup/main.go
--//go:generate /bin/rm -rf pkg/generated
-+//go:generate rm -rf pkg/generated
- //go:generate go run pkg/codegen/main.go
- //go:generate go fmt pkg/deploy/zz_generated_bindata.go
- //go:generate go fmt pkg/static/zz_generated_bindata.go
--- 
-2.25.4
-
diff --git a/pkgs/applications/networking/cluster/kubeconform/default.nix b/pkgs/applications/networking/cluster/kubeconform/default.nix
new file mode 100644
index 000000000000..ca5e30154da4
--- /dev/null
+++ b/pkgs/applications/networking/cluster/kubeconform/default.nix
@@ -0,0 +1,22 @@
+{ lib, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "kubeconform";
+  version = "0.4.6";
+
+  src = fetchFromGitHub {
+    owner = "yannh";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-lduHYYskEPUimEX54ymOyo5jY7GGBB42YTefDMNS4qo=";
+  };
+
+  vendorSha256 = null;
+
+  meta = with lib; {
+    description = "A FAST Kubernetes manifests validator, with support for Custom Resources!";
+    homepage    = "https://github.com/yannh/kubeconform/";
+    license     = licenses.asl20;
+    maintainers = [ maintainers.j4m3s ];
+  };
+}
diff --git a/pkgs/applications/networking/cluster/octant/default.nix b/pkgs/applications/networking/cluster/octant/default.nix
index 453c1406fd20..0e97b541a5dc 100644
--- a/pkgs/applications/networking/cluster/octant/default.nix
+++ b/pkgs/applications/networking/cluster/octant/default.nix
@@ -15,12 +15,12 @@ let
 in
 stdenv.mkDerivation rec {
   pname = "octant";
-  version = "0.17.0";
+  version = "0.18.0";
 
   src = fetchsrc version {
-    x86_64-linux = "sha256-kYS8o97HBjNgwmrG4fjsqFWxZy6ATFOhxt6j3KMZbEc=";
-    aarch64-linux = "sha256-/Tpna2Y8+PQt+SeOJ9NDweRWGiQXU/sN+Wh/vLYQPwM=";
-    x86_64-darwin = "sha256-aOUmnD+l/Cc5qTiHxFLBjCatszmPdUc4YYZ6Oy5DT3U=";
+    x86_64-linux = "sha256-D/pHOXR7XQoJCGqUep1lBAY4239HH35m+evFd21pcK0=";
+    aarch64-linux = "sha256-aL1axz3ebqrKQ3xK2UgDMQ+o6ZKgIvwy6Phici7WT2c=";
+    x86_64-darwin = "sha256-MFxOAAEnLur0LJJNU0SSlO+bH4f18zOfZNA49fKEQEw=";
   };
 
   dontConfigure = true;