Commit Graph

10808 Commits

Author SHA1 Message Date
tiffany jernigan
bc226a2a89 Updated client-go expiration cache to take in expiration policies 2019-03-22 07:38:35 +00:00
Kubernetes Prow Robot
ab35bd0668 Merge pull request #75577 from mars1024/bugfix/use_add_in_enqueue
replace AddRateLimited with Add in enqueue func
2019-03-22 00:04:57 -07:00
Kubernetes Prow Robot
83d467c22e Merge pull request #75270 from justincormack/uuid4
Use UUIDv4 not UUIDv1
2019-03-22 00:04:17 -07:00
Bruce Ma
0335867b56 replace AddRateLimited with Add in enqueue func 2019-03-22 11:40:23 +08:00
Clayton Coleman
435db312e1 Avoid using %#v for errors when %T is more informative
`%#v` may have significant performance costs in frequently invoked code.
2019-03-21 22:54:06 -04:00
Clayton Coleman
ecd43f13cf Avoid using %#v for errors when %T or %s would be more accurate
`%#v` may have significant performance costs in frequently invoked code.
2019-03-21 22:53:43 -04:00
Clayton Coleman
082aee343e Avoid using %#v for errors when %T is clearer
`%#v` may have significant performance costs in frequently invoked code.
2019-03-21 22:53:07 -04:00
Jonathan Basseri
ab7e2ff136 Fix fake clientsets in metrics.k8s.io.
The generated fake clientsets were using the API group "metrics" instead
of "metrics.k8s.io". This patch includes a test that fails without the
fix.

The `+groupName` annotation needed to be copied to the v1alpha1 and
v1beta1 packages to fix it.

As a result, tests using this fake clientset work as expected.
2019-03-21 10:41:57 -07:00
Levi Blackstone
a9cba032de Check for required name parameter in dynamic client
The Create, Delete, Get, Patch, Update and UpdateStatus
methods in the dynamic client all expect the name
parameter to be non-empty, but did not validate this
requirement, which could lead to a panic. Add explicit
checks to these methods.
2019-03-21 09:28:36 -06:00
shinytang6
5c9f4d9dc6 replace time.Now().Sub with time.Since 2019-03-21 18:02:55 +08:00
Kubernetes Prow Robot
ed4258e5c0 Merge pull request #75264 from smarterclayton/optimize_rbac_visit
Avoid allocating when performing VisitRulesFor on service accounts
2019-03-20 19:19:35 -07:00
Kubernetes Prow Robot
59140d6474 Merge pull request #75295 from DataDog/lbernail/strict-arp-flag
[kube-proxy/ipvs] Add flag to enable strict ARP
2019-03-20 07:41:51 -07:00
Kubernetes Prow Robot
5229bce04f Merge pull request #75279 from danielqsj/admission-metrics
remove the deprecated admission metrics
2019-03-20 07:41:22 -07:00
Kubernetes Prow Robot
b3be84dcc5 Merge pull request #75240 from kairen/update-client-go-example
client-go: update leader election example
2019-03-20 05:24:23 -07:00
Kubernetes Prow Robot
481de197c0 Merge pull request #75156 from smarterclayton/diff_invalid
Handle nil interface inputs to diff.ObjectReflectDiff
2019-03-20 00:55:01 -07:00
Kubernetes Prow Robot
6f9bf5fe98 Merge pull request #71548 from smarterclayton/watch_converted
Support Table and PartialObjectMetadata on watch
2019-03-19 22:42:22 -07:00
Andrew Sy Kim
e2ad79a302 add area/cloudprovider label for changes in pkg/cloudprovider & k8s.io/cloud-provider
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-03-19 21:16:20 -07:00
Kubernetes Prow Robot
6a2936dcbf Merge pull request #74642 from SataQiu/fix-golint-20190227
Fix golint failures in client-go/scale/scheme/appsint, client-go/scale/scheme/extensionsint, client-go/scale/scheme
2019-03-19 20:14:54 -07:00
Kubernetes Prow Robot
0685b04b2a Merge pull request #74592 from lou-lan/delete-blank
delete duplicate empty blanks
2019-03-19 20:14:41 -07:00
Kubernetes Prow Robot
a6677d6f3e Merge pull request #73409 from yue9944882/bugfix/compatible-with-nil-authorizer
Fixes authz compatibility w/ nil authorizer in apiserver
2019-03-19 19:00:52 -07:00
Kubernetes Prow Robot
86f6279bb9 Merge pull request #72919 from liggitt/crd-quiet-conflict
Avoid logging normal conflict/notfound error responses in CRD controllers
2019-03-19 19:00:38 -07:00
Yassine TIJANI
8261d3d9a6 use cache size to signal undecorated storage 2019-03-19 23:48:07 +01:00
Kyle Bai
8a82b21f46 client-go: update leader election example 2019-03-19 15:48:02 +08:00
WanLinghao
f510f49955 Remove dead code about failure-domains option in kube-scheduler 2019-03-18 14:25:04 +08:00
Haowei Cai
df1ee5e778 generated 2019-03-13 15:16:50 -07:00
Clayton Coleman
4c87a14e6b Avoid allocating when performing VisitRulesFor on service accounts
Service account authorization checks are done frequently and were
observed to perform 7% of allocations on a system running e2e tests.
The allocation comes from when we walk the authorization rules to
find matching service accounts.

Optimize the check for service account names to avoid allocating.
2019-03-13 17:40:21 -04:00
Kubernetes Prow Robot
e7d09ceb50 Merge pull request #75289 from dims/update-http2-dep-go-1.12
Update golang.org/x/net/... dependencies to release-branch.go1.12
2019-03-13 04:33:46 -07:00
Kubernetes Prow Robot
93402fc8e8 Merge pull request #75277 from jennybuckley/fix-ints
Fix server side apply int/float bug
2019-03-12 17:36:40 -07:00
Kubernetes Prow Robot
cc8afb25fc Merge pull request #74040 from ajatprabha/issue_73648
add ResourceVersion to DeleteOptions.Preconditions
2019-03-12 15:44:38 -07:00
Kubernetes Prow Robot
0977ab69ad Merge pull request #75157 from aaron-prindle/version-check-apply
Added version check between patch and live object in server side apply
2019-03-12 13:19:06 -07:00
Justin Cormack
0fb4b81c3f Use UUIDv4 not UUIDv1
UUIDv1 has several disadvantages:
 - it encodes the MAC address of the host, which is a potential privacy issue
 - it uses the clock of the host, which reveals time information
 - the clock is very coarse, hence the complex code handling duplicates

UUIDv4 is simply a 122 bit random number encoded into the UUID format, which
has no problems with duplicates or locking.

Use the google/uuid library, as newer versions of pborman/uuid just wrap the
Google upstream.

Note that technically a random UUID might fail, but Go ensures that this
should not take place, as it will block if entropy is not available.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2019-03-12 16:03:21 +00:00
Davanum Srinivas
2aa1348e6c Update to go 1.12 version of golang.org/x/net
Change-Id: I3f2fa5d7b6811c9eca58992318d19e44ec9131fd
2019-03-12 11:30:24 -04:00
Laurent Bernaille
09f821ddb5 [kube-proxy/ipvs] Add flag to enable strict ARP 2019-03-12 15:56:22 +01:00
Prasad Ghangal
317ecf58cc Update golang.org/x/net/... dependencies to release-branch.go1.11
- latest grpc-ecosystem/go-grpc-middleware

Change-Id: Ida7d01e4606f6e0313e1355db6e85be0c0ef1dd1
2019-03-12 09:48:52 -04:00
ajatprabha
4bd0c4ad56 update generated-protobuf 2019-03-12 17:00:42 +05:30
ajatprabha
c2755f6685 update generated-swagger-docs 2019-03-12 17:00:42 +05:30
ajatprabha
fe3b9f486f update testDeleteWithResourceVersion 2019-03-12 17:00:41 +05:30
ajatprabha
4ddc198c39 pin ResourceVersion precondition only when specified 2019-03-12 17:00:41 +05:30
ajatprabha
3135cea2cc add ResourceVersion check to Preconditions#Check 2019-03-12 17:00:40 +05:30
ajatprabha
64ecf9de7f update deepcopy function 2019-03-12 17:00:40 +05:30
ajatprabha
42f0a36f44 check for ResourceVersion conflict in separate if block 2019-03-12 17:00:39 +05:30
ajatprabha
8f48d76271 add ResourceVersion to DeleteOptions.Preconditions 2019-03-12 17:00:39 +05:30
jennybuckley
10259c959e Fix int/float apply bug 2019-03-11 23:07:21 -07:00
danielqsj
b31a3403c4 remove the deprecated admission metrics 2019-03-12 14:06:38 +08:00
Aaron Prindle
d5bd17cda0 Added version check between patch and live object in server side apply
What is the problem being solved?
https://github.com/kubernetes/kubernetes/pull/75135
Currently version compatibility is not being checked in server side apply between the patch object and the live object.  This is causing a merge that will error to be run and the apiserver returns a 500 error.  The request should fail if the apiVersion provided in the object is different from the apiVersion in the url, but it should fail before trying to merge, and be a 4xx error. Probably a bad request error.

Why is this the best approach?
The approach of serializing the patch byte array and then checking for version equality with the already serialized live object is the simplest and most straightforward solution.
2019-03-11 22:08:30 -07:00
Chao Xu
887cb93d8d generated BUILD
generated proto
2019-03-11 10:26:56 -07:00
Chao Xu
0ace8b3da4 Let the sample apiserver show feature gates flag 2019-03-11 10:26:56 -07:00
Chao Xu
3b618af0d4 Expose storage version hash 2019-03-11 10:26:56 -07:00
Kubernetes Prow Robot
44e369b000 Merge pull request #75167 from tnozicka/fix-retry-watcher-error
Handle unstructured status in RetryWatcher
2019-03-11 05:17:27 -07:00
YAMAMOTO Takashi
6066246656 apiserver: Update a comment 2019-03-11 15:23:26 +09:00