Arda Güçlü
81a25f37b5
Set validate functions requiring no parameters for all commands
...
Validate function is used to validate command options and should not get
any additional parameter. To preserve compatibility across all
kubectl commands, this PR removes all parameters in validate functions.
Kubernetes-commit: 8fb423bfabe0d53934cc94c154c7da2dc3ce1332
2022-05-17 11:38:20 +03: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
Aram Peres
8e80d8fd7e
Cleanup kubectl label selectors with 'cmdutil.AddLabelSelectorFlagVar'
...
Kubernetes-commit: 8f8138bc35f59ef04b77a3520d8d1065603ccdb7
2022-01-06 23:28:44 -05:00
Andrea Hoffer
09ed00ef49
Minor adjustments to descriptions and example text
...
Kubernetes-commit: 6b736f348483bb6b20d4633319305960f4d9e4c1
2021-07-06 15:05:26 -04:00
Marc Khouzam
724356168b
Revert "Add Go tests for custom completions"
...
This reverts commit 0e18f0380042b652996d795559bfb818698abec3.
Kubernetes-commit: 1babceac650cfe8ec7ac71b34ed1ecf118b50f9d
2021-05-22 20:47:14 -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
af40736fcc
Add Go tests for custom completions
...
Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
Kubernetes-commit: c0b3a698fa15265eecdec0bd8776658c40d8d151
2021-03-05 15:44:30 -05: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
Hong Xu
cd28c3f56e
Validate scale's --current-replicas flag
...
--current-replicas is only meaningful when it's -1 or greater.
Also add an error message to clarify the range of --current-replicas. It
is unclear that --current-replicas=-1 means no precondition. This info
may be useful for programming purposes (i.e., shell scripting, etc.).
Kubernetes-commit: 8fd7862e6974fda28bb91286ca79dc6fa236f2f8
2021-03-24 13:59:08 -07: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
lala123912
11b0ae584d
fix staticcheck:vendor/k8s.io/kubectl/pkg/cmd/scale
...
vendor/k8s.io/kubectl/pkg/cmd/scale/scale.go:212:2: this value of err is never used (SA4006)
Kubernetes-commit: 5710e1b162ea90a3df2622d09864bf2411eb5fd7
2020-11-10 15:19:14 +08:00
SataQiu
28378371e6
kubectl: fix the bug that kubectl scale does not honor --timeout flag
...
Signed-off-by: SataQiu <1527062125@qq.com>
Kubernetes-commit: 8d37c3b8f24478fe36da23f3ac453767f438e80b
2020-06-06 18:19:47 +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
Julian V. Modesto
489b062728
Support kubectl scale --dry-run=server|client
...
Kubernetes-commit: efed958779d564357a9965fccf43f64ee1feb972
2020-03-30 17:33:15 -04:00
Maciej Szulik
dfa60c7722
Drop job from scale description
...
Kubernetes-commit: c3964927f758be88a65f833595a0b0d5456ce729
2019-10-23 12:25:42 +02:00
knight42
8f0927a4b0
fix: patch the Scale subresource if no precondition was given
...
Kubernetes-commit: c02d141b134d4dee17f7b1e87a65d13ae93d80a3
2019-08-13 10:50:25 +08:00
Sean Sullivan
c6063dd846
Move pkg/kubectl/cmd/{command} to staging
...
Kubernetes-commit: 0e0ea523392f1121f61f99ac30a9bc2043eaed90
2019-08-01 11:01:40 -07:00