Skip to content

Allow users to force deployment platform #7355

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

Closed
edude03 opened this issue Apr 29, 2022 · 3 comments · Fixed by #7402
Closed

Allow users to force deployment platform #7355

edude03 opened this issue Apr 29, 2022 · 3 comments · Fixed by #7402
Assignees

Comments

@edude03
Copy link

edude03 commented Apr 29, 2022

Or detect M1 Macs and deploy amd64 images.

When I try to run skaffold run|dev on an M1 mac running docker (I use buildpacks with google cloud build but I think this is relevant to all build tools anyway) it won't allow me to deploy as the images (built for amd64) aren't compatible with arm64.

Typically, this is the case (you can't run amd64 images on arm64) but for mac m1 users with docker for desktop w/ qemu, it does of course work.

Since it does work in practice, can a flag or setting be added to allow the deployment to continue anyway? Otherwise, skaffold is currently usable since we currently don't build arm64 images anyway.

Expected behavior

It shouldn't prevent me from deploying

It prevents me from deploying.

Information

Funny side note, if you exit docker desktop, start the build then start docker again, it will work as its unable to check what platform it will be deployed to, which leaves me to believe it's an "artificial" limitation.

@aaron-prindle
Copy link
Contributor

@gsquared94 can you add some context here on the feasability of adding this, how this might be done if so, and if it currently in the roadmap? Thanks!

@aaron-prindle aaron-prindle added the priority/p2 May take a couple of releases label May 2, 2022
@gsquared94
Copy link
Contributor

This definitely seems doable. We can probably convert this to a warning message instead of an error here:

} else if p := platforms.Intersect(fromClusterNodes); p.IsNotEmpty() {
platforms = p
} else {
return r, fmt.Errorf("build target platforms %q do not match active kubernetes cluster node platforms %q", platforms, fromClusterNodes)
}

@briandealwis
Copy link
Member

Can we bump the priority on this? Buildpacks builds used to work on M1, and this is affecting internal products (b/224003339). Making this a warning seems like a good idea.

The difficulty here is that Docker Desktop now includes qemu-based binfmt_misc extensions such that it can silently run binaries from other platforms. But these capabilities are not surfaced into the Kubernetes cluster — a node can only claim it supports a single os/architecture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants