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-kcp: init at 0.26.0 #357444

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

kubernetes-kcp: init at 0.26.0 #357444

wants to merge 2 commits into from

Conversation

rytswd
Copy link

@rytswd rytswd commented Nov 20, 2024

Introduces kcp, Kubernetes-like control planes for form-factors and use-cases beyond Kubernetes and container workloads.

Closes #357434

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label Nov 20, 2024
@NixOSInfra NixOSInfra added the 12. first-time contribution This PR is the author's first one; please be gentle! label Nov 20, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Nov 21, 2024
@rytswd
Copy link
Author

rytswd commented Nov 22, 2024

I'm not sure what the next step should be -- do I need to tag someone who has write access to merge the PR?

@steeleduncan
Copy link
Contributor

Yes, someone with the commit bit will pass by eventually. You could look for someone who often merges go modules and request a review

By the way, it probably makes sense to

  • remove the various TODOs and comments in the derivation
  • specify platforms in the meta? (I don't know if this is common for go derivations)

pkgs/applications/networking/cluster/kcp/default.nix Outdated Show resolved Hide resolved
pkgs/applications/networking/cluster/kcp/default.nix Outdated Show resolved Hide resolved
# "-X k8s.io/client-go/pkg/version.gitMajor=${KUBE_MAJOR_VERSION}"
# "-X k8s.io/client-go/pkg/version.gitMinor=${KUBE_MINOR_VERSION}"
"-X k8s.io/client-go/pkg/version.buildDate=unknown"
"-X k8s.io/component-base/version.gitCommit=${rev}"
Copy link
Member

Choose a reason for hiding this comment

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

No need to, just mark unkown

Copy link
Author

Choose a reason for hiding this comment

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

@Aleksanaa Could you elaborate why that's the case? Is this just customary, and/or because it's easier to update the reference for updates by simply using the tag?
This will be a slight diversion from the original binary, and when it is as simple as providing a commit reference, I thought it's worth keeping it around. (Also we should technically have the Kubernetes major / minor version reference, which would ensure the Nix package will be the same as the official binary.)

Copy link
Member

Choose a reason for hiding this comment

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

Because setting rev specifically will make automatic update wrong, and not very useful as the version is sufficient to find the revision

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the clarification! The automatic update support would be nice to have, and indeed the tag should give us the revision. But it is also possible that the tag gets removed and recreated for a different commit (though unlikely), and this revision reference acts as a safety net in a way I suppose.

In either case, it is also not a fast moving project AFAIAA, and it is something I can revisit later. The change has been made to remove the unnecessary let binding and git commit reference kept as unknown.

pkgs/applications/networking/cluster/kcp/default.nix Outdated Show resolved Hide resolved
pkgs/applications/networking/cluster/kcp/default.nix Outdated Show resolved Hide resolved
@rytswd
Copy link
Author

rytswd commented Nov 23, 2024

Thanks for the pointer, @steeleduncan -- regarding your points:

By the way, it probably makes sense to

  • remove the various TODOs and comments in the derivation
  • specify platforms in the meta? (I don't know if this is common for go derivations)

I kept the TODO items as those are something we should handle for proper feature parity (it may be a stretch to call this a feature, but nonetheless a difference from the official binary).
As to the platform, this should work on both nixos and darwin, so I suppose this can be left as is.

@rytswd
Copy link
Author

rytswd commented Nov 23, 2024

@Aleksanaa Thanks for the review! I made the suggested changes and a few adjustments (namely argument for stdenv and additional binaries of kubectl plugins).

I also went ahead to squash the code change commits into a single commit. My understanding is that I will need to keep the contributor addition commit separate, so that was kept as is. Rebase / squash / force-push made it difficult to see the diff, but I hope this one is simple enough to wrap your head around the change 🙏

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 10.rebuild-linux: 1 and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Nov 24, 2024
Update pkgs/applications/networking/cluster/kcp/default.nix

Co-authored-by: Aleksana <[email protected]>

Update pkgs/applications/networking/cluster/kcp/default.nix

Co-authored-by: Aleksana <[email protected]>

Update pkgs/applications/networking/cluster/kcp/default.nix

Co-authored-by: Aleksana <[email protected]>

Move package to pkgs/by-name/ku/kubernetes-kcp

Fix format error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 10.rebuild-linux: 1 11.by: package-maintainer This PR was created by the maintainer of the package it changes 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package request: kcp
4 participants