Metrics were being set during delete of DRPC. The current check looks
if drpc is deleted or not and here the check fails because at that
moment drpc might not have deleted because of the ownership references.
DRPC might be waiting for the child resources to be deleted. And in one of these
instances we find drpc and sets metric with 0 value. Adding a check if finalizers
is present ensures that metrics would be set only if finalizer is set. So in the
delete scenario drpc would not have finalizers and this
check would ensure that we do not set metrics again
Metrics were being set during delete of DRPC. The current check looks if drpc is deleted or not and here the check fails because at that moment drpc might not have deleted because of the ownership references. DRPC might be waiting for the child resources to be deleted. And in one of these instances we find drpc and sets metric with 0 value. Adding a check if finalizers is present ensures that metrics would be set only if finalizer is set. So in the delete scenario drpc would not have finalizers and this check would ensure that we do not set metrics again
fixes: 2264435