Merge pull request #7545 from offlinehacker/pkgs/kubernetes/fixes

kubernetes: update to 0.15, module fixes
This commit is contained in:
Jaka Hudoklin 2015-04-28 14:12:53 +02:00
commit f5bc58d733
2 changed files with 17 additions and 9 deletions

View file

@ -224,7 +224,7 @@ in {
machines = mkOption {
description = "Kubernetes controller list of machines to schedule to schedule onto";
default = [];
default = [config.networking.hostName];
type = types.listOf types.str;
};
@ -310,6 +310,12 @@ in {
type = types.str;
};
master = mkOption {
description = "Kubernetes apiserver address";
default = "${cfg.apiserver.address}:${toString cfg.apiserver.port}";
type = types.str;
};
extraOpts = mkOption {
description = "Kubernetes proxy extra command line options.";
default = "";
@ -355,6 +361,7 @@ in {
--secure_port=${toString cfg.apiserver.securePort} \
--portal_net=${cfg.apiserver.portalNet} \
--logtostderr=true \
--runtime_config=api/v1beta3 \
${optionalString cfg.verbose "--v=6 --log_flush_frequency=1s"} \
${cfg.apiserver.extraOpts}
'';
@ -416,7 +423,6 @@ in {
script = ''
export PATH="/bin:/sbin:/usr/bin:/usr/sbin:$PATH"
exec ${cfg.package}/bin/kubelet \
--etcd_servers=${concatMapStringsSep "," (f: "http://${f}") cfg.etcdServers} \
--api_servers=${concatMapStringsSep "," (f: "http://${f}") cfg.kubelet.apiServers} \
--address=${cfg.kubelet.address} \
--port=${toString cfg.kubelet.port} \
@ -443,7 +449,7 @@ in {
after = [ "network-interfaces.target" "etcd.service" ];
serviceConfig = {
ExecStart = ''${cfg.package}/bin/kube-proxy \
--etcd_servers=${concatMapStringsSep "," (s: "http://${s}") cfg.etcdServers} \
--master=${cfg.proxy.master} \
--bind_address=${cfg.proxy.address} \
--logtostderr=true \
${optionalString cfg.verbose "--v=6 --log_flush_frequency=1s"} \

View file

@ -2,25 +2,27 @@
stdenv.mkDerivation rec {
name = "kubernetes-${version}";
version = "0.12.1";
version = "0.15.0";
src = fetchFromGitHub {
owner = "GoogleCloudPlatform";
repo = "kubernetes";
rev = "v${version}";
sha256 = "1891wpssfp04nkk1h4y3cdgn096b0kq16pc0m2fzilbh3daa6pml";
sha256 = "1jiczhx01i8czm1gzd232z2ds2f1lvs5ifa9zjabhzw5ykfzdjg8";
};
buildInputs = [ makeWrapper which go iptables rsync ];
preBuild = "patchShebangs ./hack";
postBuild = ''go build --ldflags '-extldflags "-static" -s' build/pause/pause.go'';
buildPhase = ''
substituteInPlace "hack/lib/golang.sh" --replace "_cgo" ""
GOPATH=$(pwd)
patchShebangs ./hack
hack/build-go.sh --use_go_build
'';
installPhase = ''
mkdir -p "$out/bin"
cp _output/local/go/bin/* "$out/bin/"
cp pause $out/bin/kube-pause
'';
preFixup = ''