about summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster
diff options
context:
space:
mode:
authorCharles Strahan <charles@cstrahan.com>2018-03-17 01:35:35 -0400
committerCharles Strahan <charles@cstrahan.com>2018-03-30 17:33:45 -0400
commit709b6f664e472ae2075bbee83bfb1dd1ba95e0e7 (patch)
tree9734a502a41317637cb25a8986c47c1e8d7a7224 /pkgs/applications/networking/cluster
parent5de6ee22d1286b8b87b8dae56a1310f4b43af81e (diff)
downloadnixlib-709b6f664e472ae2075bbee83bfb1dd1ba95e0e7.tar
nixlib-709b6f664e472ae2075bbee83bfb1dd1ba95e0e7.tar.gz
nixlib-709b6f664e472ae2075bbee83bfb1dd1ba95e0e7.tar.bz2
nixlib-709b6f664e472ae2075bbee83bfb1dd1ba95e0e7.tar.lz
nixlib-709b6f664e472ae2075bbee83bfb1dd1ba95e0e7.tar.xz
nixlib-709b6f664e472ae2075bbee83bfb1dd1ba95e0e7.tar.zst
nixlib-709b6f664e472ae2075bbee83bfb1dd1ba95e0e7.zip
nixos: kubernetes fixes
* Fix reference CNI plugins
  * The plugins were split out of the upstream cni repo around version
    0.6.0

* Fix RBAC and DNS tests
  * Fix broken apiVersion fields
  * Change plugin linking to look in ${package}/bin rather than
    ${package.plugins}

* Initial work towards a working e2e test
  * Test still fails, but at least the expression evaluates now

Continues @srhb's work in #37199

Fixes #37199
Diffstat (limited to 'pkgs/applications/networking/cluster')
-rw-r--r--pkgs/applications/networking/cluster/cni/default.nix5
-rw-r--r--pkgs/applications/networking/cluster/cni/plugins.nix33
2 files changed, 34 insertions, 4 deletions
diff --git a/pkgs/applications/networking/cluster/cni/default.nix b/pkgs/applications/networking/cluster/cni/default.nix
index 3ce056c1e11e..0f232772f076 100644
--- a/pkgs/applications/networking/cluster/cni/default.nix
+++ b/pkgs/applications/networking/cluster/cni/default.nix
@@ -13,17 +13,14 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ go ];
 
-  outputs = ["out" "plugins"];
-
   buildPhase = ''
     patchShebangs build.sh
     ./build.sh
   '';
 
   installPhase = ''
-    mkdir -p $out/bin $plugins
+    mkdir -p $out/bin
     mv bin/cnitool $out/bin
-    mv bin/* $plugins/
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/networking/cluster/cni/plugins.nix b/pkgs/applications/networking/cluster/cni/plugins.nix
new file mode 100644
index 000000000000..9f6b6fcb7e11
--- /dev/null
+++ b/pkgs/applications/networking/cluster/cni/plugins.nix
@@ -0,0 +1,33 @@
+{ stdenv, lib, fetchFromGitHub, go }:
+
+stdenv.mkDerivation rec {
+  name = "cni-plugins-${version}";
+  version = "0.7.0";
+
+  src = fetchFromGitHub {
+    owner = "containernetworking";
+    repo = "plugins";
+    rev = "v${version}";
+    sha256 = "0m885v76azs7lrk6m6n53rwh0xadwvdcr90h0l3bxpdv87sj2mnf";
+  };
+
+  buildInputs = [ go ];
+
+  buildPhase = ''
+    patchShebangs build.sh
+    ./build.sh
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mv bin/* $out/bin
+  '';
+
+  meta = with lib; {
+    description = "Some standard networking plugins, maintained by the CNI team";
+    homepage = https://github.com/containernetworking/plugins;
+    license = licenses.asl20;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ cstrahan ];
+  };
+}