Skip to content

Commit 6c16e65

Browse files
matejvaseklance
authored andcommitted
fix: describe works without Eventing
1 parent 284b77f commit 6c16e65

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

knative/describer.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package knative
22

33
import (
44
"fmt"
5+
"k8s.io/apimachinery/pkg/api/errors"
56

67
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
78
"k8s.io/client-go/rest"
@@ -73,7 +74,8 @@ func (describer *Describer) Describe(name string) (description faas.Description,
7374
}
7475

7576
triggers, err := eventingClient.Triggers(namespace).List(metav1.ListOptions{})
76-
if err != nil {
77+
// IsNotFound -- Eventing is probably not installed on the cluster
78+
if err != nil && !errors.IsNotFound(err) {
7779
return
7880
}
7981

0 commit comments

Comments
 (0)