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

feat: add pull command #1681

Merged
merged 4 commits into from
Mar 24, 2020
Merged

Conversation

mitchfriedman
Copy link
Contributor

What this PR does / why we need it:
Similarly to the garden publish command, this adds a garden pull command that works for the kubernetes/container module types.

A use case: a frontend engineer wants to run a local copy of an image but doesn't want to build the image (building takes longer than pulling down an image).

Which issue(s) this PR fixes:

Fixes # #1647

Special notes for your reviewer:
This doesn't work at the moment for external registries where auth is required that isn't currently supported (i.e. ecr with credHelpers). We could perform a 2 step dance, however:

  1. Run skopeo in a pod, pull from ECR -> skopeo pod
  2. Port forward skopeo, pull from skopeo pod -> local docker

I'm all open to other ideas that are perhaps simpler though.

@edvald @eysi09

@swist
Copy link
Contributor

swist commented Mar 10, 2020

What we've seen work is that with AWS you can set the cred helper on your local dockerconfig. It does mean extra local configuration step, so perhaps opting into using cluster credentials would be preferable?

@mitchfriedman mitchfriedman force-pushed the feature/add-pull-command branch 3 times, most recently from 5464891 to 636327b Compare March 19, 2020 09:52
bin/garden-debug Outdated Show resolved Hide resolved
@mitchfriedman mitchfriedman force-pushed the feature/add-pull-command branch 2 times, most recently from 97b3348 to a01322f Compare March 19, 2020 10:44
@edvald edvald self-assigned this Mar 19, 2020
@mitchfriedman mitchfriedman marked this pull request as ready for review March 19, 2020 21:46
@mitchfriedman mitchfriedman force-pushed the feature/add-pull-command branch from a01322f to 5bfab26 Compare March 19, 2020 21:49
@edvald
Copy link
Collaborator

edvald commented Mar 20, 2020

Sorry @swist I missed your comment there a while back. I'm not sure we can use cluster credentials in a portable fashion. We should however definitely document the extra step for ECR auth.

Copy link
Collaborator

@edvald edvald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks like a solid approach, just a few comments. Also, an integ test would be great. Let me know if I can help with that.

garden-service/src/plugins/kubernetes/run.ts Show resolved Hide resolved
garden-service/src/plugins/kubernetes/run.ts Outdated Show resolved Hide resolved
@mitchfriedman mitchfriedman force-pushed the feature/add-pull-command branch from f9ca573 to a7f7cc5 Compare March 23, 2020 09:51
@mitchfriedman mitchfriedman force-pushed the feature/add-pull-command branch 4 times, most recently from 60096d5 to 823a596 Compare March 23, 2020 12:20
Copy link
Collaborator

@edvald edvald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Structure and code LGTM 👍 just some super minor comments + a couple of thoughts on the tests.

@mitchfriedman mitchfriedman force-pushed the feature/add-pull-command branch 3 times, most recently from 2124531 to aba71f9 Compare March 24, 2020 13:02
@mitchfriedman mitchfriedman force-pushed the feature/add-pull-command branch from aba71f9 to 7bc460d Compare March 24, 2020 15:26
@edvald edvald merged commit 8f6d3c2 into garden-io:master Mar 24, 2020
@mitchfriedman mitchfriedman deleted the feature/add-pull-command branch March 24, 2020 20:27
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

Successfully merging this pull request may close these issues.

3 participants