feature(wait): turn the debug logs into stdout print.

Signed-off-by: Cédric de Saint Martin <cdesaintmartin@wiremind.fr>
pull/8582/head
Cédric de Saint Martin 5 years ago
parent 621c2020c6
commit 20b422ef28

@ -120,7 +120,6 @@ func (c *Client) Wait(resources ResourceList, timeout time.Duration) error {
} }
w := waiter{ w := waiter{
c: cs, c: cs,
log: c.Log,
timeout: timeout, timeout: timeout,
} }
return w.waitForResources(resources) return w.waitForResources(resources)

@ -19,6 +19,7 @@ package kube // import "helm.sh/helm/v3/pkg/kube"
import ( import (
"context" "context"
"fmt" "fmt"
"os"
"time" "time"
"github.com/pkg/errors" "github.com/pkg/errors"
@ -44,7 +45,10 @@ import (
type waiter struct { type waiter struct {
c kubernetes.Interface c kubernetes.Interface
timeout time.Duration timeout time.Duration
log func(string, ...interface{}) }
func (w *waiter) log(format string, v ...interface{}) {
fmt.Fprintf(os.Stdout, fmt.Sprintf("%s\n", format), v...)
} }
// waitForResources polls to get the current status of all pods, PVCs, and Services // waitForResources polls to get the current status of all pods, PVCs, and Services

Loading…
Cancel
Save