Add field filter option to include
Kindly asking to add kindByField to included config option. This cloud be used to include only resources matching a field filter, e.g. having a set label, something in the line of:
included:
kindByField:
*:
- field: [ metadata.label.component ]
values: [ 'controller' ]
Seems like a catch all option of "*" available for kindByField, and field nesting might be required for this to work.. Could I help somehow?
@pstefka Thank you for your request. Field nesting is supported by the current exclude logic as used in exclude.kindByField
kindByField:
Service:
- field: [ metadata, name ]
# the value is compared to the string representation of the actual kind value
values: [ exclude-me-1, exclude-me-2 ]
Includes currently supports kinds. kindByField could be added it should behave the same as currently with kinds, that if includes are defined, all excludes should be ignored.
Would you like to create a merge request?
Unfortunatelly I don't speak GO :-/ wouldn't be sure, it's good ..