Skip to content

Commit

Permalink
fix: custom crd not printing streams logs (#9136)
Browse files Browse the repository at this point in the history
* fix: custom crd not printing streams logs

* fix: custom crd not printing streams logs

* fix: custom crd not printing streams logs
  • Loading branch information
beastpu authored Nov 22, 2023
1 parent 1fd9627 commit 0a866ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pkg/skaffold/deploy/helm/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,15 +295,15 @@ func (h *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art
// Otherwise, templates have no way to use the images that were built.
// Skip warning for multi-config projects as there can be artifacts without any usage in the current deployer.
if !h.isMultiConfig {
warnAboutUnusedImages(builds, manifests)
h.warnAboutUnusedImages(builds, manifests)
}

// Collect namespaces in a string
var namespaces []string
for ns := range nsMap {
namespaces = append(namespaces, ns)
}
deployedImages, _ := manifests.GetImages(manifest.NewResourceSelectorImages(manifest.TransformAllowlist, manifest.TransformDenylist))
deployedImages, _ := manifests.GetImages(manifest.NewResourceSelectorImages(h.transformableAllowlist, h.transformableDenylist))

h.TrackBuildArtifacts(builds, deployedImages)
h.trackNamespaces(namespaces)
Expand Down Expand Up @@ -622,9 +622,9 @@ func (h *Deployer) packageChart(ctx context.Context, r latest.HelmRelease) (stri
return output[idx:], nil
}

func warnAboutUnusedImages(builds []graph.Artifact, manifests manifest.ManifestList) {
func (h *Deployer) warnAboutUnusedImages(builds []graph.Artifact, manifests manifest.ManifestList) {
seen := map[string]bool{}
images, _ := manifests.GetImages(manifest.NewResourceSelectorImages(manifest.TransformAllowlist, manifest.TransformDenylist))
images, _ := manifests.GetImages(manifest.NewResourceSelectorImages(h.transformableAllowlist, h.transformableDenylist))
for _, a := range images {
seen[a.Tag] = true
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/skaffold/deploy/kubectl/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art
endTrace(instrumentation.TraceEndError(err))
return err
}
deployedImages, _ := manifests.GetImages(manifest.NewResourceSelectorImages(manifest.TransformAllowlist, manifest.TransformDenylist))
deployedImages, _ := manifests.GetImages(manifest.NewResourceSelectorImages(k.transformableAllowlist, k.transformableDenylist))

k.TrackBuildArtifacts(builds, deployedImages)
k.statusMonitor.RegisterDeployManifests(manifests)
Expand Down

0 comments on commit 0a866ae

Please sign in to comment.