Commit Graph

14 Commits

Author SHA1 Message Date
Katrina Verey
14947e449b Address new linter complaints 2022-03-31 11:37:26 -04:00
Sam Dowell
e3160373f0 test: add testutil for mutation tracker
This change provides a common test util for a mutation tracker stub.
This is intended to reduce the duplicated boilerplate as additional
filters implement the TrackableFilter interface.
2022-01-28 21:25:34 +00:00
sdowell
3687250ca2 Add TrackableFilter interface (#4410)
* add kio filter interface

This interface is an extension of the Filter interface which can be used
for filters which are capable of tracking which fields they mutate.

* add TrackableSetter struct to filtersutil

This struct provides an abstraction to help Filters implement the
TrackableFilter interface

* implement TrackableFilter with annotations

This updates the annotations filter to implement the TrackableFilter
interface by reusing the TrackableSetter abstraction provided by
filtersutil.

This is done to provide a generic and consistent experience across the
filters

* implement TrackableFilter with labels

This updates the labels filter to implement the TrackableFilter
interface by reusing the TrackableSetter abstraction provided by
filtersutil.

This is done to provide a generic and consistent experience across the
filters
2022-01-24 11:05:32 -08:00
Sam Dowell
0fe1236e20 feat: Add SetEntryCallback to annotations filter
Add a configurable callback that is invoked each time an
annotation is applied by the annotations filter. This is useful
for scenarios such as tracking annotations as they are applied.

Issues: GoogleContainerTools/kpt#2448
2021-11-30 01:21:42 +00:00
monopole
cb42142161 Fix api tests that accomodated bad label and anno quoting. 2021-01-15 17:37:46 -08:00
monopole
b3fc306f6a Move some code to make it reusable without import cycles. 2021-01-14 10:29:51 -08:00
jregan
873c8c1d17 Move to new constants. 2020-08-07 12:18:24 -07:00
Jeff Regan
a70c6b3496 Tweak sequence treatment in fieldspecs 2020-07-22 09:23:47 -07:00
jregan
71b7b00bd8 Switch prefix transformer to kyaml. 2020-07-17 16:08:41 -07:00
Phillip Wittrock
77b5a4a215 kustomize transformers to create fields if they are null 2020-05-15 12:30:59 -07:00
Phillip Wittrock
b622306ff7 Quote yaml 1.1 non-string values for commonlabels and commonAnnotations 2020-05-14 19:05:41 -07:00
Phillip Wittrock
0866e2a54b Set common labels and annotations as strings 2020-05-13 16:58:38 -07:00
Jeffrey Regan
2be48ca96a Function to set labels. 2020-03-27 17:53:28 -07:00
Morten Torkildsen
f39f28d38f Add annotations filter based on kyaml libraries 2020-03-25 21:47:12 -07:00