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

kops: restructure package to maintain multiple versions in the future #64242

Merged
merged 3 commits into from Aug 5, 2019

Conversation

kampka
Copy link
Contributor

@kampka kampka commented Jul 3, 2019

Motivation for this change

kops versions are bound to the version of the kubernetes cluster they
are targeted to maintain (kops 1.12 -> k8s 1.12, kops 1.13 -> k8s 1.13,
etc). Upgrading kops should therefore be done very deliberately
as it may affect the cluster it is working with in drastic ways.
This change introduces the ability to maintain multiple versions of
kops in nixpkgs, giving the users the ability to pin it to their target
cluster version when installing

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.

@kampka
Copy link
Contributor Author

kampka commented Jul 3, 2019

Since this change should be backwards compatible, it would be great to see it land in 19.03 as well :)

@priegger
Copy link
Contributor

priegger commented Jul 4, 2019

Works for me.

Tested on NixOS with sandboxing.

@kampka
Copy link
Contributor Author

kampka commented Aug 5, 2019

@zimbatm since you are listed as the maintainer, any chance to get a review for this?

Copy link
Member

@zimbatm zimbatm left a comment

Choose a reason for hiding this comment

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

Sounds good to me!

I left a few comments, let me know when the PR is ready and I will merge it.

pkgs/applications/networking/cluster/kops/default.nix Outdated Show resolved Hide resolved
pkgs/applications/networking/cluster/kops/default.nix Outdated Show resolved Hide resolved
platforms = platforms.unix;
};
} // attrs');
in {
Copy link
Member

Choose a reason for hiding this comment

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

it would be nice to expose the generic builder as mkKops in case the user wants to maintain their own version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure if done correctly

kops versions are bound to the version of the kubernetes cluster they
are targeted to maintain (kops 1.12 -> k8s 1.12, kops 1.13 -> k8s 1.13,
etc). Upgrading kops should therefore be done very deliberately
as it may affect the cluster it is working with in drastic ways.
This change introduces the ability to maintain multiple versions of
kops in nixpkgs, giving the users the ability to pin it to their target
cluster version when installing
@kampka
Copy link
Contributor Author

kampka commented Aug 5, 2019

@zimbatm I addressed all of your suggestions
I also took the liberty of bumping the kops version and adding the new release while I'm at it.

@zimbatm zimbatm merged commit 8b77225 into NixOS:master Aug 5, 2019
@zimbatm
Copy link
Member

zimbatm commented Aug 5, 2019

thanks, good stuff!

@mmahut mmahut mentioned this pull request Aug 9, 2019
10 tasks
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