Commit Graph

2394 Commits (091a9dfc35a10637c464b7f5e1e2ec2d25d7067f)

Author SHA1 Message Date
Kubernetes Submit Queue e33dd983ed Merge pull request #52948 from smarterclayton/new_negotiate
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add a negotiate method media type for use in explicit contexts

There are more cases now where we want to negotiate from contexts where we have a media type but no request.
2017-09-27 10:51:44 -07:00
Kubernetes Submit Queue 5952e932e9 Merge pull request #53090 from shyamjvs/fix-traces
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Modify traces in deletion handler

Ref https://github.com/kubernetes/kubernetes/issues/51899#issuecomment-332356230

cc @kubernetes/sig-release-members @jdumars @dims Can we get this into 1.8?
2017-09-27 10:02:09 -07:00
Kubernetes Submit Queue 1ccdc5cdc4 Merge pull request #43346 from atlassian/fix-time-npe
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix pointer receiver handling in queryparams marshaler

**What this PR does / why we need it**:
`Time.MarshalQueryParameter()` and `Time.MarshalJSON()` try to handle nil pointer object (they call `t.IsZero()` which checks if t == nil) but fail because receiver is not a pointer so the dereference needed to pass it as receiver to these methods fails with npe.
In practice this happens with `Unstructured.SetDeletionTimestamp(Unstructured.GetDeletionTimestamp())`.

Here is the stacktrace of the failing test if receiver is not a pointer.
```go
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x1407969]

goroutine 22 [running]:
testing.tRunner.func1(0xc4204f0680)
	/usr/local/Cellar/go/1.8/libexec/src/testing/testing.go:622 +0x29d
panic(0x1485a80, 0x1782bc0)
	/usr/local/Cellar/go/1.8/libexec/src/runtime/panic.go:489 +0x2cf
k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.(*Unstructured).SetDeletionTimestamp(0xc420030790, 0x0)
	/Users/ash2k/gopath/src/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go:387 +0x29
k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.TestNilDeletionTimestamp(0xc4204f0680)
	/Users/ash2k/gopath/src/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_test.go:40 +0x4c
```
2017-09-27 08:14:05 -07:00
Kubernetes Submit Queue 95328d3098 Merge pull request #53050 from CaoShuFeng/micro_sec
Automatic merge from submit-queue (batch tested with PRs 50685, 53050, 52899, 52913, 53067). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix fuzz of micro time

**Release note**:
```
NONE
```
/assign @sttts
2017-09-27 07:33:30 -07:00
Kubernetes Submit Queue ec657e4ebd Merge pull request #52660 from kad/npapi
Automatic merge from submit-queue (batch tested with PRs 50988, 50509, 52660, 52663, 52250). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

To be consistent with http package, check also no_proxy

**What this PR does / why we need it**:
Default http.ProxyFromEnvironment uses uppper case proxy
environment variables first, and if they are not defined,
tries lower case. For NewProxierWithNoProxyCIDR we should
provide similar user experience.
Example: cluster will not be able to access service or pod CIDRs in case user uses lower case version of proxy variables.

**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
```
2017-09-27 05:32:25 -07:00
Shyam Jeedigunta c4ca2c7349 Modify traces in deletion handler 2017-09-27 00:48:06 +02:00
Kubernetes Submit Queue 30f015a6fc Merge pull request #52302 from smarterclayton/simplify_metrics_registration
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Collapse all metrics handlers into common code

Remove the MonitorRequest method and replace with a method that takes
request.RequestInfo, which is our default way to talk about API objects.
Preserves existing semantics for calls.

Not for 1.8, but fixes the ugliness and code duplication in #52237
2017-09-26 13:17:38 -07:00
Kubernetes Submit Queue c7c327752f Merge pull request #53030 from cheftako/e2e-aggr
Automatic merge from submit-queue (batch tested with PRs 51648, 53030, 53009). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Fixed intermitant e2e aggregator test on GKE.

**What this PR does / why we need it**: Issue was caused by another test cleaning up its namespace.
This caused the namespace controller to try to clean up that namespace.
This involves deleting all flunders under that namespace.
However the sample-apiserver was not honoring the namespace filter.
So the flunders for the test would randomly disappear.

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

**Special notes for your reviewer**: Requires we fix the container image to contain this fix to work.

**Release note**:
```release-note NONE
```
2017-09-26 12:32:10 -07:00
Cao Shufeng 151c8af8fd fix fuzz of micro time 2017-09-26 19:06:46 +08:00
Walter Fender a615ac65d8 Fixed intermittant e2e aggregator test on GKE.
Fixes issues/50945.
Issue was caused by another test cleaning up its namespace.
This caused the namespace controller to try to clean up that namespace.
This involves deleting all flunders under that namespace.
However the sample-apiserver was not honoring the namespace filter.
So the flunders for the test would randomly disappear.

Fixed image path to pick up newly built fixes from this PR.
2017-09-25 18:17:22 -07:00
Kubernetes Submit Queue 08a465bd7d Merge pull request #53001 from ericchiang/oidc-refresh-token-error-message
Automatic merge from submit-queue (batch tested with PRs 51759, 53001, 52806). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

oidc client auth: better error when refresh response is missing id_token

/kind cleanup
@kubernetes/sig-auth-pr-reviews 

Updates https://github.com/kubernetes/kubernetes/issues/36847

```release-notes
NONE
```
2017-09-25 15:50:52 -07:00
Kubernetes Submit Queue c3b443b41c Merge pull request #51759 from wackxu/addtestcase
Automatic merge from submit-queue (batch tested with PRs 51759, 53001, 52806). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

add verify case in index_test.go

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

There only verify the length of the result in the index_test and we should  also verify the content of the result.

**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
```
2017-09-25 15:50:50 -07:00
Kubernetes Submit Queue 50fa5637b6 Merge pull request #51972 from jim-minter/producedObject
Automatic merge from submit-queue (batch tested with PRs 51067, 52319, 52803, 52961, 51972). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

ProducesObject should only update the returned API object resource documentation

This should be a no-op for Kubernetes (the only rest.Storage that specifies ProducesObject() is pod logs, on GET), but will allow issues such as openshift/origin#8345 to be resolved (where generated API documentation is currently incorrect due to the asymmetry between the object kind sent and received by the API)

```release-note NONE```
2017-09-25 14:50:59 -07:00
Eric Chiang a8914b73a1 oidc client auth: better error when refresh response is missing id_token 2017-09-25 09:59:52 -07:00
FengyunPan f98326b7f9 Update gophercloud to Handle New Identity Endpoints
Currently openstack cloud provider just support keystone v2.0 and v3
The latest Identity Service is publishing an ID of v3.8, we should
update gophercloud to recognize v3.8 as a valid version id.
2017-09-24 19:49:14 +08:00
Kubernetes Submit Queue 7c9e614cbb Merge pull request #52873 from ixdy/bazel-cleanup
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

bazel: build/test almost everything

**What this PR does / why we need it**: Miscellaneous cleanups and bug fixes. The main motivating idea here was to make `bazel build //...` and `bazel test //...` mostly work. (There's a few reasons these still don't work, but we're a lot closer.)

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/assign @BenTheElder @mikedanese @spxtr
2017-09-24 00:04:36 -07:00
Kubernetes Submit Queue e371f8ab1d Merge pull request #52443 from spxtr/racercar
Automatic merge from submit-queue (batch tested with PRs 52485, 52443, 52597, 52450, 51971). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Enable go race detection for bazel tests.

Testing if setting `features = ["-race"]` fixes the breaks in #50792.

**Release note**:
```release-note
NONE
```
2017-09-23 18:48:52 -07:00
Kubernetes Submit Queue e0f75338b5 Merge pull request #52933 from liggitt/proxy-subpath-slash
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Preserve leading and trailing slashes on proxy subpaths

subresource parsing was not populating path parameters correctly (leading and trailing slashes were being stripped)

this caused bad locations to be sent to the proxy, causing https://github.com/kubernetes/kubernetes/issues/52022. the first attempt to fix that (#52065) unconditionally prefixed '/', which broke the redirect case (#52813 #52729)

fixes #52813, fixes #52729

needs to be picked to 1.7 and 1.8

```release-note
Restores redirect behavior for proxy subresources
```
2017-09-23 12:34:41 -07:00
Clayton Coleman 26d87e49cb
Add a negotiate method media type for use in explicit contexts 2017-09-23 15:08:20 -04:00
Kubernetes Submit Queue d2cf4d01c6 Merge pull request #52182 from cheftako/flags
Automatic merge from submit-queue (batch tested with PRs 51438, 52182, 51607, 47912, 51595). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Ensure we log the flag apiserver starts with.

Trying to make sure we always log the flags an instance of apiserver
starts with.
This can be especially valuable for emailed logs or e2e/kubemark tests.

**What this PR does / why we need it**: Ensures we log the flags an apiserver was started with.

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

**Special notes for your reviewer**:

**Release note**:```release-note NONE
```
2017-09-23 08:09:46 -07:00
Kubernetes Submit Queue 8fe960e710 Merge pull request #51526 from atlassian/optimize-unstructured-converter
Automatic merge from submit-queue (batch tested with PRs 50392, 52108, 52083, 52134, 51526). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Do deep copy instead of to and from JSON encoding

**What this PR does / why we need it**:
Unstructured converter encodes to JSON and then parses the result into a new object. For `Unstructured` this can be avoided by directly doing a deep copy. It is an optimization.

**Special notes for your reviewer**:
#47889 is somewhat related.

**Release note**:
```release-note
NONE
```
/sig api-machinery
2017-09-23 07:14:08 -07:00
Kubernetes Submit Queue a3cc5dc384 Merge pull request #51542 from sttts/sttts-deepcopy-client-go
Automatic merge from submit-queue (batch tested with PRs 51929, 52015, 51906, 52069, 51542). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

client-go: simplify deepcopy calls
2017-09-23 06:16:17 -07:00
Kubernetes Submit Queue 7240b1e2ee Merge pull request #52069 from shiywang/cleanup-api
Automatic merge from submit-queue (batch tested with PRs 51929, 52015, 51906, 52069, 51542). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

move specialDefaultResourcePrefixes out of vendor/k8s.io/apiserver

just a clean-up, fixes TODO: move out of this package, it is not generic
@sttts PTAL
/assign @sttts
2017-09-23 06:16:15 -07:00
Kubernetes Submit Queue 3484ae9e49 Merge pull request #51888 from tengqm/fix-api-server-help
Automatic merge from submit-queue (batch tested with PRs 51031, 51705, 51888, 51727, 51684). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Avoid hard-coding location for auto-generated cert files

**What this PR does / why we need it**:
This fixes the confusing/incorrect help message for "--tls-cert-file" in apiserver package.

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

**Special notes for your reviewer**:
Please advise if a release note is needed.

**Release note**:
```release-note
NONE
```
2017-09-23 01:47:04 -07:00
Kubernetes Submit Queue 1c0f22ea01 Merge pull request #43016 from liggitt/time-added-pointer
Automatic merge from submit-queue (batch tested with PRs 43016, 50503, 51281, 51518, 51582). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Omit timeAdded from taint when empty

Fixes omitempty portion of https://github.com/kubernetes/kubernetes/issues/42394
2017-09-22 23:35:52 -07:00
Jordan Liggitt 04eede9b2a
Preserve leading and trailing slashes on proxy subpaths 2017-09-22 23:05:13 -04:00
Kubernetes Submit Queue 7760d9e240 Merge pull request #51959 from cmluciano/cml/updatenpowners
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Add cmluciano to NetworkPolicy reviewers

**Release note**:
```
NONE
```
2017-09-22 18:25:28 -07:00
Kubernetes Submit Queue 798e5805d7 Merge pull request #52778 from zouyee/mis
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

update comment code mistake

**What this PR does / why we need it**:
update comment code mistake
2017-09-22 18:25:18 -07:00
Jeff Grafton 02fb4200dc Use buildozer to delete licenses() rules 2017-09-21 15:53:22 -07:00
Jeff Grafton 532bd482df Use buildozer to remove deprecated automanaged tags 2017-09-21 15:53:22 -07:00
Jeff Grafton 983ff4381f Remove orphaned rules 2017-09-21 15:53:22 -07:00
Kubernetes Submit Queue 6808e800c9 Merge pull request #51877 from kargakis/add-tnozicka
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Remove kargakis from OWNERS, add tnozicka

/assign @smarterclayton 
/cc @janetkuo @tnozicka
2017-09-21 13:03:49 -07:00
Kubernetes Submit Queue 3ba46ee9fa Merge pull request #52710 from sttts/sttts-less-aggressive-staging-godep-mangling
Automatic merge from submit-queue (batch tested with PRs 52843, 52710, 52821, 52844). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

update-staging-godeps: only mangle staging repos in staging Godeps.json

- this re-adds non-staging k8s.io/* repos to the staging Godeps.jsons
- x-outs instead of removing of staging dependencies in order to get a
  precise trigger for a complete godep restore+save run in the publisher
  bot.

The first breaks k8s.io/kube-aggregator's staging export.

The second potentially leads to inconsistent godeps in our exported staging repos.
2017-09-21 09:56:50 -07:00
Kubernetes Submit Queue 1a8bf2d854 Merge pull request #48406 from gyliu513/image-optional
Automatic merge from submit-queue (batch tested with PRs 48406, 52819). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Made image as deliberately optional in v1 Container struct.

**What this PR does / why we need it**:
Revert https://github.com/kubernetes/kubernetes/pull/47246/
**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
Mark image as deliberately optional in v1 Container struct.  Many objects in the Kubernetes API inherit the container struct and only Pods require the field to be set.
```
2017-09-20 21:30:32 -07:00
Kubernetes Submit Queue 74ff323f9e Merge pull request #52790 from sttts/sttts-conversion-gen-vendor-independent
Automatic merge from submit-queue (batch tested with PRs 52477, 52790, 52798). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

conversion-gen: make staging dirs independent of living in vendor/

The `+k8s:conversion-gen` tags included the package directory inside of kube's vendor dir. This
makes them invalid when we publish staging repos.

Without this PR our sample-apiserver example code-generation is broken once published.
2017-09-20 15:43:45 -07:00
Joe Finney d4676b6753 Enable go race detection for bazel tests.
There are a couple tests that need to run without race detection
enabled. See issue 39649 for details.
2017-09-20 10:33:34 -07:00
Dr. Stefan Schimanski 678eeb54da Update staging godeps 2017-09-20 18:07:29 +02:00
Dr. Stefan Schimanski 72d4e3f47a update-staging-godeps: only mangle staging repos in Godeps.json 2017-09-20 17:47:01 +02:00
Kubernetes Submit Queue a514443091 Merge pull request #52281 from nikhita/crd-validation-conversion-fix
Automatic merge from submit-queue (batch tested with PRs 51869, 52281). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

apiextensions: fix conversion of CRD schema

- [x] Fix conversion of CRD schema to go-openapi types.
- [x] Add roundtrip tests for this conversion: https://github.com/kubernetes/kubernetes/pull/52793. Split into another PR since it touches godeps.

**Release note**:

```release-note
NONE
```

/cc @sttts
2017-09-20 08:36:48 -07:00
Nikhita Raghunath 308576b6cf Fix conversion of CRD schema to go-openapi types 2017-09-20 18:59:44 +05:30
Kubernetes Submit Queue fe4b35a22f Merge pull request #52712 from sttts/sttts-codegen-underscore-test-dir
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

k8s.io/code-generator: hide gen test output from go tools

The underscore in front of _test makes the go tools (including godep) to
ignore those packages by default. We do not want to create dependencies
to client-go and friends through the _test output.
2017-09-20 05:59:46 -07:00
Dr. Stefan Schimanski f545112751 conversion-gen: make staging dirs independent of living in vendor/ 2017-09-20 14:55:42 +02:00
zouyee 58687b891f update comment code mistake 2017-09-20 17:50:17 +08:00
Dr. Stefan Schimanski 8454e66adf Update generated files 2017-09-20 08:36:09 +02:00
Dr. Stefan Schimanski a3f8c9b5e1 k8s.io/code-generator: hide gen test output from go tools
The underscore in front of _test makes the go tools (including godep) to
ignore those packages by default. We do not want to create dependencies
to client-go and friend through the _test output.
2017-09-20 08:36:09 +02:00
Kubernetes Submit Queue 2d7192c54a Merge pull request #52466 from charrywanganthony/audit-2
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Update the test under audit/policy

Small change to cope with [previous review](https://github.com/kubernetes/kubernetes/pull/51782#pullrequestreview-61526174)
@crassirostris
2017-09-19 22:36:11 -07:00
Guangya Liu e31bcb97c6 Generated code. 2017-09-20 00:15:24 -04:00
Guangya Liu 701c99b95c Made image as deliberately optional in v1 Container struct. 2017-09-19 23:47:34 -04:00
Kubernetes Submit Queue 9a7818a2e0 Merge pull request #52533 from soltysh/cronjob_beta_defaults
Automatic merge from submit-queue (batch tested with PRs 52500, 52533). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Cronjob beta defaults

**What this PR does / why we need it**:
I forget to set the defaults in beta for (successful|failed)JobsHistoryLimit so doing this now. It's already too late for 1.8 so this goes into 1.9.

**Release note**:
```release-note
Set defaults for successfulJobsHistoryLimit (3) and failedJobsHistoryLimit (1) in batch/v1beta1.CronJobs
```
2017-09-19 20:38:37 -07:00
Clayton Coleman fabce1b893
Track gauge of all long running API requests
Allows a caller to know how many exec, log, proxy, and watch calls are
running at the current moment.
2017-09-19 20:58:28 -04:00