Commit Graph

213 Commits

Author SHA1 Message Date
Anna Song
497d2ee031 Added test for bug 4487: cannot parse keys with dots 2022-03-25 17:45:55 -04:00
Shoshana Malfatto
7b0ec99d90 retain quotes in namespace transformer filter (#4421)
* check tag values for double quoting

* reuse setentry

* don't override single quotes in merge and fix cm generator immutable val

* get rid of comment

* starlark annotation tests

* don't commit test image changes

* set network to bool

* isSet bool

* updating e2e config tool

* leave createtag

* fn command failing unmarshal test

* fn command test

* don't set style in run-fs

* use setentry to set tag

* remove e2e test changes and make IsStringValue an RNode method
2022-03-23 14:25:19 -07:00
Rafael Leal
97de780feb Fix error during expansion of !!merge <<: anchor tags (#4383)
* WIP

* Fix merge corner cases

* Add test for explicit !!merge tag

* Fix tests

* Cleanup

* Cleanup

* Fix deanchoring lists

* Add test case for keeping comments

* Add MapEntrySetter and fix json marshalling after deanchoring

* Keep duplicated keys

* Move MergeTag definition to yaml alias

* Remove go-spew from api

* Add support for sequence nodes on merge tags

* Add docstring to MapEntrySetter.Key

* Add docstring to MapEntrySetter struct

* Add tests to MapEntrySetter

* Fix duplicate merge key

* Revert whitespace changes on forked go-yaml

* Remove AssocMapEntry function

* Refactoring merge order

* Return errors on VisitFields and PipeE

* Add tests for each non-conforming map merges
2022-03-23 09:36:17 -07:00
koba1t
5ed96a34d7 rename IsMatchEveryIndex to IsWildcard 2022-02-10 05:13:29 +09:00
koba1t
22f9daa3ab replacements allow to replace multi values 2022-02-04 04:09:50 +09:00
koba1t
26b9af0379 Allow setting every array element in replacements 2022-01-27 06:17:23 +09:00
Mengqi Yu
cd2c6a1ad1 Remove the deprecation warning for a few RNode helpers
The Pipe method is not as intuitive as these helpers. These helpers
are convenient and useful. Deprecating them before we have better
alternatives is premature.
2021-12-03 11:47:34 -08:00
Katrina Verey
70a8ed6ed3 Add go 1.17 build tags, which go fmt auto-synchronizes 2021-09-24 17:28:21 -07:00
Phani Teja Marupaka
e997cc5486 Handle parsing of bare sequence yaml nodes 2021-09-17 14:19:27 -07:00
monopole
360585dfaf Add YAML anchor/alias expansion. 2021-08-19 11:55:09 -07: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
Katrina Verey
7a41e479c9 Filter helper for fallback field lookup 2021-08-17 11:13:10 -07:00
brianpursley
adedca09f2 Add unit tests for current behavior of three way merge 2021-08-02 20:36:28 -04:00
Natasha Sarkar
477d8930e0 fix kyaml issue with multiline scalars 2021-07-14 15:19:21 -07:00
phani
0f736ec7fd Handle comments for seq indent derivation (#4064)
* Handle comments for seq indent derivation

* Suggested changes
2021-07-13 17:46:26 -07:00
Phani Teja Marupaka
29be7fabe4 Suggested changes 2021-07-12 23:34:03 -07:00
Phani Teja Marupaka
74e867833a First sequence indent wins 2021-07-09 14:10:30 -07:00
Phani Teja Marupaka
c07ffa5c1e Update comments, tests, not expose indent option 2021-07-09 00:17:09 -07:00
Phani Teja Marupaka
f81201b74d Add options, keep seqindent annotation equivalent to index annotation 2021-07-08 14:54:23 -07:00
Phani Teja Marupaka
6dbc74b32e Suggested changes 2021-07-07 23:22:15 -07:00
Phani Teja Marupaka
ed38b5fe2b Make seq indent configurable and add retain seq indent functionality 2021-07-07 16:53:40 -07:00
phani
e1804cbc76 Retain field order after running any arbitrary functions on resources (#4021)
* Reorder resource fields

* Fix comment conflict

* Update e2e test ordering

* Suggested changes
2021-07-07 10:12:44 -07:00
Mengqi Yu
02d14d724a add missing json tags 2021-06-30 12:15:50 -07:00
Natasha Sarkar
5427ab7cc3 Merge pull request #4013 from KnVerey/go-yaml-fork
Internal go-yaml/yaml fork
2021-06-30 10:41:27 -07:00
Katrina Verey
e583f199b8 Comment out part of script that is likely only needed on first run 2021-06-30 10:18:11 -07:00
Natasha Sarkar
4b66043735 compact sequence indent 2021-06-30 10:14:45 -07:00
Natasha Sarkar
979f03e76c remove serialization hack after bump 2021-06-30 10:14:44 -07:00
Katrina Verey
2e8a3b7c45 Use the forked go-yaml module 2021-06-28 15:29:32 -07:00
Phani Teja Marupaka
1aa7a1e709 Handle null values while formatting 2021-06-27 16:55:16 -07:00
Kubernetes Prow Robot
cb4f5c3983 Merge pull request #4006 from runewake2/validate-data-map
Introduce Validate Data Map Function
2021-06-18 12:34:06 -07:00
Sam Wronski
1801d33287 Add error when datamap is nil 2021-06-18 10:14:17 -07:00
Sam Wronski
b01da61d83 Update argument name 2021-06-17 16:12:09 -07:00
Natasha Sarkar
23e28bb18a change marshal indent to 2 (#4005) 2021-06-17 13:34:04 -07:00
Sam Wronski
a1f1c2d32f Add documentation 2021-06-17 11:47:56 -07:00
Sam Wronski
10331d9560 Add GetValidatedDataMap to rnode 2021-06-17 01:46:35 -07:00
Jeff Regan
440026b9b3 Merge pull request #3965 from mengqiy/listcomments
handle comments in list correctly
2021-06-07 17:32:53 -07:00
Mengqi Yu
294070b3ab address comments 2021-06-07 15:06:57 -07:00
Mengqi Yu
cabbea0d97 handle comments in list correctly 2021-06-07 14:57:49 -07:00
Mikhail Mazurskiy
a3ed120efb Handle errors 2021-06-05 09:43:13 +10:00
monopole
5c4e363f11 Remove delegation to RNode in Resource. 2021-05-11 10:49:17 -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
Gautier Delorme
a2871181fe remove go-openapi/spec,validate,strfmt from kyaml/
Signed-off-by: Gautier Delorme <gautier.delorme@gmail.com>
2021-04-25 16:57:39 +02:00
Jeff Regan
710db98dbf Merge pull request #3685 from natasha41575/PatchServicePort
fixed disappearing port issue
2021-03-17 11:00:39 -07:00
monopole
235101a614 Drop uses of 'unstructured' terminology. 2021-03-15 15:59:06 -07:00
monopole
123a5d6e56 Remove the wrappy layer. 2021-03-15 15:59:06 -07:00
Natasha Sarkar
397744f436 fixed disappearing ports issue 2021-03-08 17:03:22 -08:00
Jeff Regan
5793653630 Merge pull request #3673 from natasha41575/PanicDuplicateKeys
Return error instead of panicking for duplicate keys
2021-03-05 11:55:33 -08:00
Natasha Sarkar
722b0131f0 return error for duplicate keys rather than panicking 2021-03-03 12:13:24 -08:00
Natasha Sarkar
af1e692a5e fix lint error 2021-03-02 16:03:26 -08:00