Commit Graph

686 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
d2e59002ae Merge pull request #4538 from natasha41575/kubeopenapiupgrade
move to google/gnostic v0.5.7-v3refs
2022-03-25 15:37:58 -07:00
natasha41575
c857ff8371 move to google/gnostic v0.5.7-v3refs 2022-03-25 15:05:18 -07:00
Anna Song
497d2ee031 Added test for bug 4487: cannot parse keys with dots 2022-03-25 17:45:55 -04:00
Natasha Sarkar
e8640724a9 Merge pull request #4497 from m-Bilal/fix-3812
Fix 3812; Error message changed and check for MalformedYamlError
2022-03-24 09:55:44 -07: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
Mohd Bilal
e25db3df2e Test case updated 2022-02-27 09:11:00 +00:00
Mohd Bilal
bd05631887 Error type MalformedYamlError created. api.internal.target.kusttarget.accumulateResources checks for this new error type 2022-02-27 07:21:16 +00:00
Kubernetes Prow Robot
6950a0d246 Merge pull request #4467 from KnVerey/fn-cfg-openapi-validation
fn framework: Enable validation using openAPI schema for functionConfig
2022-02-24 10:32:31 -08:00
Katrina Verey
c90504a19d Enable validation using function config schema from KRMFunctionDefinition 2022-02-24 13:20:29 -05:00
Kubernetes Prow Robot
ff40460d3b Merge pull request #4424 from koba1t/feature/allow_setting_every_array_element_in_replacements
Allow setting every array element in replacements
2022-02-09 17:03:46 -08: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
Katrina Verey
a86723c3a3 Fix regression 4388 2022-02-02 12:36:03 -05:00
Katrina Verey
7bc51153d0 Add missing header 2022-02-01 18:06:27 -05:00
Katrina Verey
3c1e695f3f Update year in all the addlicense targets 2022-02-01 17:41:44 -05:00
koba1t
26b9af0379 Allow setting every array element in replacements 2022-01-27 06:17:23 +09:00
Mengqi Yu
816e2365bf Add benchmark test for parsing openapi in protobuf format 2022-01-25 12:10:25 -08: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
Kubernetes Prow Robot
77b1af2d91 Merge pull request #4352 from natasha41575/FilterErrors
prevent internal annotations from showing up in the errors thrown by filters
2021-12-29 13:45:22 -08:00
Sylvain Rabot
31b7cf9e0a Upgrade cobra for better zsh support
Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
2021-12-23 19:49:24 +01:00
natasha41575
c659306ee2 don't surface entire node content in error message 2021-12-22 16:56:02 -08:00
natasha41575
6dfc238aa2 improve gvk and resid strings for error messages 2021-12-22 11:39:07 -08: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
Kubernetes Prow Robot
8c6af9440c Merge pull request #4327 from mengqiy/fixanno
use internal.config.kubernetes.io prefix instead of internal.config.k8s.io
2021-12-03 10:02:27 -08:00
Mengqi Yu
646915cb86 use internal.config.kubernetes.io prefix instead of internal.config.k8s.io 2021-12-02 14:00:18 -08:00
Sam Dowell
9d29f57789 feat: Add Sort method to kyaml fn Results
Issues: GoogleContainerTools/kpt#2195
2021-12-01 20:57:48 +00:00
Natasha Sarkar
01420768c8 Merge pull request #4241 from Goodwine/kyaml-result-provider
Handle "Result" errors as non-fatal errors in kyaml FilterFuncs
2021-11-22 11:07:18 -08:00
Mengqi Yu
bd7bad19a1 add to BuildAnnotations 2021-11-19 12:13:12 -08:00
Mengqi Yu
2ee2d3e389 use custom id as key of the mapping and make kio.Pipeline behave the same as framework.Execute 2021-11-19 07:30:31 -08:00
Mengqi Yu
81edfb7ee8 default result.severity to info when formatting string 2021-11-19 07:30:31 -08:00
Mengqi Yu
4e7aebc20c address comments 2021-11-18 14:58:04 -08:00
Mengqi Yu
5caed5b90a kyaml/fn/framework ensures the annotation output format matches the input
If the input only contains legacy format anntations (path, index, id), the
output will be the same.
2021-11-17 14:09:19 -08:00
Goodwine
4cde50ab14 fix typo
Co-authored-by: Katrina Verey <kn.verey@gmail.com>
2021-11-11 16:33:17 -08:00
Carlos Ortiz García
894ffec36a Handle kyaml Filter errors type Result as non-breaking errors and store in ResourceList
- Result can only count as error when passed as pointer, this makes easy use of "errors.As"
- Existing Filter() implementations that return Result from the `framework` package won't return an error anymore but modify the ResourceList
2021-11-11 15:26:07 -08:00
Mohd Bilal
cb1cbbe044 Fixes 4108; remove hidden files in kustomize edit command to correctly mimic shell globbing behaviour (#4170)
* util and util_test corrected

* fixed behaviour of fsondisk with test updated

* glob behaviour fixed in fsnode

* removed commented code
2021-11-10 08:51:26 -08:00
Kubernetes Prow Robot
394567079d Merge pull request #4272 from mengqiy/pointer
Make ResourceList follow k8s api conventions
2021-11-09 15:41:26 -08:00
Mengqi Yu
374d790a21 Make ResourceList follow k8s api conventions
Make optional fields as pointers.
Add omitempty for optional fields.
2021-11-08 21:35:49 -08:00
Carlos Ortiz García
20c608989a Move kio.ByteRW tests from framework_test to byteio_readwriter_test 2021-11-08 11:55:02 -08:00
Carlos Ortiz García
ba4d83f75f only override wrapping kind if it wasn't set already 2021-11-08 11:29:57 -08:00
Carlos Ortiz García
067559127d test cases for framework wrapping/unwrapping bug 2021-11-08 10:13:00 -08:00
Kubernetes Prow Robot
37ab5579f0 Merge pull request #4229 from natasha41575/annotationAndLabelSelectionInReplacements
Annotation and label selection in replacement targets
2021-11-04 13:08:23 -07:00
natasha41575
ef5f1d347d support label and annotation selection in replacement targets 2021-11-04 12:25:15 -07:00
natasha41575
3ea8b79925 update results field of ResourceList to implement function spec v1 2021-10-29 14:28:50 -07:00
Natasha Sarkar
71b978da1a Merge pull request #4253 from natasha41575/resourceListSDKHelpers
provide utility helpers for preserving internal annotations
2021-10-29 14:25:06 -07:00
natasha41575
b4a69f08c0 provide utility helpers for preserving internal annotations 2021-10-29 12:30:55 -07:00
natasha41575
c3c02887ec bump ResourceList from v1alpha1 to v1 2021-10-19 16:15:27 -07:00
natasha41575
55ac9ca88d fix bug with migrating annotations 2021-10-12 15:42:54 -07:00
Kubernetes Prow Robot
67c58ad4f4 Merge pull request #4210 from natasha41575/openapiFromComponent
fix issue with getting openapi schema from components
2021-10-04 19:27:49 -07:00
natasha41575
11e19a3d0f separate custom openapi test from the others 2021-10-04 18:48:54 -07:00