Handle errors

Kubernetes-commit: 5cab7f9a57dbbd6e2a181018aae523235843f77d
This commit is contained in:
Mikhail Mazurskiy 2018-07-17 20:29:55 +10:00 committed by Kubernetes Publisher
parent 70437a9c51
commit f3ae960ce1

View File

@ -27,6 +27,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/runtime"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/apimachinery/pkg/util/wait"
appsinformers "k8s.io/client-go/informers/apps/v1"
"k8s.io/client-go/kubernetes"
@ -94,7 +95,7 @@ func NewController(
// Create event broadcaster
// Add sample-controller types to the default Kubernetes Scheme so Events can be
// logged for sample-controller types.
samplescheme.AddToScheme(scheme.Scheme)
utilruntime.Must(samplescheme.AddToScheme(scheme.Scheme))
glog.V(4).Info("Creating event broadcaster")
eventBroadcaster := record.NewBroadcaster()
eventBroadcaster.StartLogging(glog.Infof)