Skip to content

Uninstalled Event Source results in "Failed to list *v1.Source: the server could not find the requested resource" #4611

Open
@aavarghese

Description

@aavarghese

Describe the bug
If we create a new Event Source, ie. we install Redis Stream Sources, the parent controller successfully creates a new dynamic controller for this particular Source. But if we uninstall this Source, the created dynamic controller is not properly destroyed. This results in error messages in the log:

E1130 20:07:23.537960       1 reflector.go:383] k8s.io/[email protected]+incompatible/tools/cache/reflector.go:125: Failed to watch *v1.Source: the server could not find the requested resource

E1130 20:07:24.782159       1 reflector.go:178] k8s.io/[email protected]+incompatible/tools/cache/reflector.go:125: Failed to list *v1.Source: the server could not find the requested resource

E1130 20:07:27.383944       1 reflector.go:178] k8s.io/[email protected]+incompatible/tools/cache/reflector.go:125: Failed to list *v1.Source: the server could not find the requested resource

This code to delete controller is never called:

if !crd.DeletionTimestamp.IsZero() {
// We are intentionally not setting up a finalizer on the CRD.
// This might leave unnecessary dynamic controllers running.
// This is a best effort to try to clean them up.
// Note that without a finalizer there is no guarantee we will be called.
r.deleteController(ctx, gvr)
return nil
}

Expected behavior
Error line below isn't repeated over and over and the appropriate controllers are deleted.

To Reproduce
Install knative-eventing

k apply --filename https://github.com/knative/eventing/releases/download/v0.19.0/eventing-crds.yaml
k apply  --filename https://github.com/knative/eventing/releases/download/v0.19.0/eventing-core.yaml

Install any eventing source
For example, RedisStream

ko apply -f source/config

Delete the eventing source

For example, RedisStream

ko delete -f source/config

Knative release version
0.19.0

Additional context
Same problem also in eventing-autoscaler-keda (same code)
knative-extensions/eventing-autoscaler-keda#2

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/sourceskind/bugCategorizes issue or PR as related to a bug.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.triage/acceptedIssues which should be fixed (post-triage)

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions