Skip to content

Commit

Permalink
Adding corev1 scheme to Events (#821)
Browse files Browse the repository at this point in the history
* Adding corev1 scheme

* Adding error check

* Adding error check
  • Loading branch information
johnugeorge authored and k8s-ci-robot committed Sep 4, 2018
1 parent ed91105 commit 1a726c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cmd/tf-operator.v2/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ func Run(opt *options.ServerOption) error {

// Prepare event clients.
eventBroadcaster := record.NewBroadcaster()
if err = v1.AddToScheme(scheme.Scheme); err != nil {
return fmt.Errorf("CoreV1 Add Scheme failed: %v", err)
}
recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "tf-operator"})

rl := &resourcelock.EndpointsLock{
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller.v2/jobcontroller/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (jc *JobController) UpdatePod(old, cur interface{}) {
if job == nil {
return
}
logger.Infof("pod has a ControllerRef: %v, %v", curPod, oldPod)
logger.Debugf("pod has a ControllerRef: %v, %v", curPod, oldPod)
jobKey, err := controller.KeyFunc(job)
if err != nil {
return
Expand Down

0 comments on commit 1a726c7

Please sign in to comment.