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-helm: 3.1.2 -> 3.1.2 and 2.16.5 split to helm 2 and 3 #83219

Closed
wants to merge 3 commits into from

Conversation

dredozubov
Copy link
Contributor

@dredozubov dredozubov commented Mar 23, 2020

Motivation for this change

Helm 2 and 3 are architecturally different and there are lots of projects still using helm 2. It makes sense to be able to build the last version of Helm 2 as well as Helm 3.

Things done
  • split kubernetes helm to kubernetes-helm2 and kubernetes-helm3
  • default kubernetes-helm to kubernetes-helm3 for compatibility
  • 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.

This change is Reviewable

@dredozubov dredozubov changed the title kubernetes-helm: 3.1.1 -> 3.1.1 and 2.16.3 split to helm 2 and 3 kubernetes-helm: 3.1.2 -> 3.1.2 and 2.16.3 split to helm 2 and 3 Mar 23, 2020
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.

Honestly spoken I’m not in favor of having two dedicated packages. But I’m happy to change my opinion if this is really necessary.

@dredozubov
Copy link
Contributor Author

I agree it may look kinda awkward, but helm 2 and 3 are far from compatible and I'd argue that a significant amount of projects have yet to switch to helm 3, so it would be helpful to have the last revision of 2.* beside the primary 3.* for a time being.

Copy link
Member

@Frostman Frostman left a comment

Choose a reason for hiding this comment

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

IMO it makes sense to have helm2 supported in addition to helm3 as helm2 is still looks more popular and many people using it.

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

@dredozubov
Copy link
Contributor Author

I've rebased the PR against master and updated the helm 2 version to 2.16.5

* split kubernetes helm to kubernetes-helm2 and kubernetes-helm3
* default kubernetes-helm to kubernetes-helm3 for compatibility
@dredozubov
Copy link
Contributor Author

Rebased, all comments addressed.

@dredozubov dredozubov changed the title kubernetes-helm: 3.1.2 -> 3.1.2 and 2.16.3 split to helm 2 and 3 kubernetes-helm: 3.1.2 -> 3.1.2 and 2.16.5 split to helm 2 and 3 Apr 13, 2020
@lsowen
Copy link

lsowen commented Apr 15, 2020

@dredozubov thank you for taking this on, I for one would really like to have helm2 available, since most of our infrastructure still relies on helm2/tiller.

However, I'm not sure this change will work properly? If you look at the old helm2 build (https://github.com/NixOS/nixpkgs/blob/a038ae1118a676f956c9cf50b78e6e0144c44266/pkgs/applications/networking/cluster/helm/default.nix), it used buildGoPackage, and built tiller and rudder in addition to helm.

@dredozubov
Copy link
Contributor Author

@isowen You're absolutely right. I tried using kubernetes-helm2 yesterday and it's currently broken. I haven't figured out how to properly build it yet, but I plan to work on it when I'll have the time.

@infinisil
Copy link
Member

Still interested in this? If the conflicts are fixed and the package is confirmed to work I can merge it

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

@teto
Copy link
Member

teto commented Aug 28, 2020

I am new to helm but I've already hit the helm 2/3 schism. The ecosystem warrants to keep both so +1 from me. Could you solve conflicts ?

@baracoder
Copy link
Contributor

Ping
I would also be interested in having both version 2 and 3 in nixpkgs

@dredozubov
Copy link
Contributor Author

I've checked this old branch and it's definitely broken for Helm 2. I have neither the knowledge of older golang build tools nor the time to tackle it right now. Is anyone willing to take a shot at this?

@@ -0,0 +1,33 @@
{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles, Security }:
Copy link
Member

Choose a reason for hiding this comment

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

Security ? null else it fails on linux

@teto
Copy link
Member

teto commented Nov 9, 2020

@dredozubov what kind of error have you encountered ? Maybe we can rebase and merge and fix that afterwards ?
What I've noticed is that the kubernetes 2 doesn't seem to have an init command ? (yet it returns v2.16.5). I dont know much about helm but that seemed fishy.

rev = "v${version}";
sha256 = "16hbwmgq14g28r9s0ipnpiqlppyh57yrcqcspmj05vrf9jsg5vwj";
};
modSha256 = "0618zzi4x37ahsrazsr82anghhfva8yaryzb3p5d737p3ixbiyv8";
Copy link
Member

Choose a reason for hiding this comment

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

this is the same hash as for the v3 version there is something wrong here.

Comment on lines +20252 to +20256
kubernetes-helm = kubernetes-helm3;

kubernetes-helm2 = callPackage ../applications/networking/cluster/helm2 { };

kubernetes-helm3 = callPackage ../applications/networking/cluster/helm3 { };
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
kubernetes-helm = kubernetes-helm3;
kubernetes-helm2 = callPackage ../applications/networking/cluster/helm2 { };
kubernetes-helm3 = callPackage ../applications/networking/cluster/helm3 { };
kubernetes-helm2 = callPackage ../applications/networking/cluster/helm2 { };
kubernetes-helm3 = callPackage ../applications/networking/cluster/helm3 { };

And please move the alias to aliases.nox.

@stale
Copy link

stale bot commented Jun 3, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2021
@siraben siraben closed this Jul 27, 2021
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

10 participants