Commit Graph

27 Commits

Author SHA1 Message Date
Andrea Hoffer a0d920bb63 Adding example for interactive delete
Kubernetes-commit: 8e7593e18ab1788dc15e7f7db669301adcd42b2e
2024-09-20 14:54:52 -04:00
Abhishek Kr Srivastav 36d480f43c Fix Go vet errors for master golang
Co-authored-by: Rajalakshmi-Girish <rajalakshmi.girish1@ibm.com>
Co-authored-by: Abhishek Kr Srivastav <Abhishek.kr.srivastav@ibm.com>

Kubernetes-commit: 95860cff1c418ea6f5494e4a6168e7acd1c390ec
2024-09-12 18:15:22 +05:30
Arda Güçlü 7e050c1e1d kubectl delete: Introduce new interactive flag for interactive deletion (#114530)
Kubernetes-commit: 3267dd9d5294893580538e98c1e410f64583c0cd
2023-07-11 16:05:11 +03:00
Andrea Hoffer b676723184 Update CLI help text for grammar and consistency
Kubernetes-commit: a86380c7813a6d0cfa248c9165c878038730526a
2023-06-12 15:55:59 -04:00
Arda Güçlü 3f05cfcd78 Migrate genericclioptions.IOStreams usage to genericiooptions
Kubernetes-commit: 00c30941260a27e6929aef84c7fdbc8f1508518c
2023-04-05 14:07:46 +03:00
Sean Sullivan d545780f6d Exports WarningPrinter field in DeleteOptions
Kubernetes-commit: 75ff830ab198348b0c727d05e54754d5f73a7286
2023-01-09 17:14:16 -08:00
Sean Sullivan 6dde41fea6 Removes unnecessary dry run verifier
Kubernetes-commit: 530f65d6fd5af81c0691143fbf2c00d440476bb9
2022-12-05 16:25:12 -08:00
muyangren2 d6613187f4 Typo in kubectl delete --help 111302
Kubernetes-commit: b7e82ad2fd03b23b53ab94de66c5b3c30863724a
2022-07-21 20:42:30 +08:00
jlsong01 ec9d0484e5 add a warning printer in cli-runtime to coordinate warning style
modified:   staging/src/k8s.io/kubectl/pkg/cmd/auth/auth.go

Kubernetes-commit: 272e245f06e425fc912b1e477e8b6763850b161e
2022-02-18 20:33:38 +08:00
Kazuki Suda 08a1f36bc3 Fix discovery cache TTL to 6 hours
Signed-off-by: Kazuki Suda <kazuki.suda@gmail.com>

Kubernetes-commit: d2b4c017c8c4103199a4f85ba63fd3ab659f5f42
2022-05-09 12:22:43 +09:00
Daniel 12ebe4811f Fix: kubectl create -f and kubectl delete -f are not glob friendly (#102265)
* 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
2022-03-28 05:45:26 +00:00
Marc Khouzam cd5b039b42 Refactor completion code into its own package
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>

Kubernetes-commit: c4f8c57b43843abd13bae677b73c622e1c30b46f
2022-03-24 09:06:05 -04:00
Kevin Delgado 7e681490ec Generalize dry run verify to arbitrary query param
Kubernetes-commit: d6c83281bc696474a76365a879f2255b8b568786
2022-03-09 14:51:50 +00:00
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
Andrea Hoffer 09ed00ef49 Minor adjustments to descriptions and example text
Kubernetes-commit: 6b736f348483bb6b20d4633319305960f4d9e4c1
2021-07-06 15:05:26 -04:00
Marc Khouzam 5c679b006e Join common functions for completion
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>

Kubernetes-commit: 9625872d1e4fd0d4d397b3ab732c6969a3a376fe
2021-05-15 21:22:42 -04:00
Marc Khouzam 1946af5761 Move all completion bash code to Go code
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>

Kubernetes-commit: 879cdc5fa9e518ce76b9e1dc7e795132457966f3
2021-03-05 15:43:31 -05:00
Julian V. Modesto 04f62ffb0b Cache the OpenAPI schema for server-side dry-run.
Currently, server-side dry-run fetches the OpenAPI schema for every
single object.

This change fetches the OpenAPI schema only once.

Kubernetes-commit: caa158610dfb53de3582ed6df0eb37359206fc66
2021-01-19 16:36:14 -05:00
zhouya0 8411619cbf Support kubectl delete foreground
Kubernetes-commit: 383b5f676670d99dc1fba4254ba7f6a81a052ba3
2020-07-23 18:45:59 +08:00
Davanum Srinivas 445ad1366b switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 442a69c3bdf6fe8e525b05887e57d89db1e2f3a5
2020-04-17 15:25:06 -04:00
Brian Pursley 04c3dd17ff Default grace period to 0 when --force is used to delete an object
Kubernetes-commit: 0f31bef94c46b735bb7b1fe2a7d49d58fb93ed11
2020-02-24 09:30:56 -05:00
Julian V. Modesto 9c1c5e4f10 Add --dry-run to more kubectl commands.
- delete
- taint
- replace

Kubernetes-commit: a9ec444d743940fd93b31313a6f3f857e5c5f048
2020-02-18 18:08:25 -05:00
Ted Yu 587c053a55 Add note on the applicability of --grace-period
Kubernetes-commit: abc9a9f8369c220ee3a1de2e1917edef3d7d680e
2019-10-24 16:07:02 -07:00
draveness a61556981e feat: remove deprecated include uninitialized flag
Kubernetes-commit: f18f86ad9a16335e44b2799a419f51c9b606526b
2019-07-19 10:01:17 +08:00
Sean Sullivan 1483769081 Update gofmt
Kubernetes-commit: e2cae2344486af198f8ab38e4dd97d4f24dfd190
2019-08-01 13:14:06 -07:00
Sean Sullivan 5b48717f2d Update import statements to reflect code move
Kubernetes-commit: acece3c2964115a4f29a43e368ad5de59dbbc258
2019-08-01 11:10:05 -07:00
Sean Sullivan c6063dd846 Move pkg/kubectl/cmd/{command} to staging
Kubernetes-commit: 0e0ea523392f1121f61f99ac30a9bc2043eaed90
2019-08-01 11:01:40 -07:00