You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor: Use GetAllExtensions in CallAllExtensions to eliminate code duplication
Previously, CallAllExtensions duplicated the extension filtering logic
(namespace matching, registry listing, GVK lookup) that already existed
in GetAllExtensions. This refactoring makes CallAllExtensions call
GetAllExtensions to get the list of matching handlers.
Signed-off-by: Furkat Gofurov <[email protected]>
returnerrors.Wrapf(err, "failed to call extension handlers for hook %q: failed to get GroupVersionKind for the object the hook is executed for", hookName)
235
-
}
236
232
// Make sure the request is compatible with the hook.
returnerrors.Wrapf(err, "failed to call extension handlers for hook %q: failed to call extension handler %q", gvh.GroupHook(), registration.Name)
264
-
}
265
-
// If the object namespace isn't matched by the registration NamespaceSelector skip the call.
266
-
if!namespaceMatches {
267
-
log.V(5).Info(fmt.Sprintf("skipping extension handler %q as object '%s/%s' does not match selector %q of ExtensionConfig", registration.Name, forObject.GetNamespace(), forObject.GetName(), registration.NamespaceSelector))
0 commit comments