Skip to content

Commit

Permalink
dedupe warning messages for deprecated API warnings (#1712)
Browse files Browse the repository at this point in the history
Signed-off-by: Ken Sipe <kensipe@gmail.com>
  • Loading branch information
kensipe committed Oct 13, 2020
1 parent 040d5ed commit 7756a5f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/kudoctl/kube/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ package kube

import (
"fmt"
"os"

apiextensionsclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset"
"k8s.io/client-go/dynamic"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/kubectl/pkg/util/term"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/kudobuilder/kudo/pkg/client/clientset/versioned"
Expand Down Expand Up @@ -52,6 +54,7 @@ func GetKubeClient(kubeconfig string) (*Client, error) {
if err != nil {
return nil, err
}
config.WarningHandler = rest.NewWarningWriter(os.Stderr, rest.WarningWriterOptions{Deduplicate: true, Color: term.AllowsColorOutput(os.Stderr)})
return GetKubeClientForConfig(config)
}

Expand Down

0 comments on commit 7756a5f

Please sign in to comment.