* Fix: kubectl create -f and kubectl delete -f are not glob friendly
* gofmt fix
* removing unused receiver
* adding extra test
* log paths used
* fixing bad merge
* klog/v2 mod
* rebase fixes
* better error fmt
* error fmt unit test
* PR comments and tests
* Add reference to globbing to help snippets
Kubernetes-commit: 2cb3c7f706dbf266820fbde2e1b23a320e5d3de7
When CRDs are deleted, discovery local cache is not invalidated.
This brings about `resource not found` error when new CRD with same name is created
with different fields(ie. changing scope from cluster-wide to namespaced).
Because this already deleted CRD still stays in serverresources.json and kubectl tries to use it.
This local cached files have 10 minutes TTL. After deletion, if user waits 10 minutes,
files will be expired and deleted and there will be no errors. However, 10 minutes is a long time
and cache needs to be invalidated after deletion occurs.
This PR adds a document into delete command by noting that there might be a need to invalidate discovery
cache when CRD is deleted. In addition to that this PR adds a test to catch this behavior.
Kubernetes-commit: 43d8b3459baec794c8a3a858c04f1562a09886a3
Currently, server-side dry-run fetches the OpenAPI schema for every
single object.
This change fetches the OpenAPI schema only once.
Kubernetes-commit: caa158610dfb53de3582ed6df0eb37359206fc66