Commit Graph

750 Commits

Author SHA1 Message Date
Jordan Liggitt 3f7d004bdf Revert "Add new --wait-for-creation flag in kubectl wait command"
This reverts commit e24b9a022f3b1e97ea538c9754d4d38f119f275e.

Kubernetes-commit: 8d67437865a8e1abaed0b813d6913b412f7ed2b4
2024-06-21 12:13:08 -04:00
Arda Güçlü d5a8f05803 Remove deprecated kubectl exec command execution without dash (#125437)
* Remove deprecated kubectl exec command execution without dash

* Use command execution with dash in kubectl exec

* Modify unit tests to only use command after dash

Kubernetes-commit: 6f4e97e905e5553e75a5a8c042c9f5a29bd1b78d
2024-06-21 19:22:55 +03:00
Arda Güçlü 64a1fe556b Add new --wait-for-creation flag in kubectl wait command
kubectl wait command errors out when the waited resource does not exist.
But we need to provide a way to the users about intentionally also waiting for
the creation of resources.

This PR introduces a new flag to cover waiting for the creation of resources
with preserving the default behavior.

Kubernetes-commit: e24b9a022f3b1e97ea538c9754d4d38f119f275e
2024-01-26 15:53:55 +03:00
Sean Sullivan 13611d4701 Graduate PortForwardWebsockets to Beta
Kubernetes-commit: 3ae3b4ea551443d8ef695d31bf0c51963fe35ac3
2024-06-15 16:09:23 -07:00
James Munnelly b57bb4f06e KEP-4193: promote ServiceAccountTokenNodeBinding feature to beta
Kubernetes-commit: 5481e630dea4c57c31b65a4fadf1bbeca77c2c57
2024-05-31 12:16:03 +01:00
Oldřich Jedlička 1d05cd7a4e Fix editor launch with Windows cmd.exe when KUBE_EDITOR has spaces
Kubernetes-commit: df71672e5798960d0c6b4fa730aa7ac12991aef5
2022-08-29 22:13:25 +02:00
Ritikaa96 24a31a929b correcting description as per review
Signed-off-by: Ritikaa96 <ritika@india.nec.com>

Kubernetes-commit: b9ec8b3c4643c36491ba94e48e6b957828c850cb
2024-05-30 11:53:02 +05:30
Ritikaa96 6c2c451048 adding suggested changes
Signed-off-by: Ritikaa96 <ritika@india.nec.com>

Kubernetes-commit: 6f4e60a6b7ce56a5e083330f2b8c2277f4a659f0
2024-02-26 11:05:01 +05:30
Ritikaa96 2f762a69a2 Improving kubectl get output
Adding namespace flag & examples
Signed-off-by: Ritikaa96 <ritika@india.nec.com>

Kubernetes-commit: 22186fafaf79d6eae8375b3d018e181a645a3d31
2024-02-22 14:56:45 +05:30
Stephen Kitt 713b7e79c0 Use canonical json-patch v4 import
The canonical import for json-patch v4 is
gopkg.in/evanphx/json-patch.v4 (see
https://github.com/evanphx/json-patch/blob/master/README.md#get-it for
reference).

Using the v4-specific path should also reduce the risk of unwanted v5
upgrade attempts, because they won't be offered as automated upgrades
by dependency upgrade management tools, and they won't happen through
indirect dependencies (see
https://github.com/kubernetes/kubernetes/pull/120327 for context).

Signed-off-by: Stephen Kitt <skitt@redhat.com>

Kubernetes-commit: 5300466a5c8988b479a151ceb77f49dd00065c83
2024-02-16 13:57:24 +01:00
Stephen Kitt 6b5d9dfa70 Update kubectl kustomize to kyaml/v0.17.1, cmd/config/v0.14.1, api/v0.17.2, kustomize/v5.4.2
Signed-off-by: Stephen Kitt <skitt@redhat.com>

Kubernetes-commit: 33c6f6bc65395aa514c9cf17115a1c63564c22e7
2024-05-27 17:42:29 +02:00
ah8ad3 e5da5e005a add approve as a valid verb in can-i
Kubernetes-commit: 12684aacefd3d4a2ba4eecded14086a0b626431b
2024-05-26 15:02:09 +03:30
Ritikaa96 ff551a76e3 correcting link to krew install
Signed-off-by: Ritikaa96 <ritika@india.nec.com>

Kubernetes-commit: 23ac0be7adf9212bec4771a351417a1142520485
2024-05-27 16:52:19 +05:30
Ritikaa96 8941dd6b94 added name-only and examples in the kubectl plugin help
Signed-off-by: Ritikaa96 <ritika@india.nec.com>

Kubernetes-commit: 3848c8b07a4b09d6fe9c8ea88b4229c6f637baf4
2024-04-08 15:02:36 +05:30
Brian Pursley df7520c1f3 Fix inconsistent validation of -f or -k flag in kubectl create command
Kubernetes-commit: 4fddd6a3cda9c95c8ae5b4a36d3c3fb06aa1dce1
2024-05-22 15:36:28 -04:00
Abhishek Kr Srivastav a4551ef19a fixed flaky test by splitting expected output string
addressed review comments

Kubernetes-commit: 5de6f7cf6167b04892750423228ccd61ac09ddd4
2024-05-22 14:52:52 +05:30
Brian Pursley 8d8b5a6120 Use ptr.To instead of deprecated pointer functions
Kubernetes-commit: 288d132cf62efe029b6359c600565f8c7b12647d
2024-05-20 16:14:54 -04:00
mochizuki875 916a6ea031 Add keep options
Kubernetes-commit: b63fa1300ca99e65cbb8797c0128f3c1c1d1ef9f
2024-02-06 07:19:23 +00:00
Arda Güçlü 2e9d71e05d kubectl create cronjobs: Manually set OwnerReferences
Kubernetes-commit: 11c0c8bb705f3c4f5dac00f8b0ddbec6a95cd7aa
2024-05-15 13:31:31 +03:00
Case Wylie b1dfef4f42 feat: add all-pods log flag to kubectl
Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>

Kubernetes-commit: 6db859eb5de14d748ace74974951697477848ee9
2024-05-07 19:43:46 -04:00
TessaIO 5f33246cf8 feat: add ports autocompletion for kubectl port-forward command
Signed-off-by: TessaIO <ahmedgrati1999@gmail.com>

Kubernetes-commit: a84e893afa2d4fdd1e42ee6047812ff46daa9296
2024-05-01 23:33:39 +02:00
Eduard Voiculescu f8b298459c show warning message only when running kubectl get --watch-only
Kubernetes-commit: a0aa7bf6d18bbeccc48447bb859ffb8fe28da3dc
2024-02-29 13:53:11 -05:00
Brian Pursley 150571ea52 Change non-quantity strings to sort alphanumerically, instead of using "Natural Sort", which is confusing for users.
Kubernetes-commit: 322aa9a649de1db9f9a18889a3c249ec841d2127
2024-04-24 14:59:37 -04:00
ah8ad3 c572c1d825 Add completion for kubectl set image
Kubernetes-commit: ee58214bfb909c27222b635c55e2043c776cf211
2024-04-28 14:04:48 +03:30
TessaIO 3d99e3ab7e fix: add whitespace for drain error message
Signed-off-by: ahmed.g <ahmed.g@adjoe.io>

Kubernetes-commit: 487f83500faadc8ec972aa164b07940476288e2f
2024-04-28 17:51:06 +02:00
Brian Pursley 852454f7f7 Improve performance of TestForceApply unit test.
Change backOffPeriod from const to var, so that it can be set lower during unit test.

Kubernetes-commit: f011ed5ca5b23971f2dc620971b3b5bebb346b84
2024-04-23 22:04:38 -04:00
carlory 7f19a8d4f7 fix unusable secret manifest for type docker-registry
Kubernetes-commit: c12e12bd89570979efd7798a3a809228d36e7ec3
2023-07-26 18:08:01 +08:00
Claudiu Belu 0ee0d225f2 Replaces path.Operation with filepath.Operation (staging)
The path module has a few different functions:
Clean, Split, Join, Ext, Dir, Base, IsAbs. These functions do not
take into account the OS-specific path separator, meaning that they
won't behave as intended on Windows.

For example, Dir is supposed to return all but the last element of the
path. For the path "C:\some\dir\somewhere", it is supposed to return
"C:\some\dir\", however, it returns ".".

Instead of these functions, the ones in filepath should be used instead.

Kubernetes-commit: 856bb5c8f266f5276f1a576f47be622d7cb384e7
2022-06-15 15:17:24 +03:00
Dr. Stefan Schimanski bea8dbbff9 kubectl: fix plugin lookup with positional arguments
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>

Kubernetes-commit: 62d379fa5abd4f109b1f1dfe2112feff03c569b4
2024-03-31 19:44:03 +02:00
Amirsadra Abdollahi 41e94233a1 Fix: correct dryRunStratergy typo in kubectl expose cmd
Kubernetes-commit: 041337648938dee4229a4147a0239527b3689082
2024-03-25 18:58:35 +03:30
Arda Güçlü 49f3ec973c Add e2e test for kubectl interactive delete
Kubernetes-commit: 7faa8bbac3bbd36a4ee680e6f82460d587186139
2024-01-09 10:12:42 +03:00
Arda Güçlü 14d23cc879 Add custom debug profiles on top of static profiles
This PR adds `custom` flag to let user customizes debug resources.
`custom` flag accepts partial container spec in json format.

Kubernetes-commit: af2dadcb18a0411a0f9aa286c743801efdb81049
2023-09-01 11:46:01 +03:00
Sean Sullivan 18888dae3e adds comments to tunnelingResponseWriter
Kubernetes-commit: 3d56ff21fd3c9c9da82ff22044691ef0671ac7b6
2024-03-04 11:10:17 -08:00
Sean Sullivan 1ac3b7558a adds return context in RunPortForward()
Kubernetes-commit: 9e1546284302c66fda0bae12fc301ee8acf39933
2024-03-01 21:10:32 -08:00
Sean Sullivan 858d3a5b72 portforward: tunnel spdy through websockets
Kubernetes-commit: 8b447d8c97e8823b4308eb91cf7d75693e867c61
2024-02-21 08:56:07 +00:00
Craig Newton 0f1712d674 Add namespace to NotFound error for kubectl logs command (#120111)
Signed-off-by: Craig Newton <newtondev@gmail.com>

Kubernetes-commit: 20b28312ea9278c7b93340d0eca71023c45a43b3
2024-03-01 16:16:48 +00:00
ah8ad3 0184416a0c cleanup: add zero as a value for token create duration and act as default, added test, updated the help text
change duration validator text message in create token

unit bug fixed

Kubernetes-commit: 3b5a79f6471309055090b123a6f88197217e9276
2024-02-28 21:52:58 +03:30
Sean Sullivan 2b8ea3563c remote command turn on feature gates
Kubernetes-commit: a147693deb2e7f040cf367aae4a7ae5d1cb3e7aa
2024-02-13 14:10:40 -08:00
José Carlos Chávez 65a57a36aa chore: adds consistent vanity import to files and provides tooling for verifying and updating them. (#120642)
* chore: drops update vanity imports from script.

* chore: changes copyright year to 2024.

* chore: makes lint happy.

Kubernetes-commit: 6d6398ef9266abce3518a4c9a3d4e4d8feeffdc1
2024-02-08 15:58:16 +00:00
Francis Laniel 4bcd969a9e kubectl debug: add sysadmin profile
Add the sysadmin profile from KEP 1441 [1].

Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
[1]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-cli/1441-kubectl-debug#debugging-profiles

Kubernetes-commit: 4d6c0ba518d6c4037102736fe443490dde006fc2
2023-07-10 14:21:39 +02:00
Mohammed Yasin 3e5acb915d fix: create tls secret cert to crt for --cert flag
- Fixed help message for crete tls for --cert flag
- Renamed to "cert" to "crt"

Signed-off-by: Mohammed Yasin <yasindce1998@gmail.com>

Kubernetes-commit: 2203cb7dde8196da4e769d7f7a99918f2c7bb6d3
2023-12-29 06:19:28 +00:00
Vandit Singh 3731515d71 Negative index regression test for json-patch (#122625)
* add testcase with negative index

* exercise successful negative index patching

* use different values for testing

Co-authored-by: Chris Bandy <bandy.chris@gmail.com>

---------

Co-authored-by: Chris Bandy <bandy.chris@gmail.com>

Kubernetes-commit: 83ff8a2f49f820fb355b24c65b8629710dca8a54
2024-01-18 09:58:32 +00:00
Arda Güçlü cb3e3dd9f6 Use tristate for provideclusterinfo to manage provided flag
Kubernetes-commit: 38c67af789bc62b88275e6a12facfe3f7881208c
2023-11-29 08:58:59 +03:00
Arda Güçlü 2f794d398e move provideclusterinfo assignment into correct place
Kubernetes-commit: 5e5f8b1dd29d1c4f983620dd818b1bc1f00d7319
2023-11-28 08:54:54 +03:00
Arda Güçlü 7af2fcf712 kubectl config set-credentials: Add InteractiveMode and ProvideClusterInfo flags
`set-credentials` command can also be used to config kubeconfig with credentials
exec plugins. However, there is no flag provided by this command to set
`InteractiveMode` and `ProvideClusterInfo` fields in credentials exec plugins.
Since `InteractiveMode` is required field, this makes the command's output
is incomplete and invalid. This PR introduces 2 new flags in set-credentials
command to let users can configure these 2 fields in credentials exec plugins,
especially the one `InteractiveMode` which is required.

Kubernetes-commit: b088e65007761bda1aee0b5fb92f79d1aae82c05
2023-11-23 15:32:32 +03:00
Jefftree d8e26d70e5 Make OpenAPIGetter tolerant of nil
Kubernetes-commit: 9d1829c33ac457d2c803ff900f67df03af50fa94
2023-12-15 13:44:54 -05:00
Arda Güçlü bd6c3274b0 Initialize default attach func regardless of the value of flag
Kubernetes-commit: acbbaddada4cf302134962b1d7fd9fb2c0bdba37
2023-12-22 09:50:48 +03:00
Kazuki Suda 2f8da6f89c Update the help mesage of interactive flag in kubectl delete
Kubernetes-commit: 90e68e3a024cf3793a8a6aae5dcfbf7750f4c6e1
2023-12-21 21:42:23 +09:00
weilaaa b84e274c59 use build-in max and min func to instead of k8s.io/utils/integer funcs
Kubernetes-commit: eb8f3f194fed16484162aebdaab69168e02f8cb4
2023-12-15 15:09:11 +08:00
yulng 4afdc439d1 remove PruneWhitelist, use prune-allowlist instead
Signed-off-by: yulng <wei.yang@daocloud.io>
Signed-off-by: Paco Xu <paco.xu@daocloud.io>

Kubernetes-commit: 06679402e75d001d54770c9ec67cacbf28794009
2023-07-05 11:38:20 +08:00