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 kind-disable-load and k3d-disable-load config values #5012

Merged

Conversation

shaxbee
Copy link
Contributor

@shaxbee shaxbee commented Nov 9, 2020

Fixes: #3461

Description
Add two new configuration options kind-disable-load and k3d-disable-load to allow disabling image loading for local kind and k3d clusters.

This significantly improves deployment times to Kind.

Configuration

skaffold config set kind-disable-load true
skaffold config set default-repo localhost:5000
skaffold config set insecure-registries http://localhost:5000

Demo

@shaxbee shaxbee requested a review from a team as a code owner November 9, 2020 11:51
@google-cla google-cla bot added the cla: yes label Nov 9, 2020
@shaxbee shaxbee force-pushed the feat-deploy-kind-disable-load branch 2 times, most recently from 20dd35e to 905e6bb Compare November 9, 2020 11:58
@codecov
Copy link

codecov bot commented Nov 9, 2020

Codecov Report

Merging #5012 (b9bfaed) into master (bbcfdb0) will increase coverage by 0.12%.
The diff coverage is 86.48%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5012      +/-   ##
==========================================
+ Coverage   72.28%   72.40%   +0.12%     
==========================================
  Files         368      368              
  Lines       12927    12934       +7     
==========================================
+ Hits         9344     9365      +21     
+ Misses       2891     2883       -8     
+ Partials      692      686       -6     
Impacted Files Coverage Δ
pkg/skaffold/config/types.go 91.66% <ø> (ø)
pkg/skaffold/runner/deploy.go 50.00% <0.00%> (+6.06%) ⬆️
pkg/skaffold/runner/runcontext/context.go 83.33% <60.00%> (-1.81%) ⬇️
pkg/skaffold/config/util.go 70.34% <92.59%> (+5.07%) ⬆️
pkg/skaffold/build/local/types.go 82.35% <100.00%> (+3.10%) ⬆️
pkg/skaffold/docker/image.go 80.93% <0.00%> (+1.39%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bbcfdb0...b9bfaed. Read the comment docs.

@shaxbee
Copy link
Contributor Author

shaxbee commented Nov 9, 2020

Push is enabled automatically if load is disabled for either kind/k3d.

@shaxbee
Copy link
Contributor Author

shaxbee commented Nov 9, 2020

Build failure for one of the jobs seems intermittent as it shows maven download error.
Could you rerun?

@shaxbee shaxbee force-pushed the feat-deploy-kind-disable-load branch from e6f7362 to 1f7888f Compare November 9, 2020 21:10
@IsaacPD IsaacPD added the kokoro:run runs the kokoro jobs on a PR label Nov 11, 2020
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Nov 11, 2020
Copy link
Collaborator

@gsquared94 gsquared94 left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! PR looks great, but I think we shouldn't make isDefaultLocal function more ambiguous by checking for IsImageLoadingRequired inside it since it might be used in some other context later.

@shaxbee
Copy link
Contributor Author

shaxbee commented Nov 20, 2020

Build seems to be failing on gci lint check in unchanged file.
Fixed it up.

@shaxbee shaxbee force-pushed the feat-deploy-kind-disable-load branch from 3edacc6 to c2ecacd Compare November 20, 2020 15:14
@shaxbee shaxbee force-pushed the feat-deploy-kind-disable-load branch 4 times, most recently from 55c36a1 to af66392 Compare November 20, 2020 20:13
@shaxbee
Copy link
Contributor Author

shaxbee commented Nov 20, 2020

BTW this could be extended in future PR to support: https://github.com/kubernetes/enhancements/tree/master/keps/sig-cluster-lifecycle/generic/1755-communicating-a-local-registry.

Edit: build seems to be failing on flaky java tests downloading maven packages again.

@shaxbee shaxbee force-pushed the feat-deploy-kind-disable-load branch from af66392 to 4a7c351 Compare November 20, 2020 22:23
@shaxbee shaxbee force-pushed the feat-deploy-kind-disable-load branch from 4a7c351 to b9bfaed Compare November 26, 2020 09:52
@shaxbee
Copy link
Contributor Author

shaxbee commented Nov 29, 2020

@gsquared94 care to review? Review comments were addressed 9 days ago.

@gsquared94
Copy link
Collaborator

@gsquared94 care to review? Review comments were addressed 9 days ago.

Sorry for the delay. I was out on vacation. Will take a look first thing in the morning.

@gsquared94 gsquared94 added the kokoro:force-run forces a kokoro re-run on a PR label Nov 30, 2020
@kokoro-team kokoro-team removed the kokoro:force-run forces a kokoro re-run on a PR label Nov 30, 2020
Copy link
Collaborator

@gsquared94 gsquared94 left a comment

Choose a reason for hiding this comment

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

lgtm!

@gsquared94 gsquared94 merged commit 908ba43 into GoogleContainerTools:master Nov 30, 2020
@briandealwis briandealwis mentioned this pull request Dec 21, 2020
@zanitete
Copy link

zanitete commented Feb 4, 2021

any plan to backport this feature to 0.16.x for people still stuck to Helm 2?

@nkubala
Copy link
Contributor

nkubala commented Feb 9, 2021

@zanitete unfortunately not :( Helm 2 has been EOL'd so we're not putting work into supporting it. sorry about that

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

Successfully merging this pull request may close these issues.

Use local registry if possible with kind
6 participants