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

helm3: init at 3.0.0 (help wanted) #73916

Closed
wants to merge 1 commit into from
Closed

helm3: init at 3.0.0 (help wanted) #73916

wants to merge 1 commit into from

Conversation

novoxd
Copy link
Contributor

@novoxd novoxd commented Nov 22, 2019

Motivation for this change

Add helm3 version. This version is made as a separate package because helm of version 3 is completely different from version 2 (no tiller, different templates and logic, different go dependencies ). From the user view, there is a need for both versions at the same time, cause most of Kubernetes clusters work with helm2, and new ones with helm3 at the same time. The default.nix is copied from the original helm package with modifications.

Help wanted with rename output binary to helm3. I am new to nixpkgs (its my 2nd package, 1st isn't even merged yet). As said upper - both packages helm in nixpkgs (verions2) and helm3 needed. But with this default.nix this package produces executable output as 'helm' what conflicts with old helm package. I tried to rename output in different hooks like fixupPhase, and overriding installPhase but with no success. I think its quite simple to do, but I can't google anything or find in mans.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nix-review --run "nix-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.

P.S. This is my first package build and first pr to nixpkgs, sorry if something wrong.

@rlupton20
Copy link
Contributor

From the looks of the buildGoPackage implementation

https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/go-packages/generic/default.nix

you might want to try implementing a preInstall hook. I'm not terribly familiar with the infrastructure around building Go packages, so I might be a ways off!

'';

meta = with stdenv.lib; {
homepage = https://github.com/kubernetes/helm;
Copy link
Contributor

Choose a reason for hiding this comment

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

NixOS/rfcs#45

Please quote the url.

sha256 = "0gx5gmj1470q3gj8v043dmm31skf83p1ckzdcfzx8wdjlglsljrj";
};

modSha256 = "06599w4rvipb669vc5rj62k2kjakz2vmpp270carf204qbm5grk8";
Copy link
Contributor

Choose a reason for hiding this comment

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

Rebase on top of latest master and switch to vendorSha256.


modSha256 = "06599w4rvipb669vc5rj62k2kjakz2vmpp270carf204qbm5grk8";

goPackagePath = "helm.sh/helm/v3";
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is not needed.

goPackagePath = "helm.sh/helm/v3";
subPackages = [ "cmd/helm"];

#goDeps = ./deps.nix;
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove.

@doronbehar
Copy link
Contributor

Help wanted with rename output binary to helm3. I am new to nixpkgs (its my 2nd package, 1st isn't even merged yet). As said upper - both packages helm in nixpkgs (verions2) and helm3 needed. But with this default.nix this package produces executable output as 'helm' what conflicts with old helm package. I tried to rename output in different hooks like fixupPhase, and overriding installPhase but with no success. I think its quite simple to do, but I can't google anything or find in mans.

Yea it's a bit hard to explain why this failed, and it's definitely not ideal that you've had this experience - it shouldn't be that hard and not intuitive + undocumented. However, I once saw this working for someone:

https://github.com/NixOS/nixpkgs/pull/86927/files#diff-2663ae5d05323a4fc069b6f0f3e664fbR20

Question: If:

From the user view, there is a need for both versions at the same time, cause most of Kubernetes clusters work with helm2, and new ones with helm3 at the same time.

Then what's so wrong about having it colliding with the helm2 ?

@teto
Copy link
Member

teto commented Aug 28, 2020

dont we have already kubernetes-helm in the repo ? should we close this ?

@yurrriq
Copy link
Member

yurrriq commented Jan 15, 2021

should we close this ?

yep

@teto teto closed this Jan 15, 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

5 participants