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

--architecture flag is not respected down the whole stack during k3d deployment #85

Open
vanakema opened this issue Jun 17, 2024 · 1 comment
Labels
possible-bug Something may not be working

Comments

@vanakema
Copy link

vanakema commented Jun 17, 2024

Environment

Device and OS: MBP M3 Max, MacOS 14.5 (Sonoma)
App version: UDS v0.11.1
Kubernetes distro being used: k3d-core-slim-dev:0.22.0
Other:

Steps to reproduce

  1. uds deploy -a amd64 -c k3d-core-slim-dev:0.22.0 on an arm64 machine (expecting Docker to use Rosetta as the translation layer)
  2. Observe the images it pulls down are in fact the linux/arm64 versions (Personally I observed this in the IntelliJ/PyCharm Docker GUI).
  3. Feel sad when you get error messages from trying to deploy an amd64 zarf package that the architectures don't match

Expected result

-a amd64 should tell the utility to download specifically the amd64 bundle of the bundle I am trying to deploy

Actual Result

-a amd64 isn't respected at the bundle arch decision level, and it instead downloads the bundle for the arch that is returned by uname -m

Visual Proof (screenshots, videos, text, etc)

Screenshot 2024-06-17 at 9 49 04 AM Screenshot 2024-06-17 at 9 49 11 AM Screenshot 2024-06-17 at 9 49 16 AM

Severity/Priority

Medium

Additional Context

I've done some digging into the UDS codebase across the DU org to understand how I could work around this, and I noticed that we seem to determine arch a lot by using uname -m instead of respecting the -a flag passed in. I don't know the UDS codebase very well though, so I wasn't sure which repo made most sense to put it in, so I figured I'd put it in this one since this is the one most related to the issue I was having.

This was my workaround:
DOCKER_DEFAULT_PLATFORM=amd64 uds deploy -c k3d-core-slim-dev:0.22.0 --set K3D_EXTRA_ARGS="--image=rancher/k3s:v1.27.4-k3s1-amd64"
This technically worked in that it pulled the correct images for k3d, but unfortunately then ran into a k3d/docker for mac bug where the cluster never actually came up. But that's besides the point that UDS should be respecting the -a when it comes to which bundle arch to pull.

@vanakema vanakema added the possible-bug Something may not be working label Jun 17, 2024
@vanakema vanakema changed the title --architecture flag is not respected diwtduring k3d deployment --architecture flag is not respected down the whole stack during k3d deployment Jun 17, 2024
@zachariahmiller
Copy link
Contributor

Not sure you actually needed the docker env var, but anyways, the k3d images are not bundled in this package as its really just a helper wrapper around the k3d cluster create command intended for online dev. As such you are just observing the behavior of the k3d cli and nothing in particular in zarf or uds.

This message though, is coming from zarf IIRC and is by design, albeit annoying.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
possible-bug Something may not be working
Projects
None yet
Development

No branches or pull requests

2 participants