kubectl/pkg
Arda Güçlü 119abb31f8 Add manually invalidate cache documentation into delete
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
2021-12-21 11:53:09 +03:00
..
apply Rename test/data directory to testdata 2019-10-31 13:40:02 -07:00
apps Move pkg/kubectl/apps to staging 2019-07-24 20:02:05 -07:00
cmd Add manually invalidate cache documentation into delete 2021-12-21 11:53:09 +03:00
describe Merge pull request #106463 from SergeyKanzhelev/grpcProbe 2021-12-02 20:40:51 -05:00
drain remove ignore error flag for drain, and set this feature as default 2021-10-08 19:44:26 +08:00
explain Fix printing control character in kubectl explain 2022-01-20 15:04:15 +01:00
generate Clean unused generators 2021-03-03 22:47:53 +01:00
metricsutil fix top node output format incorrect 2021-09-18 09:41:51 +08:00
polymorphichelpers cmd/kubectl: make 'kubectl logs' default to the first container when default container cannot be determined or found by annotations (#105964) 2022-01-07 09:40:41 +08:00
proxy kubectl proxy: append context host path to request path 2020-12-16 17:37:44 +01:00
rawhttp Close the used file 2021-06-03 15:36:20 +08:00
scale Support kubectl scale --dry-run=server|client 2020-03-30 17:33:15 -04:00
scheme Promote cronjob to batch/v1: kubectl sparse_test prune 2021-05-26 20:08:36 +08:00
util OWNERS cleanup - Jan 2021 Week 1 2022-01-03 10:59:47 -05:00
validation Move pkg/kubectl/validation to staging 2019-06-26 12:56:28 -07:00