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
kubectl: init at v1.8.1 #30450
kubectl: init at v1.8.1 #30450
Conversation
lib/maintainers.nix
Outdated
@@ -272,6 +272,7 @@ | |||
ivan-tkatchev = "Ivan Tkatchev <tkatchev@gmail.com>"; | |||
j-keck = "Jürgen Keck <jhyphenkeck@gmail.com>"; | |||
jagajaga = "Arseniy Seroka <ars.seroka@gmail.com>"; | |||
jthompson = "James Thompson <jamesthompsonoxford@gmail.com>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your handle here should be the same as your github username.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed @vyp - Thanks for the heads up.
Trying to understand why you're packaging the prebuilt binary vs. building the code yourself. Can you elaborate on that?
Do you mean that they don't host the source anywhere? https://github.com/kubernetes/kubernetes/tree/master/pkg/kubectl would probably work fine with a |
kubectl is needed to administer kubernetes clusters from the command line. For google cloud users, it isn't installable through the google-cloud-sdk derivation - this pulls the precompiled binary and installs it. As far as I can tell there is no hosted tarball archive for this binary, hence this binary install approach.
a6b514c
to
9059d12
Compare
@copumpkin I just wanted this tool, not the entire kubernetes install as I am simply administering a kubernetes cluster on google container engine. This is my first nixpkgs PR. I thought seeing as there were a bunch of other basically pre-compiled tools in the nixpkgs set, that downloading this one (despite not being compressed) would also be fine. Happy to build the kubectl binary from the github-hosted source as well if that is the preferred means of building these kinds of derivations. But then, I'm not reallly au fait with the the intrinsic weirdness of golang builds. |
@jamesthompson we don't have any explicit rule against binary packages but generally prefer builds from source wherever possible. On the necessity of this vs. the full k8s package, I'm wondering if we could just split the outputs from the main k8s package so folks like you wouldn't need to get the full thing, but we wouldn't be incurring additional maintenance by having two packages with essentially the same tool (but with separate version numbers needing to be bumped regularly, probably getting out of sync, etc.). @offlinehacker @NeQuissimus any opinion on splitting |
longDescription = "The kubernetes command line tool. This package has the program: kubectl"; | ||
license = licenses.asl20; | ||
homepage = "https://kubernetes.io/docs/user-guide/kubectl"; | ||
maintainers = with maintainers; [ jthompson ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be `jamesthompson'
I also only need
and it works without problems. It's slightly annoying that I have to compile and it takes a long time and lots of memory (I had to add a swapfile just to be able to compile this). But I think it'd be better if we just add this line to |
Could we maybe use another output in the kubernetes derivation to expose kubectl? Then we wouldn't have to rebuild so much go code. |
Ping :) I'd love to see Although... Maybe we should keep I can't decide which I like better :D |
Is the protocol reasonably stable? |
Reasonably, yes... I have something similar to @utdemir that I use because I like to keep the versions in-sync: ((pkgs.kubernetes.override { components = [ "cmd/kubectl" ]; }).overrideAttrs (oldAttrs: {
version = "1.9.0";
name = "kubectl-1.9.0";
src = fetchFromGitHub {
owner = "kubernetes";
repo = "kubernetes";
rev = "v1.9.0";
sha256 = "03383j5n66r5qv3y03g3v9vmvmzhpj3fzparsz1s22x1zzr4qg5a";
};
})) |
We could just throw that into top-level so that Hydra builds it, I suppose. |
Somewhat related, on #33954 for upgrading kubernetes to 1.9.1 there are some problems with tests. Please help! Then it will be possible to produce another package specifically for kubectl :) |
Oh, I hadn't seen this PR when I made #34126, but I did basically exactly what @NeQuissimus and @copumpkin said. 😅 |
I'm going to close this out - given #34126 solves the basic need of this PR. |
Motivation for this change
kubectl is needed to administrate kubernetes clusters from the command line.
For google cloud users, it isn't installable through the google-cloud-sdk
derivation - this pulls the precompiled binary and installs it.
As far as I can tell there is no hosted tarball archive for this binary, hence
this binary install approach.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)