From c5e51ece69a0f74b831d79f0f1983354e9909d24 Mon Sep 17 00:00:00 2001 From: beast Date: Sun, 1 May 2022 17:49:01 +0800 Subject: [PATCH 1/4] Update result.go --- pkg/skaffold/build/result.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/skaffold/build/result.go b/pkg/skaffold/build/result.go index 0699316b45d..152f3a7e501 100644 --- a/pkg/skaffold/build/result.go +++ b/pkg/skaffold/build/result.go @@ -62,7 +62,7 @@ func (l *logAggregatorImpl) GetWriter(ctx context.Context) (io.Writer, func(), e writer := io.Writer(w) if output.IsColorable(l.out) { - writer = output.GetWriter(ctx, writer, output.DefaultColorCode, false, false) + writer = output.GetWriter(ctx, writer, output.DefaultColorCode, true, false) } ch := make(chan string, buffSize) l.messages <- ch From ba00f3f40f204831044c44d402934bd7c9a4cb0f Mon Sep 17 00:00:00 2001 From: beast Date: Sat, 12 Nov 2022 16:03:35 +0800 Subject: [PATCH 2/4] fix: warning info break code for getting manifest --- pkg/skaffold/deploy/helm/helm.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) mode change 100644 => 100755 pkg/skaffold/deploy/helm/helm.go diff --git a/pkg/skaffold/deploy/helm/helm.go b/pkg/skaffold/deploy/helm/helm.go old mode 100644 new mode 100755 index 0a720ec4966..31e4487e4f3 --- a/pkg/skaffold/deploy/helm/helm.go +++ b/pkg/skaffold/deploy/helm/helm.go @@ -21,15 +21,16 @@ import ( "bytes" "context" "fmt" + "github.com/cenkalti/backoff" "io" "os" + "os/exec" "path/filepath" "sort" "strings" "time" "github.com/blang/semver" - "github.com/cenkalti/backoff/v4" apimachinery "k8s.io/apimachinery/pkg/runtime/schema" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/access" @@ -539,7 +540,14 @@ func (h *Deployer) getReleaseManifest(ctx context.Context, releaseName string, n olog.Entry(ctx).Debug(b.String()) - return b.Bytes(), err + grepCmd := exec.Command("grep", "-v", "This is insecure") + if err != nil { + return b.Bytes(), err + } + + grepCmd.Stdin = &b + + return grepCmd.Output() } // packageChart packages the chart and returns the path to the resulting chart archive From c2749f308f5b21b250a821616bcaee2323ab7ea1 Mon Sep 17 00:00:00 2001 From: beast Date: Sat, 12 Nov 2022 23:04:59 +0800 Subject: [PATCH 3/4] Update delete.go --- cmd/skaffold/app/cmd/delete.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/skaffold/app/cmd/delete.go b/cmd/skaffold/app/cmd/delete.go index a2e350ab934..3dca0395074 100644 --- a/cmd/skaffold/app/cmd/delete.go +++ b/cmd/skaffold/app/cmd/delete.go @@ -47,7 +47,7 @@ func doDelete(ctx context.Context, out io.Writer) error { return withRunner(ctx, out, func(r runner.Runner, configs []util.VersionedConfig) error { manifestListByConfig, err := r.Render(ctx, io.Discard, []graph.Artifact{}, false) if err != nil { - return err + log.Entry(ctx).Debugf("skip render error: %v", err) } return r.Cleanup(ctx, out, dryRun, manifestListByConfig) }) From 8a2b7e3f865e40074adf3074ca7f7d124a8fb64d Mon Sep 17 00:00:00 2001 From: beast Date: Mon, 16 Oct 2023 17:26:41 +0800 Subject: [PATCH 4/4] fix: Custom CRD not printing tail logs --- pkg/skaffold/deploy/kubectl/kubectl.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/skaffold/deploy/kubectl/kubectl.go b/pkg/skaffold/deploy/kubectl/kubectl.go index d4187d627c5..1b5e8fdef37 100644 --- a/pkg/skaffold/deploy/kubectl/kubectl.go +++ b/pkg/skaffold/deploy/kubectl/kubectl.go @@ -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)