-
Notifications
You must be signed in to change notification settings - Fork 141
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
feat(util): Allows building for darwin targets #133
feat(util): Allows building for darwin targets #133
Conversation
Welcome @thomastaylor312! |
Hi @thomastaylor312. Thanks for your PR. I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
7bc70e52 Merge pull request kubernetes-csi#129 from pohly/squash-documentation e0b02e72 README.md: document usage of --squash 316cb957 Merge pull request kubernetes-csi#132 from yiyang5055/bugfix/boilerplate 26e2ab10 fix: default boilerplate path 1add8c18 Merge pull request kubernetes-csi#133 from pohly/kubernetes-1.20-tag 3e811d6c prow.sh: fix "on-master" prow jobs git-subtree-dir: release-tools git-subtree-split: 7bc70e5264a5ce5f47780bdbc6c7b7f4e79243fa
/ok-to-test |
@pohly do you know if we can add this to our build job to make sure this compiles? Better yet, if we can release images with it? |
We only do build and unit tests for the default Go platform on which we run (linux amd64), so this would be a rather bigger change but ...
... this should be as simple as adding "darwin linux" to
Well, "should". I just tried it with
The same command worked for This might be an issue with my local setup. https://docs.docker.com/buildx/working-with-buildx/#build-multi-platform-images explicitly mentions |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
/remove-lifecycle stale |
083d5ab
to
24a855e
Compare
Sorry for creating the need for a rebase, I think that the first line should also be changed to |
Sweet, I'll fix that real quick |
This is a simple change that allows the registrar to be built for MacOS. All of the `unix` package being used works for Mac as well. The reason for enabling this is completely selfish I'll admit. We are adding [CSI Support](krustlet/krustlet#462) to the Krustlet project, which supports Mac as well. As most CSI implementations don't support registering themselves with the Kubelet directly, we wanted to unblock any users to need to register their plugins with a Krustlet Kubelet. This change shouldn't affect normal container-based usage of the registrar
24a855e
to
9d1ccf4
Compare
pkg/util/util_nix.go
Outdated
@@ -1,5 +1,5 @@ | |||
//go:build linux | |||
// +build linux | |||
//go:build !windows |
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.
This is the first time I've seen the "nix" suffix being used. Is there a general convention that the Kubernetes project is using to support darwin?
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.
@thomastaylor312: can you explain where the _nix.go
filename comes from? Is that being used elsewhere already?
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.
We can just call it unix
if you prefer. I was just trying to indicate that this file wasn't for just linux, but any *nix system. I don't have any sort of a strong preference. Also no skin off of my teeth if you don't want to support darwin targets. This was just a proposal of something to do and can be shot down. As you can see, there was no change to code, so the restriction to linux build targets only was artificial and not for any specific code reason insofar as I can tell
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.
I (like @msau42 I guess) was just wondering. Personally I prefer "unix" over "nix". The latter might not be immediately recognizable as a placeholder for "unix or linux".
Kubernetes releases darwin/amd64 and darwin/arm64 client binaries, but not node binaries. I'm fine with merging this PR, but I would not actually build container images for Darwin.
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.
Yeah, no need to build a container image here. Let me rename the file real quick
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.
Ok, file has been renamed!
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
Signed-off-by: Taylor Thomas <[email protected]>
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.
/lgtm
/assign @jsafrane For approval. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jsafrane, pohly, thomastaylor312 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Thanks all! |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This is a simple change that allows the registrar to be built for MacOS. All of the
unix
package being used works for Mac as well. The reason for enabling this is completely selfish I'll admit. We are adding CSI Support to the Krustlet project, which supports Mac as well. As most CSI implementations don't support registering themselves with the Kubelet directly, we wanted to unblock any users to need to register their plugins with a Krustlet Kubelet. This change shouldn't affect normal container-based usage of the registrarDoes this PR introduce a user-facing change?: