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

kubernetes: misc fixes #105619

Merged
merged 2 commits into from Dec 9, 2020
Merged

kubernetes: misc fixes #105619

merged 2 commits into from Dec 9, 2020

Conversation

zowoq
Copy link
Contributor

@zowoq zowoq commented Dec 1, 2020

Motivation for this change
  • don't install unnecessary binaries

~1100MB -> ~700MB

  • conversion-gen
  • deepcopy-gen
  • defaulter-gen
  • e2e.test
  • gendocs
  • genkubedocs
  • genman
  • genyaml
  • go-bindata
  • go2make
  • kube-addons
  • kube-apiserver
  • kube-controller-manager
  • kube-proxy
  • kube-scheduler
  • kubeadm
  • kubectl
  • kubelet
  • mk-docker-opts.sh
  • openapi-gen
  • prerelease-lifecycle-gen

Also:

  • remove go-bindata, already vendored by upstream
  • use installShellFiles, add kubeadm completion
  • require kubeadm/kubectl so installPhase can't be broken
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

- don't install unnecessary binaries
- remove go-bindata, already vendored by upstream
- use installShellFiles, add kubeadm completion
- require kubeadm/kubectl so installPhase can't be broken
@zowoq
Copy link
Contributor Author

zowoq commented Dec 1, 2020

Semi-related question: Is there a reason we have mk-docker-opts.sh checked in here instead of using the one that is included with flannel?


postBuild = ''
./hack/update-generated-docs.sh
(cd build/pause && cc pause.c -o pause)
'';

installPhase = ''
mkdir -p "$out/bin" "$out/share/bash-completion/completions" "$out/share/zsh/site-functions" "$man/share/man" "$pause/bin"
for p in $WHAT; do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use a different name instead of WHAT?

Copy link
Contributor Author

@zowoq zowoq Dec 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WHAT is from the upstream makefile.

  WHAT = lib.concatStringsSep " " ([
    "cmd/kubeadm"
    "cmd/kubectl"
  ] ++ components);

https://github.com/kubernetes/kubernetes/blob/c98f6bf30890f2c5826067ae50cfc36958106e68/build/root/Makefile#L80

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 105619 run on x86_64-linux 1

2 packages built:
  • kubectl
  • kubernetes

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 105619 run on x86_64-darwin 1

2 packages built:
  • kubectl
  • kubernetes

Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zowoq zowoq merged commit d183736 into NixOS:master Dec 9, 2020
@zowoq zowoq deleted the kubernetes-pkg-cleanup branch December 9, 2020 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants