Commit Graph

9863 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
6239abe698
Merge pull request #89225 from andrewsykim/apparmor-api
move apparmor annotation constants to k8s.io/api/core/v1
2020-04-12 19:11:50 -07:00
t-qini
68600b843f Switch from fake storage to mock clients in azure unit tests. 2020-04-13 09:33:35 +08:00
bitscuit
5fa7a08e1c fix exact year inconsistencies in human readable duration 2020-04-11 14:06:15 -07:00
Kubernetes Prow Robot
4bba193bea
Merge pull request #89666 from julianvmodesto/kubectl-scale-dry-run
Support kubectl scale --dry-run=server|client
2020-04-11 10:45:47 -07:00
Kubernetes Prow Robot
5bfe8fe2b9
Merge pull request #88940 from tianhongw/master
fix golint errors in staging/src/k8s.io/client-go/plugin/pkg/client/a…
2020-04-10 08:09:47 -07:00
Kubernetes Prow Robot
57b88867b5
Merge pull request #89989 from tanjunchen/fix-bug-20200409
pkg/util/yaml/decoder.go:NewDocumentDecoder sets a larger Buffer to allow larger yaml
2020-04-09 22:27:47 -07:00
Kubernetes Prow Robot
ec00b4fcc2
Merge pull request #89833 from liggitt/json-raw
preserve integers decoding raw JSON values
2020-04-09 12:53:47 -07:00
Rob Scott
0493a30805
Graduating ServiceAppProtocol to beta 2020-04-09 12:12:54 -07:00
Kubernetes Prow Robot
e322da5ddc
Merge pull request #88585 from pancernik/plugin-args-api-config
Add types for Scheduler plugin args to kube-scheduler.config.k8s.io
2020-04-09 09:19:44 -07:00
Kubernetes Prow Robot
897c10e7b2
Merge pull request #89551 from zlabjp/restore-kubectl-prune-multiple-namespaces
Restore the ability to `kubectl apply --prune` without -n flag
2020-04-09 07:49:43 -07:00
knight42
2fefd9eea4
fix(kubectl): remove trailing space when completing file path 2020-04-09 14:54:01 +08:00
Kubernetes Prow Robot
7b20442513
Merge pull request #89979 from gaurav1086/remove_dup_net_import
Remove double import of k8s.io/apimachinery/pkg/util/net
2020-04-08 23:31:43 -07:00
Tatsuhiro Tsujikawa
7af3b01f24 Restore the ability to kubectl apply --prune without -n flag
Before https://github.com/kubernetes/kubernetes/pull/83084, `kubectl
apply --prune` can prune resources in all namespaces specified in
config files.  After that PR got merged, only a single namespace is
considered for pruning.  It is OK if namespace is explicitly specified
by --namespace option, but what the PR does is use the default
namespace (or from kubeconfig) if not overridden by command line flag.
That breaks the existing usage of `kubectl apply --prune` without
--namespace option.  If --namespace is not used, there is no error,
and no one notices this issue unless they actually check that pruning
happens.  This issue also prevents resources in multiple namespaces in
config file from being pruned.

kubectl 1.16 does not have this bug.  Let's see the difference between
kubectl 1.16 and kubectl 1.17.  Suppose the following config file:

```yaml
apiVersion: v1
kind: ConfigMap
metadata:
  creationTimestamp: null
  name: foo
  namespace: a
  labels:
    pl: foo
data:
  foo: bar
---
apiVersion: v1
kind: ConfigMap
metadata:
  creationTimestamp: null
  name: bar
  namespace: a
  labels:
    pl: foo
data:
  foo: bar
```

Apply it with `kubectl apply -f file`.  Then comment out ConfigMap foo
in this file.  kubectl 1.16 prunes ConfigMap foo with the following
command:

$ kubectl-1.16 apply -f file -l pl=foo --prune
configmap/bar configured
configmap/foo pruned

But kubectl 1.17 does not prune ConfigMap foo with the same command:

$ kubectl-1.17 apply -f file -l pl=foo --prune
configmap/bar configured

With this patch, kubectl once again can prune the resource as before.
2020-04-09 02:54:10 +00:00
tanjunchen
11804c34b6 fix bug when using big yaml on the scanner 2020-04-09 10:08:04 +08:00
Monis Khan
0bc62112ad
Allow handlers early in the request chain to set audit annotations
This change adds the generic ability for request handlers that run
before WithAudit to set annotations in the audit.Event.Annotations
map.

Note that this change does not use this capability yet. Determining
which handlers should set audit annotations and what keys and values
should be used requires further discussion (this data will become
part of our public API).

Signed-off-by: Monis Khan <mok@vmware.com>
2020-04-08 19:52:23 -04:00
Kubernetes Prow Robot
b3837f858a
Merge pull request #89942 from dims/update-fsnotify-to-pick-up-bug-fixes
Updating dependency github.com/fsnotify/fsnotify to version v1.4.9
2020-04-08 16:47:57 -07:00
Gaurav Singh
29ceb8d5f2 Remove double import of k8s.io/apimachinery/pkg/util/net 2020-04-08 16:25:23 -04:00
Rafał Wicha
c4d20ca8a8 Add types for Scheduler plugin args to kube-scheduler.config.k8s.io 2020-04-08 20:23:56 +01:00
Kubernetes Prow Robot
3c3fc800df
Merge pull request #89881 from embano1/etcd-leader-ctx
Add etcd WithRequireLeader option to API watches
2020-04-08 09:09:44 -07:00
Kubernetes Prow Robot
6747678a39
Merge pull request #88464 from brianpursley/kubernetes-86130
Fixed bug where jsonpath expression with nested range produces wrong output
2020-04-07 18:47:57 -07:00
Davanum Srinivas
eee5235d25
Updating dependency github.com/fsnotify/fsnotify to version v1.4.9
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-04-07 20:50:27 -04:00
Kubernetes Prow Robot
172553bf94
Merge pull request #89926 from wojtek-t/cleanup_default_conversions_2
Stop relying on default conversions for metav1beta1 and e2e-node tests
2020-04-07 16:46:23 -07:00
Michael Gasch
70c9f770d7 Add etcd WithRequireLeader option to API watches
Watches against etcd in the API server can hang forever if the etcd
cluster loses quorum, e.g. the majority of nodes crashes. This fix
improves responsiveness (detection and reaction time) of API server
watches against etcd in some rare (but still possible) edge cases so
that watches are terminated with `"etcdserver: no leader"
(ErrNoLeader)`.

Implementation behavior described by jingyih:

```
The etcd server waits until it cannot find a leader for 3 election
timeouts to cancel existing streams. 3 is currently a hard coded
constant. The election timeout defaults to 1000ms.

If the cluster is healthy, when the leader is stopped, the leadership
transfer should be smooth. (leader transfers its leadership before
stopping). If leader is hard killed, other servers will take an election
timeout to realize leader lost and start campaign.
```

For further details, discussion and validation see
https://github.com/kubernetes/kubernetes/issues/89488#issuecomment-606491110
and https://github.com/etcd-io/etcd/issues/8980.

Closes: https://github.com/kubernetes/kubernetes/issues/89488

Signed-off-by: Michael Gasch <mgasch@vmware.com>
2020-04-07 22:42:08 +02:00
wojtekt
466acf62e3 Move unstructured test to better place 2020-04-07 17:19:26 +02:00
wojtekt
248a75f9f4 Stop relying on default conversions for metav1beta1 2020-04-07 17:19:00 +02:00
Morten Hauberg
5fe57c6148
Remove double kubectl from output 2020-04-07 12:54:26 +02:00
Kubernetes Prow Robot
41856db7b8
Merge pull request #88270 from brianpursley/duration-2y0d
Add unit tests for human readable duration functions
2020-04-07 03:25:43 -07:00
Kubernetes Prow Robot
38f0a8bc74
Merge pull request #89652 from liggitt/relist-timeout
Fix client watch reestablishment handling of client-side timeouts
2020-04-07 01:15:44 -07:00
Kubernetes Prow Robot
871ca4b2a7
Merge pull request #89902 from wojtek-t/ilb_for_large_clusters
Fix setting up internal load balancer for GCE
2020-04-06 17:47:57 -07:00
Kubernetes Prow Robot
cabf5d1cdc
Merge pull request #89350 from SataQiu/fix-kube-proxy-20200323
kube-proxy: treat failure to bind to a port as fatal
2020-04-06 17:47:20 -07:00
Kubernetes Prow Robot
f8176abe43
Merge pull request #89858 from tedyu/api-svr-err-etcd
kube-apiserver should exit with error if not able to connect to etcd
2020-04-06 13:48:13 -07:00
Kubernetes Prow Robot
9c3b5887d2
Merge pull request #89821 from wojtek-t/cleanup_apimachinery_tests
Cleanup apimachinery tests and stop relying on default conversions
2020-04-06 13:48:00 -07:00
wojtekt
c6f6972958 Fix GCE ILB for large clusters 2020-04-06 20:17:12 +02:00
wojtekt
3fb80a6d82 Fix default conversion for pkg/runtime tests 2020-04-06 18:07:10 +02:00
Ted Yu
8d90805c4b kube-apiserver should exit with error if not able to connect to etcd
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-04-06 08:47:15 -07:00
Andrew Sy Kim
2e56866c97 move apparmor annotation constants to k8s.io/api/core/v1
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-04-06 10:22:04 -04:00
Kubernetes Prow Robot
c1f1b1bceb
Merge pull request #89848 from seans3/kubectl-apply-fix
Even with build error, kubectl apply should apply all valid resources
2020-04-05 18:57:46 -07:00
Kubernetes Prow Robot
b3db9d3c6c
Merge pull request #89857 from tedyu/hdr-protocol-ver
Correctly parse X-Stream-Protocol-Version header
2020-04-05 17:21:46 -07:00
Kubernetes Prow Robot
07c556f40e
Merge pull request #89822 from jingyih/update_etcd_client_3p4p7
Update etcd client to v3.4.7 in k8s v1.19
2020-04-05 15:15:46 -07:00
Sean R. Sullivan
748ad74245 Even with build error, kubectl apply should apply all valid resources 2020-04-04 15:48:31 -07:00
Kubernetes Prow Robot
5ea2d69ccd
Merge pull request #89834 from spiffxp/update-gengo
Update k8s.io/gengo to e0e292d8aa12
2020-04-04 12:11:45 -07:00
Ted Yu
8aada68c99 Correctly parse X-Stream-Protocol-Version header
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-04-04 09:15:53 -07:00
Kubernetes Prow Robot
7c6473b7c9
Merge pull request #87329 from windmilleng/nicks/informer-error-handling
cache: add error handling to informers
2020-04-04 08:35:46 -07:00
Kubernetes Prow Robot
1cf634d24c
Merge pull request #87821 from tedyu/cfg-map-update
Check Annotations map against nil for ConfigMapLock#Update()
2020-04-03 22:41:46 -07:00
Jordan Liggitt
8b9165839f k8s.io/kube-openapi v0.0.0-20200403204345-e1beb1bd0f35
fix client-side validation to allow a value of 0 for a number field
2020-04-03 22:18:49 -04:00
Jordan Liggitt
aeef92b3bd Preserve int/float distinction when decoding raw values 2020-04-03 22:18:44 -04:00
Connor Gorman
aa57a36b0e Make DefaultChanSize an exported var so it can be modified 2020-04-03 17:58:52 -07:00
Ted Yu
086d6ae9bb Check Annotations map against nil for ConfigMapLock#Update()
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-04-03 16:47:19 -07:00
Aaron Crickenberger
f9538b118d Update k8s.io/gengo to e0e292d8aa12
This is mainly to pick up the bugfix for reducing log noise while
running import-boss
2020-04-03 14:40:22 -07:00
Kubernetes Prow Robot
d911254deb
Merge pull request #89704 from liggitt/gnostic
github.com/googleapis/gnostic v0.4.1
2020-04-03 14:19:46 -07:00
Kubernetes Prow Robot
cfc845be63
Merge pull request #89747 from alvaroaleman/add-ass-validated-selector
apimachinery/pkg/labels: add SelectorFromSet
2020-04-03 12:33:46 -07:00
wojtekt
8eb60c2474 Remove k8s.io/apimachinery/pkg/runtime/serializer/testing directory 2020-04-03 17:45:02 +02:00
Lee Verberne
8414d180fe kubectl debug: support different kinds
This is a refactor ahead of adding support for supporting `kubectl debug` of nodes.
2020-04-03 17:11:09 +02:00
jingyih
4df38040dc Pin go.etcd.io/etcd to 3.4.7 and rebuild vendor 2020-04-03 07:15:59 -07:00
Kubernetes Prow Robot
15c3e492b3
Merge pull request #89795 from julianvmodesto/fix-diff
Ensure diff doesn't persist patches
2020-04-03 04:27:58 -07:00
Kubernetes Prow Robot
dd35908c7f
Merge pull request #89298 from gavinfish/scheuler-config-alph1
Remove kubescheduler.config.k8s.io/v1alpha1
2020-04-02 21:39:59 -07:00
Julian V. Modesto
9c0320f1bf Ensure diff doesn't persist patches 2020-04-02 19:23:32 -04:00
Kubernetes Prow Robot
691fa9f5a1
Merge pull request #89566 from yue9944882/feat/override-clientside-retry
Opt-out/Override client-side max-retry
2020-04-02 12:42:38 -07:00
Prashant Sharma
f6c7d70092
Minor, Api doc clarification for the mode value. (#88364)
* Api doc clarification for the mode value.

Apply suggestions from code review

Co-Authored-By: Robert Kielty <rob.kielty@gmail.com>

* Added a note regarding json and yaml api.

* running hack/* scripts.

Co-authored-by: Robert Kielty <rob.kielty@gmail.com>
2020-04-02 04:18:23 -07:00
yue9944882
f373697c64 make client-side max-retry override'ble 2020-04-02 15:43:10 +08:00
Kubernetes Prow Robot
c4f1b015b2
Merge pull request #89743 from wojtek-t/remove_default_conversions_apiserver_endpoints
Stop reling on default conversions in apiserver test
2020-04-02 00:38:24 -07:00
wojtekt
8c59c2133c Not rely on default conversions in apiserver test 2020-04-02 08:16:59 +02:00
SataQiu
871b90ba23 kube-proxy: add '--bind-address-hard-fail' flag to treat failure to bind to a port as fatal
Signed-off-by: SataQiu <1527062125@qq.com>
2020-04-02 13:13:10 +08:00
Kubernetes Prow Robot
96109680a4
Merge pull request #89691 from ingvagabund/quantile-inf
quantile: if the last upper bound is +Inf, return the previous upper bound
2020-04-01 20:50:37 -07:00
Kubernetes Prow Robot
f2e3981aba
Merge pull request #89706 from weinong/fix-excessive-spn-prefix
v1.18.1: fix a bug where spn: prefix is unexpectedly added to kubeconfig apiserver-id
2020-04-01 19:26:38 -07:00
Alvaro Aleman
bec6f08c58 apimachinery/pkg/labels: add SelectorFromSet
While rambling again about how unsafe labels.SelectorFromSet is as it
just returns an empty selector that matches everything when it
encounters a parsing error, I noticed that we do not even have a safe
alternate. This commit fixes that by adding a `ValidatedSelectorFromSet`
func that either returns a Selector or an error.

It also changes SelectorFromSet to use SelectorFromValidatedSet under
the hood, so invalid Sets are send to the server and rejected there,
rather than silently doing the wrong thing by using am empty Selector.
2020-04-01 19:51:10 -04:00
Jan Chaloupka
e410b837dc quantile: if the last upper bound is +Inf, return the previous upper bound
In case the last upper bound is +Inf, computed quantile is +Inf as well.
Given there's no restriction on how far individual upper bounds are from each other,
cut the last interval and consider the second last upper bound as the final one.
2020-04-01 12:44:25 +02:00
Pengfei Ni
bdce3fdeb7 Ensure Azure availability zone is always in lower cases 2020-04-01 08:19:39 +00:00
Andrew Sy Kim
e2bc3a755f
move well-known kubelet cloud provider annotations to k8s.io/cloud-provider (#88631)
* move well-known kubelet cloud provider annotations to k8s.io/cloud-provider

Signed-off-by: andrewsykim <kim.andrewsy@gmail.com>

* cloud provider: rename AnnotationProvidedIPAddr to AnnotationAlphaProvidedIPAddr to indicate alpha status

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-03-31 23:01:27 -07:00
Jordan Liggitt
ee816114b7 Adjust openapi test to avoid mutation on write 2020-03-31 23:08:08 -04:00
Jordan Liggitt
d879965808 Clean up list items listType 2020-03-31 23:08:08 -04:00
Jordan Liggitt
93c7b24562 github.com/googleapis/gnostic v0.4.1 2020-03-31 23:07:50 -04:00
Prasad Katti
b1d85a6b51
minor update (#89638)
* minor update

Added a missing period.

* add some more missing periods

- add in the missing period in 2 more places
- update generated files with `make update`
2020-03-31 16:43:28 -07:00
Weinong Wang
77bd7c8a8b fix a bug where spn: prefix is unexpectedly added to kubeconfig apiserver-id setting 2020-03-31 15:59:37 -07:00
Kubernetes Prow Robot
788a073c79
Merge pull request #89677 from zhouya0/Add_kubectl_describe_CSINode_test_coverage
Add kubectl describe CSINode test coverage
2020-03-31 14:15:51 -07:00
Kubernetes Prow Robot
48cdf5a062
Merge pull request #89394 from iobuf/cleanup
[apimachinery]: cleanup deprecated const StatusTooManyRequests
2020-03-31 14:15:42 -07:00
Julian V. Modesto
efed958779 Support kubectl scale --dry-run=server|client 2020-03-31 16:19:52 -04:00
Kubernetes Prow Robot
0804667ff1
Merge pull request #89151 from jingyih/add_metric_etcd_db_size
apiserver: add a metric exposing etcd database size
2020-03-31 12:37:00 -07:00
jingyih
e15c49f1bb Generated 2020-03-31 09:02:41 -07:00
jingyih
922ec728de Add a metric exposing etcd database size 2020-03-31 09:02:38 -07:00
Kubernetes Prow Robot
e551cf8a77
Merge pull request #89615 from tahsinrahman/fix-duplicate
Ensure NamedCertKeyArray implements flag.Value
2020-03-31 06:40:40 -07:00
zhouya0
991547edb6 Add kubectl describe CSINode test coverage 2020-03-31 12:15:20 +08:00
Kazuki Suda
fca1027dd6 Fix missing a shorthand for container flag of kubectl alpha debug 2020-03-31 12:18:28 +09:00
Jordan Liggitt
343c1e7636 Fix client watch reestablishment handling of client-side timeouts 2020-03-30 17:48:00 -04:00
Kubernetes Prow Robot
933c303592
Merge pull request #89646 from zhouya0/fix_kubectl_describe_CSINode_nil_pointer
Fix kubectl describe CSINode nil pointer error
2020-03-30 11:00:18 -07:00
Kubernetes Prow Robot
fce286e227
Merge pull request #89645 from andyzhangx/azure-kube-client
chore: expose azure.KubeClient
2020-03-30 08:22:46 -07:00
Kubernetes Prow Robot
c968317ebd
Merge pull request #89575 from tnqn/improve-tracker
Improve fake clientset performance
2020-03-30 08:22:07 -07:00
zhouya0
55c455e61f Fix kubectl describe CSINode nil pointer error 2020-03-30 17:10:40 +08:00
andyzhangx
56cb04db4c chore: expose azure.KubeClient 2020-03-30 08:12:41 +00:00
tahsinrahman
d82e9ebac0 Ensure NamedCertKeyArray implements flag.Value 2020-03-29 06:36:36 +08:00
Quan Tian
7e15e31e11 Improve fake clientset performance
The fake clientset used a slice to store each kind of objects, it's
quite slow to init the clientset with massive objects because it checked
existence of an object by traversing all objects before adding it, which
leads to O(n^2) time complexity. Also, the Create, Update, Get, Delete
methods needs to traverse all objects, which affects the time statistic
of code that calls them.

This patch changed to use a map to store each kind of objects, reduced
the time complexity of initializing clientset to O(n) and the Create,
Update, Get, Delete to O(1).

For example:
Before this patch, it took ~29s to init a clientset with 30000 Pods,
and 2~4ms to create and get an Pod.
After this patch, it took ~50ms to init a clientset with 30000 Pods,
and tens of µs to create and get an Pod.
2020-03-28 23:57:43 +08:00
Kubernetes Prow Robot
b4c82622ec
Merge pull request #89604 from aramase/fix-lb
azure: fix concurreny issue in lb creation
2020-03-28 02:44:09 -07:00
Kubernetes Prow Robot
5be91f997a
Merge pull request #89367 from nilo19/add-vmss-async-test
Add unit tests for azure VMSS client async operations.
2020-03-27 18:31:52 -07:00
Kubernetes Prow Robot
0fa225f638
Merge pull request #89562 from M00nF1sh/lb_np
fix aws loadbalancer nodePort cannot change issue
2020-03-27 17:12:07 -07:00
Kubernetes Prow Robot
2d4253077d
Merge pull request #89539 from seans3/kubectl-apply-fix
Fixes problem where kubectl apply stops after first error
2020-03-27 17:11:53 -07:00
Anish Ramasekar
43c45edf88
fix concurreny issue in lb creation 2020-03-27 16:33:58 -07:00
Kubernetes Prow Robot
3842a92f5f
Merge pull request #89413 from zhouya0/remove_prometheus_references_from_etcd_version_monitor
Remove prometheus references from etcd version monitor
2020-03-27 06:56:23 -07:00
zhouya0
a576a3c707 Fix kubectl describe job event test nil pointer 2020-03-27 19:07:18 +08:00
t-qini
a97a7c49b4 Add unit tests for azure VMSS client async operations. 2020-03-27 13:45:38 +08:00
Sean R. Sullivan
b75990cc7b Fixes problem where kubectl apply stops after first error 2020-03-26 22:09:02 -07:00