Commit Graph

580 Commits

Author SHA1 Message Date
Kubernetes Publisher
ae992f7e2c Merge pull request #50204 from smarterclayton/move_list_to_metav1
Automatic merge from submit-queue (batch tested with PRs 50711, 50742, 50204)

Move List (the type) into metav1 but preserve the exposed type

Make a list something that other components can use without depending on the core API. This does not change the public API exposure of `List` (it is still in `v1`) but makes the interface common across both.

Kubernetes-commit: 49ed2a3115d33a78291c92b3ffda5acbe59e6d4a
2017-08-29 12:52:27 +00:00
Kubernetes Publisher
b1046943dc Merge pull request #50639 from simo5/setheader
Automatic merge from submit-queue (batch tested with PRs 50023, 50639)

Extend SetHeader Requests method ito accept multiple values

This allows to set headers that are multivalued directly.
The headers variable is not directly accessible and currently
SetHeaders allows to set only one value.

```release-note
NONE
```

Kubernetes-commit: 039f898c07a643d6ef244fcb65daff5a53de41c8
2017-08-29 12:52:26 +00:00
Clayton Coleman
32ad290dcb Move List (the type) into metav1 but preserve the exposed type
Kubernetes-commit: 1b3836d5df302281a9db4b03bdc8fd5079142431
2017-08-29 12:52:26 +00:00
Kubernetes Publisher
4de1c5fff8 Merge pull request #47011 from mengqiy/kubectl_extraction
Automatic merge from submit-queue

move retry to client-go

Move `k8s.io/kubernetes/pkg/client/retry` to `k8s.io/client-go/util/retry`.

Part of a series of PRs to address kubernetes/community#598

```release-note
NONE
```

Kubernetes-commit: 37ab30f24ccac3105c4570e865e11ddc3ddcb1c9
2017-08-29 12:52:26 +00:00
Simo Sorce
ada55fe32f Extend SetHeader Requests method ito accept multiple values
This allows to set headers that are multivalued directly.
The headers variable is not directly accessible and currently
SetHeaders allows to set only one value.

Signed-off-by: Simo Sorce <simo@redhat.com>

Kubernetes-commit: 1f44ccd01c9cea7870a4018b29fa8eabe58a90f6
2017-08-29 12:52:26 +00:00
Kubernetes Publisher
9f92bb772b Merge pull request #49785 from FengyunPan/fix-getPortByIP
Automatic merge from submit-queue (batch tested with PRs 47724, 49984, 49785, 49803, 49618)

Fix conflict about getPortByIp

**What this PR does / why we need it**:
Currently getPortByIp() get port of instance only based on IP.
If there are two instances in diffent network and the CIDR of
their subnet are same, getPortByIp() will be conflict.
My PR gets port based on IP and Name of instance.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
Fix #43909

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```

Kubernetes-commit: a7ce691311f5462cf71d79a1f9431605198803af
2017-08-29 12:52:26 +00:00
ymqytw
6a94c085e7 move retry to client-go
Kubernetes-commit: 7500b55ce42f82a405def05386e642ba661b2460
2017-08-29 12:52:26 +00:00
Kubernetes Publisher
6c07108d9f Merge pull request #50407 from ixdy/gazelle-and-kazel
Automatic merge from submit-queue (batch tested with PRs 49488, 50407, 46105, 50456, 50258)

Manage BUILD files using gazelle + kazel

**What this PR does / why we need it**: uses the upstream `gazelle` tool to manage go rules in BUILD files.
This is needed to support Bazel builds on Mac OS and Bazel cross compilation in general.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #47558

**Special notes for your reviewer**:
It's probably easiest to review this commit-by-commit:
* bump to latest `rules_go` (for recent `cgo_library` and `gazelle` improvements)
* update `kazel` with recent compatibility fixes (https://github.com/kubernetes/repo-infra/pull/28, https://github.com/kubernetes/repo-infra/pull/27), update `hack` scripts to download/build `gazelle`, and then run both `gazelle` and `kazel`. (Additionally make `gazelle` skip things it shouldn't touch.)
* run `hack/update-bazel.sh` to autogenerate everything
* remove the old `cgo_genrule` rules - these are now part of `go_library`
* remove the `automanaged` tags from all go rules - `gazelle` doesn't use them, and it prevents an old version of `kazel/gazel` from messing with the rules
* remove the `licenses()` rules from everywhere but `third_party/` - we don't need them, and `gazelle` won't add them on new `BUILD` files it generates.

**Release note**:

```release-note
NONE
```
for review:
/assign @mikedanese @spxtr
for approval:
/assign @thockin

Kubernetes-commit: 941ad0164d44cfcf96dd6efbb491e2222a3a23d3
2017-08-29 12:51:55 +00:00
FengyunPan
f7e05a1f9c Update gophercloud to support list interfaces of OpenStack instance
Kubernetes-commit: ba463062ca363bc6626dff80172782a43abe033f
2017-08-29 12:51:55 +00:00
Jeff Grafton
5da217e5c4 Use buildozer to delete licenses() rules except under third_party/
Kubernetes-commit: a7f49c906df816123e7d4ccbd4cebab411519465
2017-08-29 12:51:55 +00:00
Kubernetes Publisher
99c44987e0 sync: reset Godeps/Godeps.json 2017-08-29 12:51:55 +00:00
Jeff Grafton
fa2ceb7462 Use buildozer to remove deprecated automanaged tags
Kubernetes-commit: 33276f06be5e872bf53ca62a095fcf0a6b6c11a8
2017-08-29 12:51:55 +00:00
Jeff Grafton
573b6e6289 Autogenerate BUILD files
Kubernetes-commit: cf55f9ed45e6df2431d47cfc5b9c9b30758527f1
2017-08-29 12:51:54 +00:00
Kubernetes Publisher
b0aa1a022d Merge pull request #49752 from bsalamat/priority_scheduler
Automatic merge from submit-queue

Add a heap to client-go. Heap orders items with heap invariant ordering.

**What this PR does / why we need it**:
Heap is useful in implementing priority queues. Some components may need such ordering to process their highest priority objects first. Scheduler is going to be the first user of the heap. It will store pending pods ordered by their priority, so that the highest priority pods are popped first to be scheduled.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

ref/ #47604
ref/ #48646

@kubernetes/api-reviewers @kubernetes/sig-scheduling-pr-reviews @davidopp 
/assign @caesarxuchao

Kubernetes-commit: 868fef189c8de9fcb61039f064fe0a02a3b06198
2017-08-11 08:27:22 -07:00
Bobby (Babak) Salamat
3c733696a3 autogenerated files
Kubernetes-commit: 68926a22ac1365a47caba55b0f9fcbebfdf0de76
2017-08-29 12:51:54 +00:00
Bobby (Babak) Salamat
5d104a8df6 Add a heap data store to client-go
Kubernetes-commit: 6cad5bbff918726becddf4a64ef9b130bbcf13e7
2017-08-29 12:51:54 +00:00
Kubernetes Publisher
677d75feac Merge pull request #50444 from nikhita/fix-jsonpath-comment-typos
Automatic merge from submit-queue (batch tested with PRs 50386, 50374, 50444, 50382)

jsonpath: fix comments

Minor fix to the comments. And avoid a named return value.

**Release note**:

```release-note
NONE
```

/cc @sttts

Kubernetes-commit: 52b82eda20eef088dcdc9a5069d17d21e59e48ce
2017-08-10 05:33:58 -07:00
Kubernetes Publisher
f977147926 Merge pull request #49642 from liggitt/rbac-v1
Automatic merge from submit-queue (batch tested with PRs 49642, 50335, 50390, 49283, 46582)

Add rbac.authorization.k8s.io/v1

xref https://github.com/kubernetes/features/issues/2

Promotes the rbac.authorization.k8s.io/v1beta1 API to v1 with no changes

```release-note
The `rbac.authorization.k8s.io/v1beta1` API has been promoted to `rbac.authorization.k8s.io/v1` with no changes.
The `rbac.authorization.k8s.io/v1alpha1` version is deprecated and will be removed in a future release.
```

Kubernetes-commit: 85e2e5dd9a21688af0196e715e7494f18cf71b21
2017-08-29 12:51:54 +00:00
Nikhita Raghunath
e447af6403 jsonpath: fix comments
avoid named return errors

fix compile error

Kubernetes-commit: 77e347b8d086c51c02ffdf50c00452864a6ec747
2017-08-29 12:51:54 +00:00
Jordan Liggitt
1820c423c9 Generated files
Kubernetes-commit: 06c49423edf0cae626e5e8d9cd7c3f8cce07ae03
2017-08-29 12:51:53 +00:00
Kubernetes Publisher
823af6a262 Merge pull request #48063 from zouyee/obc
Automatic merge from submit-queue

complete and correct code comment

**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
```

Kubernetes-commit: b80ce17b402db2a413e1d8eac9f6e652b394bec5
2017-08-08 04:03:19 -07:00
zouyee
a966f481aa modify some mistake
Kubernetes-commit: 3e78e53c3dcf958631b6825c41b279288914ab4f
2017-08-29 12:51:53 +00:00
Kubernetes Publisher
e549550bb5 Merge pull request #50254 from liggitt/revert-disk-cache
Automatic merge from submit-queue (batch tested with PRs 50254, 50174, 50179)

Revert "Merge pull request #47353 from apelisse/http-cache"

Some issues were discovered with the caching merged in #47353:
* uses a disk-based cache that is not safe between processes (does not use atomic fs operations)
* writes get/list responses to disk that should not be cached (like `kubectl get secrets`)
* is vulnerable to partially written cache responses being used as responses to future requests
* breaks uses of the client transport that make use of websockets
* defaults to enabling the cache for any client builder using RecommendedConfigOverrideFlags or DefaultClientConfig which affects more components than just kubectl

This reverts commit fc89743dca6b563063b74728c3b28100cf674d9d, reversing changes made to 29ab38e898988c36e2de34f77fa33be556eb21bd.

Kubernetes-commit: 187e6ab0bc35f696d8f5f574fab9aa457f253d34
2017-08-29 12:51:52 +00:00
Jordan Liggitt
53ab900949 Revert "Merge pull request #47353 from apelisse/http-cache"
This reverts commit fc89743dca6b563063b74728c3b28100cf674d9d, reversing
changes made to 29ab38e898988c36e2de34f77fa33be556eb21bd.

Kubernetes-commit: 4ee72eb300423772020dd1cf208159058ba7dab5
2017-08-29 12:51:24 +00:00
Kubernetes Publisher
1f91834be7 Merge pull request #39587 from zhouhaibing089/openstack-auth-provider
Automatic merge from submit-queue (batch tested with PRs 50087, 39587, 50042, 50241, 49914)

plugin/pkg/client/auth: add openstack auth provider

This is an implementation of auth provider for OpenStack world, just like python-openstackclient, we read the environment variables of a list `OS_*`, and client will cache a token to interact with each components, we can do the same here, the client side can cache a token locally at the first time, and rotate automatically when it expires.

This requires an implementation of token authenticator at server side, refer:

1.  [made by me] https://github.com/kubernetes/kubernetes/pull/25536, I can carry this on when it is fine to go.
2.  [made by @kfox1111] https://github.com/kubernetes/kubernetes/pull/25391

The reason why I want to add this is due to the `client-side` nature, it will be confusing to implement it downstream, we would like to add this support here, and customers can get `kubectl` like they usually do(`brew install kubernetes-cli`), and it will just work.

When this is done, we can deprecate the password keystone authenticator as the following reasons:

1.  as mentioned at some other places, the `domain` is another parameters which should be provided.
2.  in case the user supplies `apikey` and `secrets`, we might want to fill the `UserInfo` with the real name which is not implemented for now.

cc @erictune @liggitt

```
add openstack auth provider
```

Kubernetes-commit: 59b8fa32f129be29f146bfd4888a5d1ab7e71ca5
2017-08-29 12:51:23 +00:00
Kubernetes Publisher
14f0c0a211 sync: reset Godeps/Godeps.json 2017-08-29 12:51:23 +00:00
zhouhaibing089
eb8ca254db plugin/pkg/client/auth: add openstack auth provider
Kubernetes-commit: a0cebcb559c5c0ab8a2e50b1ee11cc62f9ebb3a8
2017-08-29 12:50:53 +00:00
Kubernetes Publisher
d37a8e495c sync: reset Godeps/Godeps.json 2017-08-29 12:50:53 +00:00
Kubernetes Publisher
d635032284 Merge pull request #49370 from sttts/sttts-no-clientset-embedding
Automatic merge from submit-queue (batch tested with PRs 49370, 49481)

client-gen: stop embedding of GroupVersion client intfs

It is undefined (or at least uncontrollable) which methods of the clientset apigroup
interfaces are actually inherited. Moreover, there might be nameconflicts between the
accessors and inherited methods. This PR removes the embedding to make it unambiguous.

```release-note
Enforce explicit references to API group client interfaces in clientsets to avoid ambiguity.
```

Kubernetes-commit: 979c86f3ddff4402937eef595b8bb02672e67687
2017-08-06 08:52:54 -07:00
Dr. Stefan Schimanski
3954143278 Update generated code
Kubernetes-commit: 3b310d8989e2b20b91898b9304f42f94175b877d
2017-08-29 12:50:53 +00:00
Kubernetes Publisher
1091ffb59e Merge pull request #49678 from smarterclayton/429_metric
Automatic merge from submit-queue

Timeout and Max-in-flight don't report non-resource URLs correctly.

Unify error reporting for 429 and 504 to be correct for timeout and max in flight and eviction. Add better messages to eviction (removing a todo). Return the correct body content for timeouts (reason and code should be correct).

This potentially increases cardinality of 429, but because non-api urls may be under the max-inflight budget we need to report them somewhere (if something breaks and starts fetching API versions endlessly).

```release-note
The 504 timeout error was returning a JSON error body that indicated it was a 500.  The body contents now correctly report a 500 error.
```

Kubernetes-commit: 8d6bbaa85f96f14ac9c9722ed1677e1052c974ba
2017-08-29 12:50:52 +00:00
Kubernetes Publisher
55f5a3317c Merge pull request #47353 from apelisse/http-cache
Automatic merge from submit-queue

go-client: Use httpcache client for all requests, even though only openapi returns ETags for caching

**What this PR does / why we need it**: Use HTTP ETag for caching Swagger spec download

This also adds a new command-line flag "cachedir" to specify where the cache should keep its file. It defaults to `$HOME/.kube/http-cache`.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: partly #38637

**Special notes for your reviewer**:
Because this adds a bunch of dependencies, and removes a couple of files, I do recommend reading each commit individually.

**Release note**:
```release-note
```

Kubernetes-commit: fc89743dca6b563063b74728c3b28100cf674d9d
2017-08-29 12:50:52 +00:00
Clayton Coleman
0103f0d62a Update generic errors with the new http package codes
All of these errors are now part of the standard HTTP method. Formalize
those into our error types and remove duplication and unclear
separation.

Kubernetes-commit: d3be1ac92eb644e284915a55fe67942c33f88d4c
2017-08-29 12:50:52 +00:00
Antoine Pelisse
9f99bf70e2 c-go/transport: Add test for CacheRoundTripper
Kubernetes-commit: d6348cc1ff72be719e0830da2c64ef1689499956
2017-08-29 12:50:18 +00:00
Antoine Pelisse
10908324c6 c-go: Add dependencies for http-cache
Kubernetes-commit: e77d298f83114318fabce9f36546c9f6a7c24938
2017-08-29 12:50:18 +00:00
Kubernetes Publisher
5e0e877ac2 sync: reset Godeps/Godeps.json 2017-08-29 12:50:18 +00:00
Antoine Pelisse
d7f469601f c-go: Use http Etag cache
Add a new command-line cachedir flag to specify where to store the http
cache responses. This cache will only be used for OpenAPI Swagger spec
for now (as this is the only end-point that returns an ETag).

Kubernetes-commit: d7bba25d4a42f346f1963c86fc0dab43aa4f242e
2017-08-29 12:50:18 +00:00
Kubernetes Publisher
9d2814a37f Merge pull request #41611 from cblecker/clientgo-public-pem-functions
Automatic merge from submit-queue (batch tested with PRs 50119, 48366, 47181, 41611, 49547)

Move remaining cert helper functions from pkg/serviceaccount to client-go/util/cert

**What this PR does / why we need it**:
Unifies all remaining certificate helper functions from pkh/serviceaccount to client-go/util/cert. Private key functions were moved in #40907

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #40807

**Special notes for your reviewer**:

**Release note**:

Kubernetes-commit: 34e9c6fa5d8e9145c2201dc87f98e89dcbb4cf93
2017-08-29 12:50:17 +00:00
Kubernetes Publisher
c1d19009a7 Merge pull request #48969 from ixdy/update-kazel
Automatic merge from submit-queue (batch tested with PRs 50103, 49677, 49449, 43586, 48969)

Run kazel on the entire tree

**What this PR does / why we need it**: part of #47558: auto-generate `BUILD` files on the entire tree, since this is what `gazelle` does, and it'll make subsequent reviews easier if less is changing.

**Release note**:

```release-note
NONE
```
/assign
/release-note-none

Kubernetes-commit: d15baf69e10f3eddd59da2f6972a723a08e7dac7
2017-08-29 12:50:17 +00:00
Christoph Blecker
2ae2a25386 Move remaining cert helper functions to client-go/util/cert
- Move public key functions to client-go/util/cert
- Move pki file helper functions to client-go/util/cert
- Standardize on certutil package alias
- Update dependencies to client-go/util/cert

Kubernetes-commit: aac4d5382d8ea632360a08369f5adfdebce7c2c3
2017-08-29 12:50:17 +00:00
Kubernetes Publisher
fd5a0ee04d Merge pull request #49300 from tklauser/syscall-to-x-sys-unix
Automatic merge from submit-queue

Switch from package syscall to golang.org/x/sys/unix

**What this PR does / why we need it**:

The syscall package is locked down and the comment in https://github.com/golang/go/blob/master/src/syscall/syscall.go#L21-L24 advises to switch code to use the corresponding package from golang.org/x/sys. This PR does so and replaces usage of package syscall with package golang.org/x/sys/unix where applicable. This will also allow to get updates and fixes
without having to use a new go version.

In order to get the latest functionality, golang.org/x/sys/ is re-vendored. This also allows to use Eventfd() from this package instead of calling the eventfd() C function.

**Special notes for your reviewer**:

This follows previous works in other Go projects, see e.g. moby/moby#33399, cilium/cilium#588

**Release note**:

```release-note
NONE
```

Kubernetes-commit: 5d24a2c19923d6da46110b827619f4b21cf689ac
2017-08-29 12:50:17 +00:00
Jeff Grafton
f921a73942 Run hack/update-bazel.sh to generate BUILD files
Kubernetes-commit: 3579017b865ddbc5449d6bba87346f086e4b93ff
2017-08-29 12:50:17 +00:00
Tobias Klauser
226ece9c5b bump(golang.org/x/sys): 7a4fde3fda8ef580a89dbae8138c26041be14299
Kubernetes-commit: 1fd18181ab38a6d65cda26f53b7e4d95f6009878
2017-08-29 12:49:49 +00:00
Kubernetes Publisher
8d33656dea sync: reset Godeps/Godeps.json 2017-08-29 12:49:48 +00:00
Kubernetes Publisher
f37156e330 Merge pull request #50066 from zhangxiaoyu-zidif/fix-fypo-staging-request
Automatic merge from submit-queue

Fix comment of request.go

**What this PR does / why we need it**:
Fix comment of request.go

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

Kubernetes-commit: bfdccbae83e89b7efcace8e8987143668a953bba
2017-08-03 02:12:19 -07:00
zhangxiaoyu-zidif
fe0b3c2590 Fix comment of request.go
Kubernetes-commit: c302a72eb943debb5a24e77c709cac56bac78fb7
2017-08-29 12:49:48 +00:00
Kubernetes Publisher
c50d510609 Merge pull request #48837 from ericchiang/clientset-dont-return-nil
Automatic merge from submit-queue

client-gen: don't ignore nil clientsets

Closes https://github.com/kubernetes/client-go/issues/240

When a clientset is nil, fail fast instead of returning a nil value as an interface.

/cc @kubernetes/sig-api-machinery-pr-reviews

Kubernetes-commit: 98ba03f544a271cbd5d2f567c5c90b93098be719
2017-08-03 02:12:14 -07:00
Eric Chiang
b303648bf6 generated
Commands run:

	./hack/update-codegen.sh

Kubernetes-commit: baa536fbca32ebcd3dcd4c5a0b5169d07d941db9
2017-08-29 12:49:48 +00:00
Kubernetes Publisher
1ab41bb21e Merge pull request #47045 from atlassian/shared-informer-improvement
Automatic merge from submit-queue (batch tested with PRs 48365, 49902, 49808, 48722, 47045)

Improve shared informer notification dispatching

**What this PR does / why we need it**:
Locks and channels don't play well together. This is an attempt to remove locks and only use channels in shared informer. It looks much cleaner to me.

**Release note**:
```release-note
NONE
```

@deads2k @ncdc

Kubernetes-commit: 9e85c3cc74d6159b9d0a5a847742447478db83a9
2017-08-02 22:33:01 -07:00
Kubernetes Publisher
b4b413abb1 Merge pull request #49782 from supereagle/update-generated-deepcopy
Automatic merge from submit-queue (batch tested with PRs 50029, 48517, 49739, 49866, 49782)

Update generated deepcopy code

**What this PR does / why we need it**:
In generated deepcopy code, the method names in comments do not match the real method names.

**Which issue this PR fixes**: fixes #49755

**Special notes for your reviewer**:
/assign @sttts @caesarxuchao

**Release note**:
```release-note
NONE
```

Kubernetes-commit: 84e0326eb1f108f0d7aa2e9e48fb0c4a8edb4bd5
2017-08-29 12:49:48 +00:00