Skip to content

Commit

Permalink
rename imageList to podSelector (#2989)
Browse files Browse the repository at this point in the history
  • Loading branch information
balopat authored and dgageot committed Oct 5, 2019
1 parent 38ef437 commit 18721bb
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pkg/skaffold/runner/build_deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (r *SkaffoldRunner) BuildAndTest(ctx context.Context, out io.Writer, artifa

// Update which images are logged.
for _, build := range bRes {
r.imageList.Add(build.Tag)
r.podSelector.Add(build.Tag)
}

// Make sure all artifacts are redeployed. Not only those that were just built.
Expand Down
2 changes: 1 addition & 1 deletion pkg/skaffold/runner/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ func (r *SkaffoldRunner) createLogger(out io.Writer, artifacts []*latest.Artifac

func (r *SkaffoldRunner) newLoggerForImages(out io.Writer, images []string) *kubernetes.LogAggregator {
kubectlCLI := kubectl.NewFromRunContext(r.runCtx)
return kubernetes.NewLogAggregator(out, kubectlCLI, images, r.imageList, r.runCtx.Namespaces)
return kubernetes.NewLogAggregator(out, kubectlCLI, images, r.podSelector, r.runCtx.Namespaces)
}
2 changes: 1 addition & 1 deletion pkg/skaffold/runner/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func NewForConfig(runCtx *runcontext.RunContext) (*SkaffoldRunner, error) {
labellers: labellers,
defaultLabeller: defaultLabeller,
portForwardResources: runCtx.Cfg.PortForward,
imageList: kubernetes.NewImageList(),
podSelector: kubernetes.NewImageList(),
cache: artifactCache,
runCtx: runCtx,
intents: newIntents(runCtx.Opts.AutoBuild, runCtx.Opts.AutoSync, runCtx.Opts.AutoDeploy),
Expand Down
2 changes: 1 addition & 1 deletion pkg/skaffold/runner/portforwarder.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
func (r *SkaffoldRunner) createForwarder(out io.Writer, kubectlCLI *kubectl.CLI) {
r.forwarderManager = portforward.NewForwarderManager(out,
kubectlCLI,
r.imageList,
r.podSelector,
r.runCtx.Namespaces,
r.defaultLabeller.RunIDKeyValueString(),
r.runCtx.Opts.PortForward,
Expand Down
13 changes: 8 additions & 5 deletions pkg/skaffold/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,14 @@ type SkaffoldRunner struct {
defaultLabeller *deploy.DefaultLabeller
portForwardResources []*latest.PortForwardResource
builds []build.Artifact
imageList *kubernetes.ImageList
imagesAreLocal bool
hasBuilt bool
hasDeployed bool
intents *intents

// podSelector is used to determine relevant pods for logging and portForwarding
podSelector *kubernetes.ImageList

imagesAreLocal bool
hasBuilt bool
hasDeployed bool
intents *intents
}

// for testing
Expand Down

0 comments on commit 18721bb

Please sign in to comment.