-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Move cluster image loading logic into Deployer #6124
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6124 +/- ##
==========================================
- Coverage 69.96% 69.94% -0.03%
==========================================
Files 477 481 +4
Lines 18283 18336 +53
==========================================
+ Hits 12792 12825 +33
- Misses 4545 4560 +15
- Partials 946 951 +5
Continue to review full report at Codecov.
|
I tried this on
|
also, the image load is happening multiple times in a single dev loop for multiple deployers (or multi config)
|
lgtm. An alternative approach probably could be to modify |
Related: #6117, #6107
Description
The
Runner
has historically been responsible for loading images into local kubernetes clusters before running, as is required bykind
,k3d
, and evenminikube
(when running withcontainerd
). However, this is really a behavior that should be carried out by theDeployer
, as it is the component that has knowledge of the cluster - theRunner
is just an orchestrator.This change creates an
ImageLoader
component, which is responsible for performing any image loading into the cluster before doing a deploy.This component has a single method on it:
A single implementation of this interface is added in the
pkg/skaffold/kubernetes/loader
package, which embeds the existing image load logic from theRunner
inside of it.One method is added to the
Deployer
interface to give theRunner
the ability to pass images it has marked as local:Update: Each
Deployer
is now responsible for loading the set of images that it will be deploying, similar to the way eachDeployer
only tracks its own images for logging. This is determined by the union of the following 3 sets:Runner
as localDeployer
's set of manifestsDeployer
to be loaded