Commit Graph

13 Commits

Author SHA1 Message Date
Katrina Verey
f6b72077c8 Stop using deprecated ioutil functions 2022-08-10 18:22:46 -04:00
John Howard
402f6ca72b Precompute IsNamespaceScoped to avoid expensive schema reads (#4152)
* Precompute IsNamespaceScoped to avoid expensive schema reads

See https://github.com/GoogleContainerTools/kpt/issues/2469

For the `gcr.io/kpt-fn/set-namespace:v0.1` function, over 50% of CPU
time is spent on IsNamespaceScoped. Instead of unmarshalling 100k lines
of JSON to determine this, instead just precompute it. We can ensure
this never is inaccurate as the test verifies the precomputed result is
up to date.

In real world kpt pipelines this cuts execution of set-namespace (and
similar functions, just an example of a trivial function) from 2.0s to
1.0s. Because these functions are run in long pipelines over many
resources, this adds up a lot.

* Add documentation
2021-09-09 10:08:11 -07:00
Phani Teja Marupaka
b6a4dd446a Refactor openAPI
Refactor global openapi
2020-11-16 23:03:56 -08:00
Phani Teja Marupaka
ec2cc2d421 Defer openAPI cleanup 2020-11-05 13:49:43 -08:00
Morten Torkildsen
d083c7f1d0 Determine namespaceability of resources from openapi schema 2020-09-12 15:01:42 -07:00
Phani Teja Marupaka
f432f4d75e Setters with subpackages 2020-09-01 10:54:08 -07:00
Phillip Wittrock
b7bef5dc44 openapi support for loading definitions from a file 2020-02-19 08:13:26 -08:00
Kubernetes Prow Robot
3fc359043a Merge pull request #2199 from phanimarupaka/Setters2ReadAndWrite
Setter Definitions read and write
2020-02-12 10:14:51 -08:00
Phillip Wittrock
7097013426 setters 2.0 2020-02-11 11:00:58 -08:00
Phani Teja Marupaka
29fbc564e3 Setter Definitions read and write 2020-02-11 10:45:39 -08:00
Phillip Wittrock
073a11f3f1 Support loading openapi from []bytes 2020-02-05 08:43:11 -08:00
Phillip Wittrock
8a2c886ab2 update kyaml go.mod and go.sum
also update cmd/config,cmd/kubectl,cmd/resource
2020-01-09 08:50:11 -08:00
Phillip Wittrock
abeab51cae Library for getting Resource and field Schema from OpenAPI 2020-01-08 10:47:11 -08:00