Commit Graph

8 Commits

Author SHA1 Message Date
Jordan Liggitt 21676edd52 Improve kubectl display of invalid errors
Kubernetes-commit: 6c549d75a8d951ec43ecd5394b2634c1a40e5dd1
2022-08-31 11:49:34 -04:00
Arda Güçlü ec010ddaa3 Remove redundant validateFlag checks
Kubernetes-commit: 5b274249400157028f1d9107b6bbd0686be2c076
2022-06-13 10:06:51 +03:00
Kevin Delgado 61f42e595f add server-side validation support to kubectl
Kubernetes-commit: fe3772890f650f9bcf020b43dc5a51fab0fa17f4
2022-03-09 14:52:32 +00:00
brianpursley 07f77100fc Add --override-type flag to kubectl run and kubectl expose to allow the choice of using a JSON Patch or Strategic Merge Patch to apply the override to the generated output.
Kubernetes-commit: 0e697e19ac9f73e2efa0e60157730ba8731e3847
2021-11-05 07:10:47 -04: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
Maciej Szulik e80cf9ce71 Use temporary directory when creating temporary file in tests
Kubernetes-commit: a7529f4cd90ea6f662e1398608eccd86e886026f
2020-07-17 10:41:16 +02:00
Lantao Liu 7c6594395c Fix kubectl panic when handling invalid error.
Kubernetes-commit: 12d944b860e4872085fa1155590c7fcef58e6bb8
2019-09-19 21:48:50 -07:00
Sean Sullivan 1919d7fa45 Move pkg/kubectl/cmd/util and subdirs to staging
Kubernetes-commit: 6c96a059dd4a64f1917378b4a0c13899dff31918
2019-07-28 21:29:36 -07:00