Commit Graph

2675 Commits

Author SHA1 Message Date
Shin'ya UEOKA 791e7f9d0b test: Assert max unavailable for PDB test cases
Kubernetes-commit: 5c76507c3f9dd84dd3a56b39a45f99da1735bfed
2021-10-28 05:20:03 +00:00
Kubernetes Publisher 46e1b66a47 Merge pull request #105736 from deejross/drain-output-ffix
kubectl drain node output should say node was drained not evicted

Kubernetes-commit: 3fb98823c4f4e406d8c7572cc8de93a31dbaf537
2021-10-28 01:10:01 +00:00
Kubernetes Publisher 89d0053274 Merge pull request #105711 from VilledeMontreal/feat/multiComp
Shell completion of multiple resource names

Kubernetes-commit: aa7c6338c6767a86a76abae819670145033497f6
2021-10-27 21:08:50 +00:00
Kubernetes Publisher 7bae6d690a Merge pull request #105851 from VilledeMontreal/feature/compOutputFlag
Add completion to the --output/-o flag

Kubernetes-commit: 011aef1222bb5459401a400231cd8ad309486510
2021-10-27 05:11:42 +00:00
Kubernetes Publisher 0b81755902 Merge pull request #105896 from zqzten/upgrade-json-patch
upgrade json-patch to v4.12.0

Kubernetes-commit: 18cb34ebb2b64a7607057c7dea80427e2af387f3
2021-10-27 01:16:40 +00:00
Kubernetes Publisher e14545a096 Merge pull request #104832 from zc2638/fix/kubectl-env-update
add unit tests for `updateEnv`

Kubernetes-commit: 99ad41412754c6036460d3d9295db4e0e72eb688
2021-10-26 21:09:14 +00:00
Zach Zhu 7e120aedbd upgrade github.com/evanphx/json-patch to v4.12.0
Fix partial negative indice support in json patch

Kubernetes-commit: 20cc72344e653ab90c1a851816bb206b715fd231
2021-10-26 11:20:45 +08:00
Kubernetes Publisher fbd2bcf85b Merge pull request #104877 from pohly/json-kobj
component-base: test and fix JSON output for KObj

Kubernetes-commit: a5cd438b9fbf49e013453f4d6c9b2e935a78071c
2021-10-22 21:17:42 +00:00
Marc Khouzam b9e380aef5 Add completion to the --output/-o flag
For example:
$ kubectl get -o json<TAB>
json   jsonpath   jsonpath-as-json  jsonpath-file

Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>

Kubernetes-commit: 5f22baeaf1f662d0fe90ea41e453883cb726323c
2021-10-22 15:15:23 -04:00
Patrick Ohly fe834d1621 klog 2.30.0, logr 1.2.0, zapr 1.2.0
The new releases fix logging of KObj in JSON output: klog implements the new
logr.Marshaler interface and zapr uses it instead of Stringer when logging the
ObjectRef created by KObj.

Kubernetes-commit: 169e8b65a00b45ef8bbc7a14cd985df1c835953b
2021-10-22 15:13:47 +02:00
Kubernetes Publisher bfcc74e277 Merge pull request #105030 from liggitt/json-stdlib
switch from json-iterator to forked stdlib json decoder

Kubernetes-commit: cc25656b00baa33168b7a9bc574101a06788efea
2021-10-22 05:11:51 +00:00
Kubernetes Publisher 6d98fd9964 Merge pull request #105514 from jpetazzo/tweak-kubectl-run-help
Minor improvements in 'kubectl run' flag help

Kubernetes-commit: 4cfd2820badf7e90b70ef19762b9e80af3f7bc71
2021-10-21 17:04:28 +00:00
yylt 0198d9185e Fix edit command
Kubernetes-commit: 2ae37c8046128e0191ec96c8b31361ae894f2330
2021-10-21 20:07:38 +08:00
Kubernetes Publisher f5043d986f Merge pull request #94165 from soltysh/fix_cp
Use separate pathSpec for local and remote to properly handle cleaning paths

Kubernetes-commit: 6cbe18544d90c29d6b3e460dffa6d795a88257ae
2021-10-20 01:04:17 +00:00
Ross Peoples dc5f5d4011 drain node output should say drained not evicted
Kubernetes-commit: 0cf3dba1f1df9555a46f2a086e48dcfe3c9ad6b2
2021-10-18 11:05:28 -05:00
Marc Khouzam b111bee570 Complete multiple resource names
This commit teaches the completion function to repeat resource names
when supported by the command. The logic checks if a resource name
has already been specified by the user and does not include it again
when repeating the completion.

For example, the get command can receive multiple pods names, therefore
with this commit we have:
  kubectl get pod pod1 [tab]
will provide completion of pod names again, but not show 'pod1' since
it is already part of the command-line.

The improvement affects the following commands:
- annotate
- apply edit-last-applied
- apply view-last-applied
- autoscale
- delete
- describe
- edit
- expose
- get
- label
- patch
- rollout history
- rollout pause
- rollout restart
- rollout resume
- rollout undo
- scale
- taint

Note that "rollout status" only accepts a single resource name, unlike
the other "rollout ..." commands; this required the creation of a
special completion function that did not repeat just for that case.

Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>

Kubernetes-commit: 7aa5cb40316dbeb970250ee0835fbd597fd19a20
2021-10-15 15:36:09 -04:00
yuzhiquan b2f4fe7648 move remainingNodes outof drain loop
Kubernetes-commit: 0c66b43d7a7d82a5ff7e330aeecd2aa7f3c092e1
2021-10-12 09:26:22 +08:00
yuzhiquan c74a1185c3 remove ignore error flag for drain, and set this feature as default
Kubernetes-commit: f54d2a0dd1dd5c143fb32dae5c627dba87d6df7e
2021-10-08 19:44:26 +08:00
Jérôme Petazzoni eadcbb187a Minor improvements in 'kubectl run' flag help
I initially noticed a minor typo in --tty, and while fixing it,
I noticed small discrepancies in some other flags. These minor
changes should make the 'kubectl run' flag help slightly more
correct (hopefully). 🙂

Kubernetes-commit: 7ca336caf383bca9848cab64657a92b025f34312
2021-10-06 16:57:47 +02:00
Arda Güçlü 2d0f4303f1 Get object name correctly for pruned resources
Kubernetes-commit: a19bd5e47436c1f0a2aea20c4a992da18f8ba480
2021-10-06 17:01:19 +03:00
Chok Yip Lau 8d1dfaeedb Added JSONPath wait for kubectl wait
Co-authored-by: Eddie Zaneski <eddiezane@gmail.com>

Kubernetes-commit: 8fcf98ec3bb16ddf32ea1688752e6b7e2a14eaa4
2021-10-04 16:19:08 -04:00
Arda Güçlü 292510bc0b Add pruner constructor, tweak DiffOptions
Kubernetes-commit: 05100c0e49328cd149e96aa78fefc91c8c97ffee
2021-09-30 11:26:40 +03:00
Arda Güçlü eee66ad171 Add boilerplate header into util/prune
Kubernetes-commit: f4861725c9a8494481093d30a5f6e07f7ab8f2d7
2021-09-29 12:20:38 +03:00
Jack 5fb22b2ab8 RunCordonOrUncordon error if drainer has nil Ctx or Client
Kubernetes-commit: ee02f5ddc42a67166c91e539fe98cc6541db668e
2021-09-27 14:20:24 -07:00
Arda Güçlü 3f914a34f1 Add new unit tests for diff/prune
Kubernetes-commit: 17de414905fb3463ec17ec63f40180fa09965d98
2021-09-24 09:40:26 +03:00
Arda Güçlü ff5d018049 Introduce new prune parameter into diff command
This PR introduces new prune and it's dependent parameters to simulate
`kubectl apply --prune` command.

Kubernetes-commit: 56c19f1056ad6d4a4bb926fe90e37f56a31c4e2f
2021-09-17 15:27:21 +03:00
Chok Yip Lau 7254bd442d Added --sum flag to kubectl top pod
Kubernetes-commit: 71acf56766c966653c3d1fe0ef6f3f036277d546
2021-09-16 09:28:30 -04:00
Paco Xu 4cb63581c6 cleanup: add update notice in origin file & make it diff cleanly
Kubernetes-commit: b74214ebcb2acbd3b188bda6f856d9a851b1ea96
2021-09-15 13:43:00 +08:00
Jordan Liggitt 3ad990456b vendor sigs.k8s.io/json
Kubernetes-commit: 434ce4336ab06b3c34208822d558c0432ada3ad3
2021-09-14 18:20:36 -04:00
Aldo Culquicondor def56a58a5 Add ready field to Job status
to keep a count of the pods that have the ready condition.

Also:
- Add feature gate JobReadyPods.
- Add Ready to describe.

Change-Id: Ib934730a430a8e2a2f485671e345fe2330006939

Kubernetes-commit: 1bff5eb44d9897e12aff3ea10f5a856580158278
2021-09-08 14:31:59 -04:00
zc 7f3d19c990 add unit tests for updateEnv
Kubernetes-commit: f79183f2918446907da08325066a334466146711
2021-09-08 10:49:15 +08:00
Matthias Bertschy 68250fd482 add option to make kubectl cp resume on errors
Kubernetes-commit: 00b528cdf42ae4c1771f3a51c557a1f289701113
2021-09-06 10:04:15 +02:00
Chok Yip Lau 6a5a78c26b Beautify kubectl help flag commands
Kubernetes-commit: 1c031d4fa8450550fa9a6bd5abe7fac45816156e
2021-09-02 13:41:07 -04:00
Sebastiaan van Stijn 9c5348f38a go.mod: github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6
full diff: 9d4ed18562...3f7ff695ad

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Kubernetes-commit: 717e54192696505fa40d3a022f98db1f3c45ed43
2021-09-02 15:26:04 +02:00
W. Trevor King cdcb6ed356 kubectl: Document --for's Unicode case-folding condition-value comparison
When the wait command was added in 76794643c5 (add wait, 2018-05-18, #64034),
this comparison was via ToLower.  It moved to use Unicode case folding
[1,2] in f4940cf55f (Staticcheck:
vendor/k8s.io/kubectl/pkg/scale|describe/versioned|cmd/top|cmd/util/editor|cmd/top,
2020-01-21, #87403).

[1]: https://pkg.go.dev/strings#EqualFold
[2]: http://www.unicode.org/reports/tr30/tr30-1.html

Kubernetes-commit: f69d52338b21da938021af37f49f49a83016534d
2021-08-30 19:41:08 -07:00
astraw99 2ad6554e1e fix kubectl unlabel msg
Kubernetes-commit: cec30fdbedc326ef0abcbd8475b89840ae0f776d
2021-08-15 14:56:07 +08:00
Yuvaraj Kakaraparthi 38487e770c kubectl: add --support to get, patch, edit and replace commands
Co-authored-by: Nikhita Raghunath <nikitaraghunath@gmail.com>

Kubernetes-commit: a5aa858d44651ba48bdce634a39b55be91216614
2021-07-07 08:30:59 -07:00
Daein Park 5acf82be0d Add a flag to enable "Capacity" instead of "Allocatable" for an actual node memory total usage.
If "Allocatable" is used to a node total memory size, under high memory pressure or pre-reserved memory value is bigger, the "MEMORY%" can be bigger than 100%.
For suppressing the confusing, add a option to show node real memory usage based on "Capacity".
* Reference: https://github.com/kubernetes/kubernetes/issues/86499

Kubernetes-commit: 862937bf1c7975d3f54ae47a2958e47f2c50150f
2021-06-16 21:25:52 +09:00
卢振兴10069964 165827de9c code cleanup for kubectl
Kubernetes-commit: 17993020cdca7eea2fb96a993e048d2d0624fa40
2021-04-12 10:45:08 +08:00
thomassong 6847974534 fix: include init containers when determining pod QoS that keep consistent with kubelet
Signed-off-by: thomassong <thomassong2012@gmail.com>
Co-authored-by: Paco Xu <paco.xu@daocloud.io>

Kubernetes-commit: 285e43d208a29acc9d19c47099699fe13d012f8a
2021-02-05 09:30:00 +08:00
Maciej Szulik fe89be9c6f Use separate pathSpec for local and remote to properly handle cleaning paths
Kubernetes-commit: 0fb6815f08f39c8af814fa733d5235681a124b81
2020-08-21 19:24:19 +02:00
Kubernetes Publisher 04a41bcaa8 Merge pull request #105445 from ardaguclu/diff-invalid-arg-status-code
Add diff command return status code greater than 1 when flags invalid

Kubernetes-commit: e054181e517b48a3c862207537092c28604aaad9
2021-10-13 01:10:20 +00:00
Kubernetes Publisher a8d3024f11 Merge pull request #105141 from VilledeMontreal/fix/noloadPluginsForComp
Do not try to load plugins for cobra commands

Kubernetes-commit: dbd8d3bcd620037b5262eed1778f0784b49e55bc
2021-10-06 21:08:51 +00:00
Arda Güçlü 8307ca4a3c Add diff command return status code greater than 1 when flags invalid
This PR adds flagerror handler function to detect when flags are invalid.
Default flag handler returns status code 1. However, diff command embraces
this status code as changes are found. By overriding flag errors,
this PR shows same message with default case and returns status code 2.

Kubernetes-commit: 4f0848520d4cdd679c76479949546002c5935e3c
2021-10-04 13:02:34 +03:00
Kubernetes Publisher 5920119027 Merge pull request #105384 from seans3/command-headers-fix
Fixes kubectl command headers which hangs on kubectl run

Kubernetes-commit: e380ce57143fe84f8d575636ab81a06f7f8b28aa
2021-10-02 05:10:04 +00:00
Kubernetes Publisher 1e432bea02 Merge pull request #105076 from pohly/log-flush-frequency-bug
initialize logging after flag parsing + refactor commands

Kubernetes-commit: 82da9bdaab705a1a72e4c5915f6ddd8775592fdf
2021-10-02 01:11:40 +00:00
Kubernetes Publisher d6b2b6aad8 Merge pull request #105372 from MadhavJivrajani/vendor-clock-utils
Vendor in k8s.io/utils

Kubernetes-commit: eebeff9f7e0fccf1d220ce809eaea7f7f9248ce0
2021-10-01 01:15:30 +00:00
Sean Sullivan 8a45e525e5 Fixes kubectl command headers which hangs on kubectl run
Kubernetes-commit: 1d1a5499e717b928c6b2782fdcad9fa4052a38a1
2021-09-30 13:53:00 -07:00
Madhav Jivrajani c2928398a9 run hack/{pind-dependency.sh, update-vendor.sh}
Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>

Kubernetes-commit: a43fca76ea7ff6fb08153c9081f7858cd4d06dd8
2021-09-30 19:15:35 +05:30
Kubernetes Publisher 8f64ba48a0 Merge pull request #105121 from wujiangfa-xlauncher/master
fix top node output format incorrect

Kubernetes-commit: dac94e1c9ee31034d174815e287ba39fa67b2b72
2021-09-30 01:13:11 +00:00