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

Skaffold dev on a new machine does not download images from registry. #3886

Closed
arlyon opened this issue Mar 29, 2020 · 3 comments
Closed

Skaffold dev on a new machine does not download images from registry. #3886

arlyon opened this issue Mar 29, 2020 · 3 comments
Assignees
Labels
area/dev in progress kind/bug Something isn't working priority/p3 agreed that this would be good to have, but no one is available at the moment.

Comments

@arlyon
Copy link
Contributor

arlyon commented Mar 29, 2020

Expected behavior

I have some microservices. I run skaffold build on my machine (or in CI), the images are uploaded, and then when others who depend on them (ie. frontend team) rebases, they can run skaffold dev, it pulls the images I pushed, and they are able to keep working immediately.

Actual behavior

Images are 'not found' and built instead. It appears that skaffold doesn't check docker hub and as such, everyone who rebases needs to either manually pull the updated images from docker or wait for it to build. This means rebases are quite expensive (taking around an hour if building).

Information

  • Skaffold version: 1.6.0
  • Operating system: images built and pushed on macOS, other machines (that have to rebuild) are windows and centOS
skaffold.yaml

apiVersion: skaffold/v2beta1
kind: Config
metadata:
  name: workout
deploy:
  kustomize:
    paths: 
    - kubernetes/overlays/development
build:
  artifacts:
  - image: arlyon/workout-server
    context: ./server/
  - image: arlyon/workout-learn
    context: ./learn/
  local:
    push: true
profiles:
- name: production
  deploy:
    kustomize:
      paths: 
      - kubernetes/overlays/production
  activation:
  - kubeContext: google-cloud
- name: traefik
  deploy:
    kustomize:
      paths:
      - kubernetes/overlays/development
      - kubernetes/overlays/traefik
portForward:
- resourceType: service
  resourceName: server
  address: 0.0.0.0
  port: 8080

Steps to reproduce the behavior

I don't think this is unique to my project. I'm just not sure why this wouldn't happen. I would expect the cache first check locally, then to fall back and check docker hub, and finally resort to building but it seems like that step is being missed out. Note that after deleting the images on the machine that built them, they are 'found remotely' from docker hub, but not on other machines

@arlyon
Copy link
Contributor Author

arlyon commented Mar 31, 2020

PR is in progress (link above).

In the mean time, a workaround is to use a shared skaffold cache (ie. checked into the source code) coupled local: push: true in the skaffold.yaml with this script that will attempt to pull the images that match your current commit.

@tstromberg tstromberg added area/dev priority/p2 May take a couple of releases kind/bug Something isn't working labels Apr 6, 2020
@tstromberg
Copy link
Contributor

This seems reasonable - and I'm glad to see you've provided a PR. Thank you!

@gsquared94 gsquared94 added priority/p3 agreed that this would be good to have, but no one is available at the moment. and removed priority/p2 May take a couple of releases labels Jul 9, 2020
@nkubala nkubala added this to the Icebox milestone Sep 1, 2020
@nkubala nkubala removed this from the Icebox [P2+] milestone May 11, 2021
@tejal29
Copy link
Member

tejal29 commented May 17, 2021

Closing the issue as the fix got merged!

@tejal29 tejal29 closed this as completed May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dev in progress kind/bug Something isn't working 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