Skip to content

Proposal: relax checking for CPU architecture on Apple M1 silicon (darwin/arm64) #757

@ahmetb

Description

@ahmetb

I just switched to an Apple M1 Mac and a lot of the plugins (72 out of 184, which is 42%) are not installing because they're simply not distributing for darwin/arm64.

However, as a user I can override our OS/ARCH check by overriding it like KREW_ARCH=amd64 kubectl krew install [...]. These amd64 binaries execute just fine as Mac has a compatibility layer that works for these Go binaries out of the box. Assuming most of these plugins may never update, this excludes a lot plugins from the M1 users as the adoption of new Macs increase.

Some options:

  1. Relax checking and allow darwin/amd64 to be installed on darwin/arm64 and hope eventually more plugins distribute for arm64 (but they might not do that switch because we relax this check and users might not complain to existing plugin authors).
    (This may actually cause issues if the binary has compatibility issues, such as compiled with an older Go runtime which does not work with M1 compat layer properly).
  2. Document that users can do this override. It's a band-aid solution (see next 💩int) (Most users won't see the docs on this.)
  3. Print a warning if user is darwin/arm64 and binary offers darwin/amd64 and teach users how to override. It's a hacky band-aid solution.
    (Problem with this is that I think they have to remember to do the same thing when they run "krew upgrade", and setting $KREW_ARCH while upgrading all plugins with that command will cause other plugins that distribute for arm64 to pick up amd64 versions, which is not ideal.)

All these options are far from ideal. Maybe we don't take any action and hope the users complain to plugin authors, but this puts some plugins that are no longer updated to get stuck at a bad place forever (e.g. tail plugin).

/kind proposal
/area platform/mac

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/platform/macmacOS related issueskind/proposallifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions