Ability to extend functionality of existing matchers like SSABasedGenericKubernetesResourceMatcher
#2553
Milestone
SSABasedGenericKubernetesResourceMatcher
#2553
Is your feature request related to a problem? Please describe.
While addressing the issue discussed in #2509 regarding matching
Quantity
values, I created a custom matcher to extend the functionality ofSSABasedGenericKubernetesResourceMatcher
. My goal was to build upon the original matcher, preserving much of its existing functionality. However, when I attempted to override thematches
function, I found that the other necessary methods were private, preventing me from utilizing them in my override. This forced me to clone the entire class to achieve the desired functionality.Describe the solution you'd like
I would like to be able to create custom SSABased matchers by extending
SSABasedGenericKubernetesResourceMatcher
without needing to clone it entirely.Describe alternatives you've considered
One alternative is to make certain helper methods—such as
checkIfFieldManagerExists
,sanitizeState
,keepOnlyManagedFields
, andremoveIrrelevantValues
—protected instead of private. Doing this may also require that some constants be readable at the subclass level, allowing for greater flexibility and customization when extending the base class.The text was updated successfully, but these errors were encountered: