-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
I have namespaced objects creating non-namespaced objects and watch loop:
err = c.Watch(&source.Kind{Type: &apiextensionsapi.CustomResourceDefinition{}}, &handler.EnqueueRequestForOwner{
IsController: true,
OwnerType: &apiv1alpha1.Request{},
})
if err != nil {
return err
}
// Watch for changes to primary resource crdrequest and requeue the owner Namespace
return c.Watch(&source.Kind{Type: &apiv1alpha1.Request{}}, &handler.EnqueueRequestForObject{})
If apiv1alpha1.Request object gets created natively - watcher send me a request:
Request.Name=example-request Request.Namespace=test
But if Non-namespaced objects gets modified (which is owned by namespaced one) I get request:
Request.Name=example-request Request.Namespace=
Looks like during the lookup of owner object and resolution to the owner object itself namespace gets dropped somehow from the request reconcile.Request object
🤷♂️
mmellison
Metadata
Metadata
Assignees
Labels
No labels