AmitKumarDas / metac

It is metacontroller and more
Apache License 2.0
57 stars 16 forks source link

feat(advanced selector): add more selector options to GenericController #103

Closed AmitKumarDas closed 4 years ago

AmitKumarDas commented 4 years ago

This commit adds advanced selector to GenericController. This enables controller developer to add selector to filter watch or attachments or both. Advanced selector enables one to match by namespace, labels, annotations, finalizers, any field in spec, any field in status. One can combine various select options and execute these options via AND-ing or OR-ing or a combination of both AND & OR.

NOTE: It can match fields with []string datatype as its values as well. NOTE: Advanced selector can't match fields with datatypes other than string & []string.

This commit also marks a change to the log levels for GenericController. Since generic controller is mostly being used as a library in other binaries, it becomes essential to put controller logs at more verbose levels.

In addition, various unit test cases, rename related refactoring, and better comments have been added to make metac logic more readable & easy to contribute.

Signed-off-by: AmitKumarDas amit.das@mayadata.io

AmitKumarDas commented 4 years ago

Thanks @luisdavim for the suggestions. I will keep that in mind for the future PRs.

github-actions[bot] commented 4 years ago

:tada: This PR is included in version 0.2.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: