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

[Feature Request] Support deploying image names without digest (or an arch specific digest) #3649

Closed
jahredhope opened this issue Feb 6, 2020 · 4 comments
Labels
area/deploy help wanted We would love to have this done, but don't have the bandwidth, need help from contributors kind/feature-request priority/p3 agreed that this would be good to have, but no one is available at the moment.

Comments

@jahredhope
Copy link

jahredhope commented Feb 6, 2020

Expected behavior

Skaffold would be able to be configured to set the containers image to either the image name without a digest, or the correct digest for the architecture.

Actual behavior

If a custom command is used to build a multi-architecture set of images and successfully deployed there will be multiple digests. Both local and deployed environments will work correctly as long as they have the correct image name, excluding the digest.

Skaffold will attempt to discern the digest of an image by pulling the image from the registry.
A digest will be returned based on the current architecture of the local machine which may not match the server.

The fully qualified image name, including the architecture specific digest will be deployed, if the server archecture differs from the original infrastructure the pod will likely have issues, often failing to start.

Information

  • Skaffold version: v1.3.1
  • Operating system: MacOS + Ubuntu
  • Contents of skaffold.yaml:
apiVersion: skaffold/v2alpha3
kind: Config
build:
  artifacts:
    - image: "my-registry/image-name"
      context: projects/my-project
      custom:
        buildCommand: ../../custom-build.sh
deploy:
  kubectl:
    manifests:
      - projects/my-project/kube.config.yml

custom-build.sh

#!/usr/bin/env bash
set -e

docker buildx build \
  --platform linux/amd64,linux/arm64 \
  --tag $IMAGE \
  --push \
  $BUILD_CONTEXT
@briandealwis
Copy link
Member

@jahredhope could you attach your custom-build.sh?

@jahredhope
Copy link
Author

@briandealwis I've custom-build.sh added to the description.

@balopat balopat added kind/feature-request priority/p3 agreed that this would be good to have, but no one is available at the moment. help wanted We would love to have this done, but don't have the bandwidth, need help from contributors labels Feb 10, 2020
@nkubala nkubala added this to the Icebox [P2+] milestone Sep 1, 2020
@briandealwis
Copy link
Member

@jahredhope I put together a small example of using docker buildx in #5426, similar to what you've shown here. But I don't see any issue like what you're describing here.

Could the issue be that you weren't setting a node-selector or -affinity on your cluster?

@jahredhope
Copy link
Author

@briandealwis , that example looks great!
Unfortunately, I've moved on from deploying to arm and it would require significant work to recreate where I was back then.

It makes sense that the piece I was missing was using selector/affinity, though I'm not exactly sure what that looks like in the resulting spec.

I'm happy to assume that this issue is resolved as you've said you've tried it and it works. If I get the opportunity to port the work back to arm I'll give your solution a go to understand it myself. Thanks-you very much for following up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/deploy help wanted We would love to have this done, but don't have the bandwidth, need help from contributors kind/feature-request priority/p3 agreed that this would be good to have, but no one is available at the moment.
Projects
None yet
Development

No branches or pull requests

5 participants