Commit Graph

2219 Commits

Author SHA1 Message Date
Kubernetes Publisher c998274f34 Merge pull request #99617 from wzshiming/fix/ctl-make-regexp-array
Fix MakeRegexpArray handling empty strings

Kubernetes-commit: 0b6446110455695409fe97674c1488814eae8863
2021-03-04 17:45:07 +00:00
brianpursley 79dc7a9183 Add warning if client/server version difference exceeds the supported skew
Kubernetes-commit: 0c28cad8d142059b488347badd46433d50e47feb
2021-03-03 20:55:05 -05:00
Kubernetes Publisher b3f4363d68 Merge pull request #99649 from howardjohn/kubectl/better-default-logs
Improve warnings for default-container

Kubernetes-commit: cd8d3c4e792bee7d48cd144df042839758df8197
2021-03-04 01:48:49 +00:00
Kubernetes Publisher 50182350b1 Merge pull request #98952 from seans3/kubectl-commands-in-headers
Kubectl command headers in requests: KEP 859

Kubernetes-commit: 85cb886f7e2911a14cc84acc32c20a5d0254d8b9
2021-03-04 01:48:46 +00:00
Kubernetes Publisher b40c77f0f1 Merge pull request #98441 from alculquicondor/array-job-api
Add Indexed completionMode to Job API

Kubernetes-commit: 6059a67e49f04ea49120b113897d25286773a397
2021-03-04 01:48:44 +00:00
Maciej Szulik 5e9caaade6 Clean unused generators
Kubernetes-commit: da19e5b2583fa00a13110de97448bf6452010988
2021-03-03 22:47:53 +01:00
Maciej Szulik 1198e26232 Drop deprecated run flags and deprecate unused ones
Kubernetes-commit: f38ef2fbc6299f4b050a0daa578bfbf393df467c
2021-03-03 22:22:58 +01:00
Patrick Ohly 5274b1e590 generic ephemeral volumes: drop ReadOnly field
As discussed during the alpha review, the ReadOnly field is not really
needed because volume mounts can also be read-only. It's a historical
oddity that can be avoided for generic ephemeral volumes as part
of the promotion to beta.

Kubernetes-commit: 555d4a12bf58f19cbd79f866e2abce13490bde40
2021-03-03 17:16:13 +01:00
John Howard c8325cdd3b Improve warnings for default-container
Right now, there is no way to use these annotations, support multiple
`kubectl` versions, and not give users annoying warnings every time they
run `kubectl log`.

If a user is setting *both* annotations, they clearly know that the old
on is deprecated. Therefor, we should not warn them.

Kubernetes-commit: a7882d8a4264cdb9eaab9dc3d67cf0cc5afd5886
2021-03-02 09:07:50 -08:00
caodonghui a93288022b remove duplicate logs
Kubernetes-commit: 60991daf1ca6ccd24ae14e6643b8374d55bc75bb
2021-03-02 18:20:12 +08:00
Shiming Zhang 1bc7e4aa19 Fix MakeRegexpArray handling empty strings
Kubernetes-commit: 63860270e303476cdef282c6bb071c70952b4fbb
2021-03-02 17:53:00 +08:00
Maciej Szulik 10f53d93f7 Fix kubectl openapi test to use apps/v1/Deployment
Kubernetes-commit: 7c194bb3e3daaadcf0bb785a16bffb3c1add274f
2021-03-01 19:24:15 +01:00
navist2020 537227dc43 Simply modify the Kubectl logs information
Kubernetes-commit: 1995f28c64a73c8a60fb21e89b0b3d98b544df58
2021-03-01 14:56:27 +08:00
xiongzhongliang 32cf4940bf fix description of command kubectl cluster-info dump
Kubernetes-commit: 4dce977034c5d169ff4af14d61eba50d992ac81d
2021-02-28 06:39:15 +08:00
monopole a767deb039 Manually update kustomize attachment points.
Kubernetes-commit: 6c9460f0b405630ebd21cd432b8b8ffede6d7554
2021-02-25 12:06:47 -08:00
yuzhiquan 0ca8bbb1ad remove --ignore-errors flag deprecated warning message
Kubernetes-commit: 01d0d15562ccb7377176f72fb70a3cf18d0d7666
2021-02-24 19:02:24 +08:00
zhuangqh c9dbcbd2fc docs: fix outdated enhancement doc link
Signed-off-by: zhuangqh <zhuangqhc@gmail.com>

Kubernetes-commit: adf28648cb32d17cd186a6c7e8b264419e6d0759
2021-02-24 15:22:50 +08:00
Morten Torkildsen 8ae7711ae6 Promote PDBs to GA
Kubernetes-commit: 21fba79d453b0bab7153f46916126c754d10341e
2021-02-20 12:56:31 -08:00
monopole ae675e730f Delete staging/src/k8s.io/cli-runtime/pkg/kustomize
Kubernetes-commit: 073ca8b42e9b5e4bed4c7f5cec12e9c8c17ea0d9
2021-02-13 14:52:06 -08:00
Clayton Coleman 56434236a4 kubectl: Inline the containers for the user in attach/exec
The behavior of the container defaulting in attach/exec is inconsistent
and should be unified. As a user, when we default the vast majority of
pods will have a small number of containers and so printing the container
names inline (as kubectl logs did) is more appropriate. The debug message
we printed about using describe was already longer than 99% of all pod
container names, so we were wasting user time.

Unify container selection for exec and attach to be consistent with old
behavior. Properly handle the --quiet flag (should not print in that case)
for both commands. Remove EnableCmdSuggestion and the machinery it needs.

The message now prints:

> Defaulted container "etcdctl" out of: etcdctl, etcd, etcd-metrics, etcd-ensure-env-vars (init), etcd-resources-copy (init)

Kubernetes-commit: 43e8ebbbcd3f57d18d8151efb6242f88a763b06d
2021-02-11 11:40:25 -05:00
Clayton Coleman 46f90dca38 kubectl: Properly respect --quiet in exec/attach
--quiet means no informational output for the human that could be
confused with the output of the shell / command on the other side.

Kubernetes-commit: 75700d32bff0e28c7093ef384de78dbdd0db61b2
2021-02-11 11:48:43 -05:00
Maciej Szulik 283249aee3 Generated changes
Kubernetes-commit: 1fc8fe0f7d9b2cea395a297c4ebbde9b5937b460
2021-02-10 14:52:27 +01:00
Maciej Szulik 341b878121 kubectl create job support both v1beta1 and v1 cronjob
Kubernetes-commit: 470e23e770223fb9ddb147b3d431c7727f342255
2021-02-12 17:04:50 +01:00
Sean Sullivan 76c2cf7eb6 Kubectl command headers in requests: KEP 859
Kubernetes-commit: 211fc12b67ea2d04a46b24ef245b3513f2cfeb03
2021-02-09 23:09:22 -08:00
Chok Yip Lau c66790ded2 Fixed set env did not support keys with dot in it
Kubernetes-commit: ab5a81cd1502418b1c8a8f55da7f0550b42e7ab7
2021-02-06 22:27:44 -05:00
Ricardo Pchevuzinske Katz 922a8a5058 Remove extensions v1beta1 from addon manager and kubectl prune
Kubernetes-commit: 25f3cf55509acdd3bd31bc9ca028c5d5a3bd22b0
2021-02-05 09:38:28 -03:00
xiongzhongliang 4c524fcbeb fix kubectl patch command error message
Kubernetes-commit: 99f0369f9d9110dbe5d36c20e067e25077a50d9d
2021-02-04 19:15:18 +08:00
rkilingr 1d4a9f61b6 Provides capacity for make slice
* Providing capacity for slice decreases memory allocations performed

Kubernetes-commit: dfe29ae7f84dccb3a989ed1f5d73bde3f58d4ed8
2021-01-31 20:56:11 +05:30
chymy bde4985998 Condition is always 'false' because 'err' is always 'nil' in top_pod.go
Signed-off-by: chymy <chang.min1@zte.com.cn>

Kubernetes-commit: d9f800b26f103909bdc47a77539555476edc16a5
2021-01-30 14:59:13 +08: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
Jan Chaloupka ba75977126 kubectl explain: detect resource group in case there are two or more groups discovered
Assume the following CRDs exist (ordered by priority, the first is the highest):
- authentications.migration.k8s.io (K=Authentications, G=migration.k8s.io)
- authentications.metal3.io (K=Authentications, G=metal3.io)
- authentications.whereabouts.cni.cncf.io (K=Authentications, G=whereabouts.cni.cncf.io)
- authentications.snapshot.storage.k8s.io (K=Authentications, G=snapshot.storage.k8s.io)

In case 'kubectl explain authentications' is ran, the highest priority definition (in this case authentications.migration.k8s.io)
is returned. In case a user wants to explain authentication CRD of a different group, --api-version flag has to be set alongside
to point to a specific group and version. E.g. --api-version=metal3.io/v1

This PR allows to dismiss --api-version flag and perform a prefix check to select a resource (e.g. CRD) whose (resource, group) pair
fully prefixes requested resource. E.g. running 'kubectl explain authentications.metal3.io' will return
description of authentications.metal3.io. The same holds for optional field path.
I.e. 'kubectl explain authentications.metal3.io.spec' will return description of spec field
of authentications.metal3.io.spec. In case no resource match is found, the search falls back
to selecting the highest priority gvr that matches the resource.
In case --api-version is set, no prefix matching is performed. To cover cases
such as 'kubectl explain authentications.metal3.io --api-version=authentications.metal3.io/v1' where
fields path coincide with the resource fully specified name (to access .metal3.io field of authentications.metal3.io).

Kubernetes-commit: 30674db1595e3a24273ceb71cbfe67bb300ad951
2021-01-14 09:08:20 +01:00
Aldo Culquicondor 3af483b7e4 Add Job.spec.completionMode and Job.status.completedIndexes
And IndexedJob feature gate, disabled by default.
Update JobDescriber

Kubernetes-commit: a1a5868a5ae8c18df39b386d2424ff04c89826fb
2020-12-30 11:42:01 -05:00
Kubernetes Publisher e032aa6f92 Merge pull request #99581 from mengjiao-liu/kubectl-default-container-behavior
update kubectl cp flag description

Kubernetes-commit: 0121c51d81d7905448a925980ceb996dbaa2b318
2021-03-03 10:29:03 +00:00
Kubernetes Publisher 11a33b1329 Merge pull request #99615 from pacoxu/default-container/exec
kubectl: print info for default container annotation usage

Kubernetes-commit: 2a33b8293a455ecdcbdb01514fec23412d02f29b
2021-03-03 10:29:01 +00:00
Kubernetes Publisher 92a87bedd1 Merge pull request #98614 from lauchokyip/rmsecretgen
Remove dependency of generators from create secret

Kubernetes-commit: 91458ca376a960f07203cddacd71e150875fc803
2021-03-03 10:28:59 +00:00
Kubernetes Publisher b58ab96d24 Merge pull request #98572 from justaugustus/go116
[go1.16] Update to go1.16

Kubernetes-commit: e4e9c31218becac11f176cc824f5cc6b7a8036ac
2021-03-03 10:28:57 +00:00
Stephen Augustus c88c652de2 Fixup golang.org/x/term staticcheck warnings
Errors from staticcheck:
cmd/preferredimports/preferredimports.go:38:2:
  package golang.org/x/crypto/ssh/terminal is deprecated:
  this package moved to golang.org/x/term.  (SA1019)
vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go:36:2:
  package golang.org/x/crypto/ssh/terminal is deprecated:
  this package moved to golang.org/x/term.  (SA1019)
vendor/k8s.io/client-go/tools/clientcmd/auth_loaders.go:26:2:
  package golang.org/x/crypto/ssh/terminal is deprecated:
  this package moved to golang.org/x/term.  (SA1019)

Please review the above warnings. You can test via:
  hack/verify-staticcheck.sh <failing package>
If the above warnings do not make sense, you can exempt the line or
file. See:
  https://staticcheck.io/docs/#ignoring-problems

generated:
- hack/update-internal-modules.sh
- hack/lint-dependencies.sh
- hack/update-vendor.sh

Signed-off-by: Stephen Augustus <foo@auggie.dev>

Kubernetes-commit: d9435800b65d6787beaf061546599d757b8e87c9
2021-03-02 00:14:47 -05:00
mengjiao.liu 0a33eeb176 update kubectl cp --container flag description
Kubernetes-commit: 6be7b00b455f632a92c2c9c1a3878ecf5201e955
2021-03-01 18:02:02 +08:00
pacoxu 4245d9e7b5 print log for default container of kubectl
Kubernetes-commit: 96f8d6262459e802510244d2880886f8b481ee0e
2021-03-01 12:04:29 +08:00
Jordan Liggitt d7aca8bde3 [go1.16] bump golang.org/x/... dependencies
hack/pin-dependency.sh golang.org/x/crypto latest
hack/pin-dependency.sh golang.org/x/net latest
hack/pin-dependency.sh golang.org/x/exp latest
hack/pin-dependency.sh golang.org/x/sys latest
hack/pin-dependency.sh golang.org/x/time latest
hack/pin-dependency.sh golang.org/x/tools latest

hack/lint-dependencies.sh
hack/pin-dependency.sh dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037
hack/pin-dependency.sh golang.org/x/mobile v0.0.0-20201217150744-e6ae53a27f4f
hack/pin-dependency.sh golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449

hack/lint-dependencies.sh

hack/update-internal-modules.sh
hack/update-vendor.sh

Co-authored-by: Stephen Augustus <foo@auggie.dev>

Kubernetes-commit: ecef45df84a082c71dd3d96e6adb181a2c5b3790
2021-02-25 10:13:12 -05:00
Stephen Augustus 1b0724606d generated: Run hack/lint-dependencies.sh and hack/update-vendor.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>

Kubernetes-commit: 7216970cf25a39ad2e1208ad1eb5006599ca41ca
2021-02-25 09:25:53 -05:00
Stephen Augustus 249a35aa1d [go1.16] go.mod: update to go1.16
Signed-off-by: Stephen Augustus <foo@auggie.dev>

Kubernetes-commit: 3c2824e3dbed6069dabddac7816239de9cb2a6ee
2021-02-15 04:46:56 -05:00
Kubernetes Publisher 6bd2b56331 Merge pull request #99569 from pacoxu/default-container/kep-1
kubectl logs: don't check default container annotation if --all-containers is specified

Kubernetes-commit: b032ebac8e0402f900d87d48a533b192e16c2f72
2021-03-01 21:51:33 +00:00
Kubernetes Publisher fdeacde94c Merge pull request #99561 from BenTheElder/remove-bazel
Remove Bazel

Kubernetes-commit: 5498ee641b3459a0da1d4b2d42d502a318194189
2021-03-01 21:51:30 +00:00
pacoxu aedad91395 fix: will logs the default container only even --all-containers is specified
Signed-off-by: pacoxu <paco.xu@daocloud.io>

Kubernetes-commit: 71db08d15a580cee1592eb699a3ff448f5fe4fe1
2021-03-01 11:00:05 +08:00
Benjamin Elder 13ecb713fc hack/update-bazel.sh
Kubernetes-commit: 56e092e382038b01c61fff96efb5982a2cb137cb
2021-02-28 14:17:42 -08:00
Kubernetes Publisher e909d3918e Merge pull request #97686 from wzshiming/fix-logs-all-containers
Fix --ignore-errors does not take effect if multiple logs are printed and unfollowed

Kubernetes-commit: bce5d7a0158444080ed95aae6a5684ce4dd9444b
2021-02-26 09:46:29 +00:00
Kubernetes Publisher a8a0478ef5 Merge pull request #97099 from pacoxu/fix/96986
default container behavior with annotation `kubectl.kubernetes.io/default-container`

Kubernetes-commit: 3cb61dea9bffece56234390e17348c9f5bb6a963
2021-02-26 05:46:30 +00:00
pacoxu 8d367eb060 move default container annotation to kubectl pkg
Kubernetes-commit: 27bd94e54d2f8a7676411b280ab9d0ac7f9e921b
2021-02-26 10:11:12 +08:00
Kubernetes Publisher ef24597285 Merge pull request #97385 from FabianKramm/fix-http2-proxy
kubectl proxy: override request host

Kubernetes-commit: 49e0c4456deb5a021eb2528d2d4c5c9354e90225
2021-02-26 01:46:44 +00:00