Commit Graph

3492 Commits

Author SHA1 Message Date
Kubernetes Publisher 2ef5d7b1b7 Merge pull request #113284 from williamyeh/display_seccomp
kubectl displays seccomp profile for pod and container

Kubernetes-commit: 6d81a2c30dd5e88d92335f4b1088f2d19775e3f7
2022-12-10 00:13:42 +00:00
Sean Sullivan 423d89d5b4 Removes unused k8s.io/kubectl/pkg/apply files
Kubernetes-commit: abd5eb9a2265eed35b51cbd0f70a27c4fe9204df
2022-12-08 14:54:42 -08:00
Kubernetes Publisher 202c335561 Merge pull request #114319 from liggitt/net-master
Update golang.org/x/net 1e63c2f

Kubernetes-commit: 72acaad83924360960e21915aa94cd1db8d0196c
2022-12-07 04:05:15 +00:00
Jordan Liggitt eb82603f30 Update golang.org/x/net 1e63c2f
Includes fix for CVE-2022-41717

Kubernetes-commit: afe5378db9d17b1e16ea0028ecfab432475f8e25
2022-12-06 17:29:11 -05:00
Arda Güçlü ee99503f34 kubectl scale: proceed even if there is invalid resource in multi
Kubernetes-commit: b84f192acc61b5fa9dc438950e6cc57f75889853
2022-12-02 17:23:44 +03:00
Arda Güçlü 68a87e8d32 kubectl scale: Add dry-run prefix to indicate result is not applied
Currently, if user executes `kubectl scale --dry-run`, output has no
indicator showing that this is not applied in reality.

This PR adds dry run suffix to the output as well as more integration
tests to verify it.

Kubernetes-commit: 76ee3788ccbac9003e3f24de9000ebd91c27611f
2022-12-02 16:27:18 +03:00
Arda Güçlü 0eb2f03176 kubectl scale: Use visitor only once
`kubectl scale` calls visitor two times. Second call fails when
the piped input is passed by returning an
`error: no objects passed to scale` error.

This PR uses the result of first visitor and fixes that piped
input problem. In addition to that, this PR also adds new
scale test to verify.

Kubernetes-commit: 13be899b422a1f68c38e3a9c9d88831db709a32d
2022-12-02 16:00:22 +03:00
Arda Güçlü 7eb74e036f kubectl exec: return descriptive error message when multi resource passed
`kubectl exec` command supports getting files as inputs. However,
if the file contains multiple resources, it returns unclear error message;
`cannot attach to *v1.List: selector for *v1.List not implemented`.

Since `exec` command does not support multi resources, this PR
handles that and returns descriptive error message earlier.

Kubernetes-commit: 832644f0b38d536be7a5adce9bc62b0902710091
2022-12-02 14:05:11 +03:00
Brian Pursley 0eaacc266e i18n: Fix bug where package-level variables are not translated.
Change i18n.T() to load translations if they have not yet been loaded.

Added new integration tests to test help output translation.

Kubernetes-commit: c0dea5e31af856ed96b8257b5caa952161c8a05b
2022-11-29 23:09:57 -05:00
Chok Yip Lau 3fea4735ad Removed factory from apply command flag struct
Kubernetes-commit: cdd84a28bfc2e1e7ad552de128cd1644c7deeae7
2022-11-20 15:53:05 -05:00
Arda Güçlü b81e5186ad Add unit test for error case
Kubernetes-commit: 4699801d65c00ebb95d68a159b8cb2627ad783a5
2022-11-18 10:37:56 +03:00
wujunwei be20835e90 kubectl: remove unnecessary TODO annotations
Kubernetes-commit: 2afc78bac870286aa4f39069fb5ab3fa13a134ed
2022-11-17 09:39:30 +08:00
Kubernetes Publisher cf0626ffbf Merge pull request #113895 from marosset/use-pause-3.9
Updating pause image refernces to 3.9

Kubernetes-commit: 9b5782959b2f161a2af2b11379b23fa312a15eb5
2022-11-15 02:21:31 +00:00
Mark Rossetti 1d2ef6437d Updating pause image refernces to 3.9
Signed-off-by: Mark Rossetti <marosset@microsoft.com>

Kubernetes-commit: 534f052a8dfdd7b5861ee60d764d12da199c3bba
2022-11-14 10:17:19 -08:00
Kubernetes Publisher 81cffe129f Merge pull request #113826 from jsafrane/add-openstack
Add CSI migration of OpenStack Cinder volumes

Kubernetes-commit: e4d46148de9d83c23001323d6613618c2897a427
2022-11-11 22:23:56 +00:00
Kubernetes Publisher 125aa659f9 Merge pull request #113819 from soltysh/events_beta
Move events command to top level

Kubernetes-commit: 763f68ef77ec0745d0f0772f381bc7af6001121a
2022-11-10 23:40:30 +00:00
Jan Safranek 50d5d1244a Revert "Remove references to openstack and cinder"
This reverts commit 9bbf01bae93600d3314bce0acbff1f3a0a42e74b.

Kubernetes-commit: 5b284a50b78cb7d68b12825f5c0cfa29503c1577
2022-11-10 18:22:07 +01:00
Maciej Szulik 53106cc99b Move events command to top level
Kubernetes-commit: 50c7ebb5b45818a4244728932ce6113c10c2d41d
2022-11-10 14:32:14 +01:00
Kubernetes Publisher 42cc81c0ec Merge pull request #113769 from bobbypage/bump-cadvisor-v046
deps: Bump cAdvisor to v0.46.0

Kubernetes-commit: 37e73b419e455db34f5fe3e8d815418680ab23df
2022-11-09 18:01:51 +00:00
Kubernetes Publisher 99029ea055 Merge pull request #110907 from pacoxu/kubectl-apply
kubectl apply: warning that kubectl will ignores no-namespaced resource in future release with namespace specified and with default pruneAllowlist

Kubernetes-commit: 20a9f7786aa4ee0b6e1619c7974ea4562d2b2500
2022-11-09 06:02:25 +00:00
David Porter 3cd869dab2 deps: Bump cAdvisor to v0.46.0
Signed-off-by: David Porter <david@porter.me>

Kubernetes-commit: a2c46721638f9d9d33eadbf596df0bfa7a543ca9
2022-11-08 18:49:14 -08:00
Kubernetes Publisher 22d0d86955 Merge pull request #111795 from lojies/addnamespaceforkubectlrollback
Remove specific command suggestion from kubectl rollout undo error message

Kubernetes-commit: 3c025280c9d8f7db36ae5cafacdc457698a2fcca
2022-11-09 02:01:10 +00:00
Paco Xu 6c2e12e0be kubectl-apply: add prune test cases for non-namespaced resources
Signed-off-by: Paco Xu <paco.xu@daocloud.io>

Kubernetes-commit: 7263aba71bfdd2286200ffd7ef79766950c5fcd9
2022-11-09 07:43:43 +08:00
Paco Xu 89470f4910 kubectl apply: warning that in future release, prune will ignores no-namespaced resource if -n is not empty
Signed-off-by: Paco Xu <paco.xu@daocloud.io>

Kubernetes-commit: f3b49adadf2182ba0a7fb930e6340da725053520
2022-11-09 07:43:03 +08:00
Kubernetes Publisher 008de8b458 Merge pull request #113444 from weikhor/test_kubectl_clean_up
Clean up testing code of kubectl cmd section

Kubernetes-commit: 89ad7b37c5f0e52a970ad29b05b8cec6c1c3095c
2022-11-08 22:03:41 +00:00
Kubernetes Publisher af66de2262 Merge pull request #113116 from brianpursley/allowlist
kubectl apply: Deprecate --prune-whitelist in favor of --prune-allowlist

Kubernetes-commit: bbbb79712cb6b0a72b2695f21a95ad7bb4cc45e6
2022-11-08 22:03:39 +00:00
Marly Puckett 9cebc60d68 Update redacting functionality to redact all sensitive info in config when printing with view (#109189)
* Add RedactSecrets function

* Move RedactSecrets method to existing RawBytesData case

* Update TestRedactSecrets to use new pattern of os.CreateTemp()

Kubernetes-commit: e721272d10dd6c4d85ff613182ba0eaddcec9272
2022-11-08 18:06:48 +00:00
Kubernetes Publisher eb11cdd1f9 Merge pull request #113664 from laphets/kubectl-empty-ingress-backend-fix
Fix kubectl describe ingress when default backend is empty

Kubernetes-commit: e3d7cb5bc53bd5db8a8bfe90fe77d8d78a5ded14
2022-11-08 14:01:00 +00:00
Kubernetes Publisher 3814a9af80 Merge pull request #112905 from alexzielenski/kubectl-apply-csa-migration
kubectl: `apply --server-side` managed fields migration

Kubernetes-commit: 2f837dc113ba35f84e7012a6d1b06b075b349353
2022-11-08 08:47:02 +00:00
Kubernetes Publisher 5abcdd61ff Merge pull request #113688 from dashpole/update_utils
Update k8s.io/utils to fix util tracing panic

Kubernetes-commit: fa2e203a6bde89a84443ee9813e1f27aa31326a9
2022-11-08 08:46:59 +00:00
Kubernetes Publisher 468f34ae94 Merge pull request #113636 from marckhouzam/feat/compBashDesc
Enable shell completion descriptions for bash

Kubernetes-commit: 56a0823730b9c4dafe06a18bd8de027b40d1971c
2022-11-08 08:46:57 +00:00
David Ashpole 47de534351 update k8s.io/utils to fix util tracing panic
Kubernetes-commit: 3f1511c8e9a64cf60821036aa1fc3ec9d58a2931
2022-11-07 19:30:21 +00:00
Wenqing Luo 6a7dccd04b Fix kubectl describe ingress when default backend is empty
Kubernetes-commit: 653edeb507c3caafd0e81f6cef0a44425ef8782c
2022-11-07 10:11:28 -06:00
Marc Khouzam 4cdd516e3b Enable shell completion descriptions for bash
Cobra provides support for completion descriptions for bash.
It was turned off because of a bug with certain bash menu options which
have been fixed by Cobra 1.3.0.

Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>

Kubernetes-commit: d72926d4915133550e41de1252fe2a4aa0aa3745
2022-11-04 16:57:24 -04:00
Kubernetes Publisher 4be4703aaa Merge pull request #112261 from brianpursley/k-108630-2
kubectl run: deprecate unused / nonuseful flags

Kubernetes-commit: 3e8c848cfce00a9ac80a0b2a44dbc671891a33ef
2022-11-04 08:36:01 +00:00
Kubernetes Publisher 6020929e34 Merge pull request #113146 from alexzielenski/explain-output-plaintext
kubectl explain --output plaintext

Kubernetes-commit: b0cbf71f5c443460679052ca0cf4800e9d61ab5b
2022-11-04 04:29:30 +00:00
Alexander Zielenski 4f1b2184e0 add kubectl server-side apply migrate managedfields
in discussion with SIG, there is a strong interest in keeping the last-applied-configuration around for a bit longer as other tools transition for of it. This is OK since SSA maintains the annotation on kubectl's behalf on the server-side if it exists

migrate client-side-apply fields to SSA when --serverside-side is used

https://github.com/kubernetes/kubernetes/issues/107980

https://github.com/kubernetes/kubernetes/issues/108081

https://github.com/kubernetes/kubernetes/issues/107417

https://github.com/kubernetes/kubernetes/issues/112826

add test to make sure only one apply is needed after migration

Kubernetes-commit: 33b9552e708154c20144c7aca921ad239527fb2f
2022-11-03 20:14:37 -07:00
Brian Pursley c6025a8904 kubectl/pkg/cmd/run: deprecate flags
The --cascade flag, has no practical effect when used, so it is being deprecated.

The following flags, which are unused and ignored by kubectl run,
have been deprecated:

--filename
--force
--grace-period
--kustomize
--recursive
--timeout
--wait

Kubernetes-commit: 09804a198c64f0a738ede28e0b2cb045d16980fc
2022-11-03 23:11:12 -04:00
Alexander Zielenski 3371c3ccee use discovery client from factory in explain v2
was making my own which was uncached

Kubernetes-commit: dca025f37c7d40388f6869fc3d04b8f4fab8d122
2022-11-03 18:59:09 -07:00
Kubernetes Publisher 19f8631311 Merge pull request #109505 from zigarn/no-error-reannotate
Do not raise an error proposing to use '--overwrite' when annotating with the same value

Kubernetes-commit: d96e052d981537ae9d2376ee6ac73f3ae6817f69
2022-11-04 00:29:40 +00:00
Kubernetes Publisher fb69b58abb Merge pull request #106242 from thockin/revive-copy-lb-status-type-to-ingress
Copy LoadBalancerStatus from core to networking

Kubernetes-commit: 818b13544f6421cd414d648637db48c9271b0bb7
2022-11-03 08:34:54 +00:00
Kubernetes Publisher c9ff82cf2f Merge pull request #103177 from arkbriar/support_cancelable_exec_stream
Support cancelable SPDY executor stream

Kubernetes-commit: 3cf75a2f760b8093f7c97f26b4b2b059f3777bec
2022-11-03 04:36:02 +00:00
Alexander Zielenski 32f336c7b2 update vendor
Kubernetes-commit: a82015b4a245e48db85ce56d14037e7d69a18e90
2022-11-02 20:32:05 -07:00
Alexander Zielenski ee7b47da7d add plaintext template
Kubernetes-commit: e394364cbd1d5ace0f9cfcf10fa2bc458076d1a4
2022-11-02 20:35:18 -07:00
Alexander Zielenski 8ae416a4e0 add template loading to generator
Kubernetes-commit: 88792d9e72ee48bac2f6c7158531579cc0bc6aca
2022-11-02 20:33:11 -07:00
Alexander Zielenski b0d33eb1b8 refactor generator
refactor funcs out of generator

Kubernetes-commit: f37f63ab9fff8c38b4c0df6a7a420d1ed710ffe5
2022-11-02 20:34:12 -07:00
Paco Xu b41317e383 kubectl: remove psp support
Kubernetes-commit: cc0f8280586637f25b91b471d0c6fe19caa73a24
2022-11-02 21:03:09 +08:00
Patrick Ohly cde3c070a1 dependencies: update to ginkgo v2.6.1, gomega v1.24.2
Ginkgo v2.5.0 adds support for a "timeline": a full description of what happened
while a specific test ran, including failures, timeouts, and log output.

Ginkgo v2.6.0 adds ReportBeforeSuite which we need for
https://github.com/kubernetes/kubernetes/issues/114313.

Kubernetes-commit: f3ef4004317c1a12d84021be29dd5f92badc8eff
2022-11-02 09:07:12 +01:00
Brian Pursley 41407b14e8 kubectl apply: Deprecate --prune-whitelist in favor of --prune-allowlist
Changes in kubectl apply --prune to support k8s Inclusive Naming Initiative:
* Deprecated the --prune-whitelist flag.
* Deprecated the PruneWhitelist field on ApplyFlags struct.
* Removed PruneWhitelist field (not used anywhere) from ApplyOptions struct.
* Added --prune-allowlist flag.
* Added PruneAllowlist field on ApplyFlags struct.
* Added unit tests for prune with allowlist

This commit also fixes a bug where the command would fail if you specified
the sameGVK multiple times for --allow-whitelist. Now it only attempts to
prune the unique set of allowed GVKs.

Kubernetes-commit: f7ebf4d8852d4500f24100ca9a4ca665efc1fada
2022-10-30 20:50:19 -04:00
Kubernetes Publisher f0a2aee8eb Merge pull request #109525 from jonyhy96/feat-wait
feat: make jsonpath wait logics consistent with condition

Kubernetes-commit: 526650fc137b2e68267182b1b5116aa566be51e5
2022-10-30 20:29:03 +00:00