Skip to content

Commit 77d452c

Browse files
authored
Ignore eventing error, when eventing is not installed (#3428)
1 parent 228c8eb commit 77d452c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/k8s/deployer.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,11 @@ func deleteStaleTriggers(ctx context.Context, eventingClient clienteventingv1.Kn
328328
// List existing triggers in the namespace
329329
existingTriggers, err := eventingClient.ListTriggers(ctx)
330330
if err != nil {
331+
if strings.HasPrefix(err.Error(), "no or newer Knative Eventing API found on the backend") {
332+
// knative eventing not installed -> nothing to do and return early
333+
return nil
334+
}
335+
331336
// If triggers can't be listed ,skip cleanup
332337
if errors.IsNotFound(err) {
333338
return nil

0 commit comments

Comments
 (0)