mirror of
https://github.com/kubernetes/sample-controller.git
synced 2025-01-19 07:52:52 +08:00
Handle errors
Kubernetes-commit: 5cab7f9a57dbbd6e2a181018aae523235843f77d
This commit is contained in:
parent
70437a9c51
commit
f3ae960ce1
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user