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
Add ManagedClusterAddOn filter functionality to addon framework
This commit introduces a new filtering mechanism for ManagedClusterAddOn objects
to enable selective processing of addons based on custom criteria.
Key changes:
1. Created pkg/utils/addon.go with filter functions:
- ManagedClusterAddOnFilterFunc type for custom filtering
- AllowAllAddOns function that accepts all addons
- FilterTemplateBasedAddOns function that filters template-based addons
2. Updated all addon controllers to accept and use the filter function:
- addonconfig controller
- agentdeploy controller
- certificate controllers (CSR approve/sign)
- registration controller
3. Added comprehensive test coverage in pkg/utils/addon_test.go
4. Updated BaseAddonManager interface to include mcaFilterFunc parameter
This enables selective processing of addons, particularly useful for
filtering template-based addons vs regular addons based on their
status.configReferences.
🤖 Generated with Claude Code
Co-Authored-By: Claude <[email protected]>
Signed-off-by: zhujian <[email protected]>
0 commit comments