Skip to content

Commit 1f4f6fd

Browse files
author
interma
committed
log no CRD found error
1 parent 63d0bbb commit 1f4f6fd

File tree

10 files changed

+5
-605
lines changed

10 files changed

+5
-605
lines changed

Gopkg.lock

Lines changed: 0 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ required = ["sigs.k8s.io/testing_frameworks/integration",
2020
"github.com/go-openapi/spec",
2121
"k8s.io/kube-openapi/pkg/common",
2222
"k8s.io/apiextensions-apiserver",
23-
"github.com/pkg/errors",
2423
]
2524

2625
[[constraint]]

pkg/source/source.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,21 @@ import (
2020
"fmt"
2121
"sync"
2222

23-
"github.com/pkg/errors"
24-
2523
"k8s.io/apimachinery/pkg/api/meta"
2624
"k8s.io/apimachinery/pkg/runtime"
2725
"k8s.io/client-go/util/workqueue"
2826
"sigs.k8s.io/controller-runtime/pkg/event"
2927
"sigs.k8s.io/controller-runtime/pkg/handler"
3028
"sigs.k8s.io/controller-runtime/pkg/runtime/inject"
29+
logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
3130
"sigs.k8s.io/controller-runtime/pkg/source/internal"
3231

3332
"sigs.k8s.io/controller-runtime/pkg/cache"
3433
"sigs.k8s.io/controller-runtime/pkg/predicate"
3534
)
3635

36+
var log = logf.KBLog.WithName("source")
37+
3738
const (
3839
// defaultBufferSize is the default number of event notifications that can be buffered.
3940
defaultBufferSize = 1024
@@ -65,7 +66,6 @@ type Kind struct {
6566

6667
var _ Source = &Kind{}
6768

68-
6969
// Start is internal and should be called only by the Controller to register an EventHandler with the Informer
7070
// to enqueue reconcile.Requests.
7171
func (ks *Kind) Start(handler handler.EventHandler, queue workqueue.RateLimitingInterface,
@@ -86,11 +86,10 @@ func (ks *Kind) Start(handler handler.EventHandler, queue workqueue.RateLimiting
8686
if err != nil {
8787
switch err.(type) {
8888
case *meta.NoKindMatchError:
89-
return errors.Wrapf(err, "if %s is a CRD, should install it before calling Start",
89+
log.Error(err, "if %s is a CRD, should install it before calling Start",
9090
err.(*meta.NoKindMatchError).GroupKind)
91-
default:
92-
return err
9391
}
92+
return err
9493
}
9594
i.AddEventHandler(internal.EventHandler{Queue: queue, EventHandler: handler, Predicates: prct})
9695
return nil

vendor/github.com/pkg/errors/.gitignore

Lines changed: 0 additions & 24 deletions
This file was deleted.

vendor/github.com/pkg/errors/.travis.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

vendor/github.com/pkg/errors/LICENSE

Lines changed: 0 additions & 23 deletions
This file was deleted.

vendor/github.com/pkg/errors/README.md

Lines changed: 0 additions & 52 deletions
This file was deleted.

vendor/github.com/pkg/errors/appveyor.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)