Katrina Verey
04e1663b70
appendCsVAnnotation must mutate the annotations RNode in place
...
Otherwise, it is incompatible with filters like fieldSpec.Filter that recurse through a tree of RNodes. In the case of the bug this commit fixes, the leaf RNode is a metadata.annotation value field, and appendCsvAnnotation is called immediately before updating that leaf's value. If appendCsvAnnotation replaces the entire metadata.annotation RNode on the resource, the leaf RNode that gets updated is no longer attached to the resource.
Alternatively, `func (f Filter) setScalar` could be updated to change
the value of the leaf RNode BEFORE calling appendCsvAnnotation. However,
the modification of the entire metadata segment of the RNode in a
function that nominally just edits an annotation feels like a
side-effect prone to creating other difficult-to-debug situations,
beyond this ordering dependency.
2022-07-11 19:58:49 -04:00
natasha41575
2c23b960ff
set transformer annotation when the option is specified
2022-01-19 17:17:47 -08:00
natasha41575
4f21d60045
helper methods, types, and unit tests for transformer annotations
2021-12-29 15:27:34 -08:00
natasha41575
6dfc238aa2
improve gvk and resid strings for error messages
2021-12-22 11:39:07 -08:00
Jeff Regan
6c4e8019f8
Merge pull request #4094 from brianpursley/merge3-test
...
Add unit tests to cover existing behavior of three way merge and strategic merge patch
2021-08-19 07:41:18 -07:00
brianpursley
aabbea3e78
Add unit tests for current behavior of strategic merge patch
2021-08-02 20:36:55 -04:00
Natasha Sarkar
9a27a9f19f
replace genargs with two separate annotations
2021-07-29 15:46:09 -07:00
Natasha Sarkar
91f74e8d16
replace Resource.options with annotations ( #4061 )
2021-07-23 18:19:05 -07:00
Natasha Sarkar
a84badb834
replace Resource.refBy with annotations
2021-07-07 15:22:36 -07:00
monopole
86dd74fd62
Gather some string slice utils.
2021-06-10 13:34:20 -07:00
monopole
660847225d
Simplify gvk, speed up cluster-scoped checks.
2021-05-02 13:17:33 -07:00
monopole
c8dddac5b9
Move resid package from api to kyaml
2021-04-30 20:39:32 -07:00
monopole
123a5d6e56
Remove the wrappy layer.
2021-03-15 15:59:06 -07:00
Natasha Sarkar
f96ac2d61e
allow general name and kind changes via an options field in patches
2021-03-10 14:58:58 -08:00
Natasha Sarkar
43157f5d35
cleaned up resource refactoring
2021-02-03 14:30:25 -08:00
Natasha Sarkar
f71854a0c8
Refactored resource to store all previous names and namespaces
2021-02-03 12:01:09 -08:00
monopole
d3ea87220b
Fix Issue 3489.
2021-02-03 10:49:17 -08:00
monopole
aae2be1a79
Add tests in support of Issue 3489.
2021-02-02 18:35:46 -08:00
Natasha Sarkar
bd4580d73a
Manage name changes (prefix/suffix) via YAML annotations rather than via in-memory-only fields.
2021-01-11 13:08:45 -08:00
jregan
735befef19
Add kunstruct impl of Get/SetDataMap, replace Resource.Merge
2020-12-21 07:22:03 -08:00
jregan
bd27d5f8bb
Fix apiversion slash
2020-12-17 08:42:15 -08:00
jregan
d08b9c30ee
What is this?
2020-12-07 10:16:30 -08:00
jregan
4a55a07c14
Patchtransformers - drop copied code, improve deletion handling.
2020-11-30 11:58:43 -08:00
jregan
a5f3d5c823
Use DepProvider in tests to access kyaml impls.
2020-11-21 14:49:44 -08:00
Jeffrey Regan
75b8103215
Raise the golinter bar.
2019-11-14 16:37:49 -08:00
Jeffrey Regan
46524d3b6a
Introduce API module.
2019-10-21 13:30:31 -07:00
jregan
fddde81f9c
Move ks8deps to api for now.
2019-10-20 16:49:53 -07:00
jregan
3af5a8afea
Make resource, resmap public.
2019-10-20 10:51:20 -07:00