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

Cloud Native Buildpacks with arm64 #9508

Open
michielboekhoff opened this issue Aug 23, 2024 · 3 comments
Open

Cloud Native Buildpacks with arm64 #9508

michielboekhoff opened this issue Aug 23, 2024 · 3 comments

Comments

@michielboekhoff
Copy link

Expected behavior

When running skaffold run / skaffold build, I expect the image to be built for linux/arm64 (when the Kubernetes nodes are running linux/arm64). This should behave, effectively, the same as a pack build which now supports arm64

Actual behavior

The following warning is printed to stdout:

WARN[0000] builder for artifact "app" doesn't support building for target platforms: "linux/arm64". Building for supported platforms "linux/amd64" instead.  subtask=app task=Build

after which the container is built for linux/amd64.

I suspect this is related to this line which enforces amd64 for Buildpacks (which is no longer true).

Information

  • Skaffold version: v2.13.2
  • Operating system: Apple M1 - Sonoma 14.4.1
  • Installed via: Homebrew
  • Contents of skaffold.yaml:
apiVersion: skaffold/v4beta11
kind: Config
metadata:
  name: app
build:
  artifacts:
    - image: app
      buildpacks:
        builder: heroku/builder:24
        buildpacks:
          - docker://docker.io/heroku/buildpack-dotnet:0.1.1
manifests:
  rawYaml:
    - deploy/deployment.yml
    - deploy/service.yml

Steps to reproduce the behavior

skaffold build on an arm64 arch (like an M1 or a linux/arm64 machine)

@ipolonskij
Copy link

ipolonskij commented Oct 29, 2024

I face the same issue with:

  • Skaffold version: 2.13.2
  • Apple M3 - Sonoma 14.3
  • Installed via Homebrew
  • Tried using heroku/builder:24 as well as dashaun/builder-arm:20240403
  • Skaffold yaml:
apiVersion: skaffold/v4beta11
kind: Config
metadata:
  name: app
build:
  platforms: ["linux/arm64"]
  local:
    push: false
  tagPolicy:
    gitCommit: {}
  artifacts:
    - image: backend
      platforms:
        - linux/arm64
      context: backend
      buildpacks:
        builder: dashaun/builder-arm:20240403
        env:
          - BP_JVM_VERSION=21
          - BP_ARCH=arm64
deploy:
  helm:
    releases:
      - name: backend
        chartPath: kubernetes/backend
        valuesFiles:
          - kubernetes/backend/values.yaml
        version: 0.1.0
      - name: database
        chartPath: bitnami/postgresql
        version: 15.5.38
        valuesFiles:
          - kubernetes/postgres/values.yaml

@ipolonskij
Copy link

I upgraded to macOS 15.1 but face the same error.

@michielboekhoff
Copy link
Author

@ipolonskij - I think it's because CNBs in Skaffold are only supported on x86_64, not on arm yet. I've been tinkering with a patch but it depends on the CNB you use as well. Most don't support arm yet, though the Heroku CNB does.

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

No branches or pull requests

2 participants