Commit Graph

477 Commits

Author SHA1 Message Date
Naoki Oketani 5e85c16f12 `kubectl create clusterrolebinding` creates rbac.authorization.k8s.io/v1 object
Kubernetes-commit: 901d7de5566e9a5e6f99c7ce6f93339cc0d5a3ce
2019-12-04 19:12:10 +09:00
wojtekt 4f3723dc40 Register conversions for kubectl testing types
Kubernetes-commit: ea140f5e1a1a297e251cc28a40e2bbf77dfd02e4
2020-01-09 14:16:33 +01:00
Tim Allclair 6fca42a14a Ensure testing credentials are labeled as such
Kubernetes-commit: 9d3670f3586c98c02cdca93b7c98dd91fc0b87bd
2020-02-04 10:36:05 -08:00
Michal Fojtik cbb6f76ae7 kubectl: allow to preselect interesting container in logs
Kubernetes-commit: 439f93c91b81eee29f2aa5c4cf6fff911e26e684
2020-02-04 13:14:43 +01:00
Antoine Pelisse 4c36396b35 kubectl-diff: Return non-1 errors on kubectl failures
Currently, diff AND kubectl can return 1 errors either when diff finds
differences, or when kubectl fails something. It also prints an ugly
error when diff finds a differences, since 1 is treated as an error.

Two things this PR does:

1. If diff returns 1, then do not treat it as an error, and exit with
exit code 1. It no longer prints the ugly error.

2. Kubectl errors are +1'd so that they never return 1 which shouldn't
be considered an error.

We need to update the documentation accordingly, to mention that
`KUBECTL_EXTERNAL_DIFF` programs must also follow the convention of
using one as their exit code for changes detected.

Kubernetes-commit: f2b21f08d95291212ba8987aa9d446c02a96089a
2020-01-21 13:52:41 -08:00
Julian V. Modesto c0b11fa131 Extend --dry-run to support string values.
* Extend --dry-run to support string values for dry run strategies
  'client', 'server', and 'none'
* Ensure --dry-run is set and accessed via cmdutil
* Deprecate --dry-run (unset), --dry-run=true, and --dry-run=false

Kubernetes-commit: af52beda260257e81cc9e19e9e5108b682ee93d6
2019-12-15 18:29:27 -05:00
Mike Danese 4524edecce cleanup req.Context() and ResponseWrapper
Kubernetes-commit: 968adfa99362f733ef82f4aabb34a59dbbd6e56a
2020-01-27 18:52:27 -08:00
Mike Danese 5252eb1dd9 refactor
Kubernetes-commit: d55d6175f8e2cfdab0b79aac72046a652c2eb515
2020-01-27 18:19:44 -08:00
Maciej Szulik c6c7c0dfb8 Remove kubectl run generators
Kubernetes-commit: 82f97775b7c2317a8ca45e616a09e447da987ab2
2020-01-09 17:09:51 +01:00
Maciej Szulik 72f1da0b87 Fix kubectl taint's Complete parsing
Kubernetes-commit: 6972d6f33af6b04a9f436fc0858b27d3b9249ea2
2020-01-21 14:36:16 +01:00
Philipp Stehle 78fe2274ad Fix describe of statefulset prints pointer not value
Kubernetes-commit: 772dbbc7d78c909fa68fc5218886a2b517c94ca2
2019-12-03 14:33:31 +01:00
Julian V. Modesto a3f7877cd1 Support DryRun in cli-runtime REST Helper.
- Move TestSupportsDryRun to cli-runtime
- Move TestDryRunVerifier to cli-runtime
- Add OpenAPI schema for testdata to cli-runtime
- Use Helper.DryRun and DryRunVerifier for Apply
- Add WithOptions methods to Helper

Kubernetes-commit: 6bea0e469bcfe4967cbf2656a998d60e0b684747
2019-12-18 22:00:34 -05:00
wojtekt 060be6d24d Immutable field and validation
Kubernetes-commit: e612ebfdff22e4bd27ad8345f7c82f074bfedf26
2019-11-26 13:29:26 +01:00
Antoine Pelisse 104e4d1e7a Improve error message when diff binary is not in PATH
Kubernetes-commit: c1a4cd9c75b4ed476ec3ed1b27a785dd1685a6e3
2020-01-17 16:17:41 -08:00
martinkaburu 50f26dd951 fix apply --prune to check cli specified namespace
Kubernetes-commit: f2518347f3dbe36586367c94aa98d5096f74a742
2019-11-25 23:21:43 +03:00
Name Surname b21179860f Fix kubectl top sort-by cpu and sort-by memory options
Kubernetes-commit: 824af9e3072d9d68071fec291ac3f5f89362e4ab
2019-09-04 16:28:21 +02:00
yuzhiquan baaee7d515 cleanup(kubectl taint): fix Errorf and comment error, and remove unnecessary bool flag
Kubernetes-commit: 87e8137c18ab27308617e83a18fde5de3edc64d7
2019-12-17 19:41:18 +08:00
Maciej Szulik 51c0d83068 Allow embedding logs command
Kubernetes-commit: 925be295fb09655ae668842e42aab2ea919c5ef2
2020-01-13 14:54:54 +01:00
Christian Huffman f9e7f47c2e Included CSINode describer
Kubernetes-commit: 1b63219c5eccdbef1d19c1c4dab40f2b46672dbd
2019-11-14 08:27:42 -05:00
whalecold 18810c4eb5 Fix(kubectl): the field of history controllerrevision will be covered by daemonset
Kubernetes-commit: 5b2cc9c2fd69d766e05c2cf476e9a9a344005155
2019-12-12 23:14:47 +08:00
zhouya0 cbbf8d8bf6 fix kubectl annotate local error
Kubernetes-commit: 568edf72ec1fc10368a19be8184b201265e6c39e
2020-01-08 17:10:08 +08:00
zhouya0 65d1aa5d00 fix apply set last applied namespace
Kubernetes-commit: 4291a03e39559d10eab0253f9cd431d6a375e235
2019-12-20 16:09:49 +08:00
Michael Gugino a17d91f9f5 kubectl: remove unreachable code
This code cannot be reached and causes some external linters
to fail.

Kubernetes-commit: 46fd8fce45cfbbe5681a44872602da6daea80cf6
2019-10-23 11:20:40 -04:00
Sally O'Malley 8eb193a6c1 silence usage when pass bad cmd options
Kubernetes-commit: 35dea07ad6d17ce6b7185621753cce468c8cbc97
2019-12-28 10:43:33 -05:00
danielqsj 4b914450ab unify alias of api errors under pkg and staging
Kubernetes-commit: 5bc0e26c1902e7e28abfc828de19a2dbb3e492c2
2019-11-12 16:26:59 +08:00
hbceylan f0cc26a729 fix kubectl run help image name
Kubernetes-commit: 5b4a7744fad614732de87e032f5d4dba743fddf9
2019-12-23 21:49:37 +00:00
Sean Sullivan 2598a9eb6d Adds PreProcessor and PostProcessor functions for modifying apply behavior
Kubernetes-commit: 79bc63fb4b79caea4b141d318b11a0892ca14c95
2019-12-17 14:58:54 -08:00
Sean Sullivan 641631dfad Moves visitedUids and visitedNamespaces (used for pruning) into ApplyOptions
Kubernetes-commit: 4e45421f610eb881a03c0d82fca038788db12b08
2019-12-17 14:19:00 -08:00
Sean Sullivan 42da131431 Move patch functionality for apply into its own file.
Kubernetes-commit: 670369f2a4a7a7d9dad3a1ae1a334317a135f6c7
2019-12-16 16:41:49 -08:00
Sean Sullivan 65d873e277 Moved prune functionality into its own file.
Kubernetes-commit: e38e320222a1f44373ab3eaea8713f4772b26f6b
2019-12-16 16:13:39 -08:00
Sean Sullivan dfcc649b05 Refactored some apply printing functionality; removed unneeded count and objs variables
Kubernetes-commit: 07cb2fda5dada5c5145216bcab90e38426cf68e8
2019-12-16 15:21:57 -08:00
Sean Sullivan dd819b3425 Created GetObjects() method for ApplyOptions and integrated into apply
Kubernetes-commit: 02af4c9be20db201f2a2069816e97004a96bf760
2019-12-16 13:56:52 -08:00
Sean Sullivan 395bc6fc90 Changes Visit() to Infos() in apply to keep slice of objects
Kubernetes-commit: 2103ea4ddedc59d14322fd0fc34c8a9928256551
2019-12-16 13:00:33 -08:00
Anish Shah 3c43664ced Refactor `kubectl proxy` command to have similar design pattern as other kubectl commands.
Few days ago I watched this kubectl code base tour on Youtube
(https://www.youtube.com/watch?v=uz8TS3V9qqY). It talks about a design
pattern that almost every command follows. But I found out that
`kubectl proxy` command does not follow this pattern. So, I'm
refactoring this command to use similar design pattern as other kubectl
commands.

Kubernetes-commit: 0bd41a300f12b1dbaec19fc94b868f91640542df
2019-09-21 10:52:42 -07:00
Haosdent Huang 08def252f7 fix static check in kubectl/pkg/cmd/annotate.
Kubernetes-commit: 303c1a40bcee81fe14845d2af9dae2073f86ec52
2019-12-08 23:25:50 +08:00
Naoki Oketani fe07b19cb4 Fix a bug in port-forward: named port not working with service
Kubernetes-commit: 73c1ab71e27eee0066ba637575e60093952f3ff1
2019-11-22 02:59:26 +09:00
zhouya0 0833d7cba2 kubectl change podSecurityPolicy group
Kubernetes-commit: 7947b6ce6d8a498000d81b68fa674f88b1d7680a
2019-11-18 15:00:33 +08:00
Arjun Naik fa550e796d Adds tests
Signed-off-by: Arjun Naik <arjun@arjunnaik.in>

Kubernetes-commit: 8ab226263a18fa16afdb6fd14da63544095a8937
2019-12-10 18:09:08 +01:00
Ivan Glushkov 3af9a45dfd Adds the algorithm implementation for the Configurable HPA
Kubernetes-commit: 27ffe439b61aaee196190749f1191d9957c86ca1
2019-10-14 19:33:09 +04:00
Michael Gugino ebda9f6262 kubectl/drain: add option skip-wait-for-delete-timeout
Currently, some circumstances may cause waitForDelete to
never succeed after the pod has been marked for deletion.
In particular, Nodes that are unresponsive and have
pods with local-storage will not be able to
successfully drain.

We should allow drain to ignore pods that have a
DeletionTimestamp older than a user-provided age.
This will allow controllers utilizing kubectl/drain
to optionally account for a pod that cannot be
removed due to a misbehaving node.

Kubernetes-commit: da53044abdf8c8a9771a5c3dfd861f0c4ec78c40
2019-11-23 20:00:06 -05:00
Sally O'Malley 6d309ed99e When running `kubectl drain` in dry-run, list warnings and pods that would be deleted.
Kubernetes-commit: 909300b8be909c48a68900c407de03be95555409
2019-09-12 14:31:09 -04:00
Nan Yu 656f993514 Rename PodDisruptionsAllowed to DisruptionsAllowed in type PodDisruptionBudgetStatus
Kubernetes-commit: 1fb0dd4ec5134014e466509163152112626d52c3
2019-12-03 11:22:23 -08:00
Michael Gugino feccbe3c28 kubectl/drain: add disable-eviction option
Currently, if eviction is supported during a drain operation,
eviction is always used.

This commit allows the user to specify disabling eviction.
This is particularly useful when you wish to ignore
PodDisruptionBudgets after a normal drain has failed for
some time.

Kubernetes-commit: 6c1d587d5142b95e6c169a198a086332a7e4d8ad
2019-11-23 11:18:52 -05:00
Christian Huffman fc490f462d Included FSType in CSI volumes
Kubernetes-commit: bbae978d4a0885a6135afb713e252ec4fa41a277
2019-11-14 11:18:40 -05:00
Michael Gugino fe592e7f80 kubectl/drain: Add context support
This commits allows specifying a context.Context
in the Helper type. This context is utilized to
cancel waitForDelete.

Kubernetes-commit: 8682e902f5487e04b893da7230125db0d7ae66b4
2019-11-23 13:58:59 -05:00
Jordan Liggitt 1d31df4756 fixup kubectl test
Kubernetes-commit: deb75da17bb1fa95e5b56fb1207ba247cd9953dd
2019-11-26 13:13:38 -05:00
Jordan Liggitt 74e4737411 Switch TableGenerator/TableConvertor interfaces to metav1
Kubernetes-commit: 36eb250cbb441984260ded6f7abeb796974031c3
2019-11-26 13:13:25 -05:00
Sally O'Malley de3d4fcc02 don't error if set-resources patch is empty
Kubernetes-commit: ecd1c0747272ab908daa64b0f4b2b18a8cb18362
2019-11-20 19:22:18 -05:00
zhouya0 6d82c82d12 add test coverage with kubectl get components
Kubernetes-commit: 07806d4300c5f410194c0dcd2da86c40bef42e1b
2019-11-25 17:57:56 +08:00
Wojciech Tyczynski 24d21a0ee4 Fix kubectl conversions
Kubernetes-commit: bfa4188123ed334d4f5dda3a79994cadf663d8f2
2019-11-17 18:35:55 +01:00