kubectl/pkg
Ondra Kupka edad3048e9 kubectl: Cache Verifier.HasSupport calls
The underlying implementation decodes OpenAPI schema on every HasSupport
call. This causes these calls to be expensive and noticable when many
resources are being applied.

This patch wraps the verifier with a thread-safe cache so that when many
resources of the same kind are being checked, only the first call
includes schema decoding.

This solution is specifically limited to the kubectl codebase without
any changes required in client-go, for now, although that is where the
issue is actually originating.

Kubernetes-commit: 9043afae6d98585dd14d203d48807b14b433d730
2025-05-23 21:58:05 +02:00
..
apps Remove `newlineReporter` custom report 2022-06-01 13:09:47 +08:00
cmd kubectl: Cache Verifier.HasSupport calls 2025-05-23 21:58:05 +02:00
config kuberc: introduce fuzzing for kuberc types 2025-05-16 13:45:37 +02:00
describe Revert "improve display format" 2025-06-10 16:56:58 +02:00
drain kubectl: add test coverage for cordon command (#129202) 2024-12-17 06:34:43 +00:00
explain Fix dup word in API doc 2025-02-19 16:51:11 -08:00
generate cleanup: omit comparison with bool constants 2023-09-04 16:59:23 +08:00
kuberc kuberc: add tests for DefaultGetPreferences 2025-06-02 16:47:02 +02:00
metricsutil [KEP-2400] kubectl top: add a --show-swap option (#129458) 2025-06-04 17:10:38 +03:00
polymorphichelpers Drop null creationTimestamp from test fixtures 2025-03-24 09:37:26 -04:00
proxy Remove ioutil from kubectl 2022-07-30 22:31:16 +09:00
rawhttp Migrate genericclioptions.IOStreams usage to genericiooptions 2023-04-05 14:07:46 +03:00
scale Replace PollImmediate with PollUntilContextTimeout (#128147) 2024-11-07 16:57:29 +02:00
scheme vac support ResourceDescriber 2024-01-08 18:45:06 +08:00
util kubectl: avoid logging during init 2025-06-24 11:07:47 +02:00
validation OpenAPIResourcesGetter allows lazy-loading OpenAPI V2 2023-03-13 20:28:40 -07:00