From a49f56c3b1a5dc88c1dfbb0412a790033ac0f6c3 Mon Sep 17 00:00:00 2001 From: Johan Thomsen Date: Mon, 20 Aug 2018 20:33:49 +0200 Subject: [PATCH] kubernetes: 1.10.5 -> 1.11.3 Fixed minor issue where kube-addon manager complaints about /opt/namespace.yaml missing. Added release notes with reference to Kubernetes 1.11 release notes. closes #43882 --- nixos/doc/manual/release-notes/rl-1809.xml | 8 ++++++++ .../networking/cluster/kubernetes/default.nix | 16 +++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-1809.xml b/nixos/doc/manual/release-notes/rl-1809.xml index 9ec465d8955e..9c8cd7c49c8d 100644 --- a/nixos/doc/manual/release-notes/rl-1809.xml +++ b/nixos/doc/manual/release-notes/rl-1809.xml @@ -451,6 +451,14 @@ inherit (pkgs.nixos { deprecated. Use networking.networkmanager.dns instead. + + + The Kubernetes package has been bumped to major version 1.11. + Please consult the + release notes + for details on new features and api changes. + + The option diff --git a/pkgs/applications/networking/cluster/kubernetes/default.nix b/pkgs/applications/networking/cluster/kubernetes/default.nix index 01bf3467af95..96dab6aa66a1 100644 --- a/pkgs/applications/networking/cluster/kubernetes/default.nix +++ b/pkgs/applications/networking/cluster/kubernetes/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, removeReferencesTo, which, go_1_9, go-bindata, makeWrapper, rsync +{ stdenv, lib, fetchFromGitHub, removeReferencesTo, which, go_1_10, go-bindata, makeWrapper, rsync , components ? [ "cmd/kubeadm" "cmd/kubectl" @@ -15,17 +15,16 @@ with lib; stdenv.mkDerivation rec { name = "kubernetes-${version}"; - version = "1.10.5"; + version = "1.11.3"; src = fetchFromGitHub { owner = "kubernetes"; repo = "kubernetes"; rev = "v${version}"; - sha256 = "1k6ayb43l68l0qw31cc4k1pwvm8aks3l2xm0gdxdxbbww1mnzix2"; + sha256 = "1gwb5gs9l0adv3qc70wf8dwvbjh1mmgd3hh1jkwsbbnach28dvzb"; }; - # Build using golang v1.9 in accordance with https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.10.md#external-dependencies - buildInputs = [ removeReferencesTo makeWrapper which go_1_9 rsync go-bindata ]; + buildInputs = [ removeReferencesTo makeWrapper which go_1_10 rsync go-bindata ]; outputs = ["out" "man" "pause"]; @@ -39,7 +38,7 @@ stdenv.mkDerivation rec { patchShebangs ./hack ''; - WHAT="--use_go_build ${concatStringsSep " " components}"; + WHAT="${concatStringsSep " " components}"; postBuild = '' ./hack/generate-docs.sh @@ -53,8 +52,11 @@ stdenv.mkDerivation rec { cp build/pause/pause "$pause/bin/pause" cp -R docs/man/man1 "$man/share/man" + cp cluster/addons/addon-manager/namespace.yaml $out/share cp cluster/addons/addon-manager/kube-addons.sh $out/bin/kube-addons patchShebangs $out/bin/kube-addons + substituteInPlace $out/bin/kube-addons \ + --replace /opt/namespace.yaml $out/share/namespace.yaml wrapProgram $out/bin/kube-addons --set "KUBECTL_BIN" "$out/bin/kubectl" $out/bin/kubectl completion bash > $out/share/bash-completion/completions/kubectl @@ -62,7 +64,7 @@ stdenv.mkDerivation rec { ''; preFixup = '' - find $out/bin $pause/bin -type f -exec remove-references-to -t ${go_1_9} '{}' + + find $out/bin $pause/bin -type f -exec remove-references-to -t ${go_1_10} '{}' + ''; meta = {