Commit Graph

860 Commits (bafabcbb44365e672b004e1a01e5be767c274cb0)

Author SHA1 Message Date
Kubernetes Submit Queue c3ec845ab6 Merge pull request #44862 from liggitt/icc-namespace-override
Automatic merge from submit-queue

Stop treating in-cluster-config namespace as an override

Fixes #44835

The namespace of an in-cluster config should behave like the namespace specified in a kubeconfig file... it should be used as the default namespace, but be able to be overridden by namespaces specified in yaml files passed to `kubectl create -f`.

```release-note
Restored the ability of kubectl running inside a pod to consume resource files specifying a different namespace than the one the pod is running in.
```
2017-04-24 19:22:42 -07:00
Jeremy Whitlock d15dba7e8b apiserver: add pkg/util/webhook tests
This commit adds tests for pkg/util/webhooks.  The purpose of this was
not only for better code coverage but also to alleviate the need for
consumers to write their own tests for core functionality.
2017-04-24 16:13:17 -06:00
Kubernetes Submit Queue a9454baba4 Merge pull request #44788 from enisoc/patch-numeric
Automatic merge from submit-queue

PATCH: Fix erroneous meaningful conflict for numeric values.

The wrong json package was used, resulting in patches being unmarshaled with numbers as float64 rather than int64. This in turn confused `HasConflicts()` which expects numeric types to match.

The end result was false positives of meaningful conflicts, such as:

```
there is a meaningful conflict (firstResourceVersion: "8517", currentResourceVersion: "8519"):
 diff1={"metadata":{"resourceVersion":"8519"},"spec":{"replicas":0},"status":"conditions":null,"fullyLabeledReplicas":null,"replicas":0}}
, diff2={"spec":{"replicas":0}}
```

This is branched from a discussion on https://github.com/kubernetes/kubernetes/pull/43469.

```release-note
Fix false positive "meaningful conflict" detection for strategic merge patch with integer values.
```
2017-04-24 12:11:29 -07:00
Jordan Liggitt 1305559abb
Stop treating in-cluster-config namespace as an override 2017-04-24 14:33:02 -04:00
Kubernetes Submit Queue 7e42d3848e Merge pull request #44492 from CaoShuFeng/namer
Automatic merge from submit-queue (batch tested with PRs 44837, 44779, 44492)

remove duplicate code from restful namer

The deleted codes have the same logic with function ObjectName.

**Release note**:

```release-note
```
2017-04-24 07:56:02 -07:00
Kubernetes Submit Queue c90faa8071 Merge pull request #44779 from enj/enj/r/etcd_default_name_copy
Automatic merge from submit-queue (batch tested with PRs 44837, 44779, 44492)

Default ObjectNameFunc for all REST Stores

All `Store`s in Kubernetes follow the same logic for determining the name of an object.  This change makes it so that `CompleteWithOptions` defaults the `ObjectNameFunc` if it is not specified.  Thus a user does not need to remember to use `ObjectMeta.Name`.  Using the wrong field as the name can lead to an object which has a name that bypasses normal object name validation.

Signed-off-by: Monis Khan <mkhan@redhat.com>

cc @liggitt @soltysh for review

**Release note**:

```
NONE
```
2017-04-24 07:55:59 -07:00
Kubernetes Submit Queue 08c5e28904 Merge pull request #44837 from danielqsj/apiissue
Automatic merge from submit-queue

Fix Content-Type error of apis

**What this PR does / why we need it**:
Response's Content-type of `/apis` is `text/plain`, not `application/json`.

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

**Special notes for your reviewer**:
We could use `responsewriters.WriteObjectNegotiated()` to write Content-type correctly.

**Release note**:

```release-note
```
2017-04-24 07:14:33 -07:00
Kubernetes Submit Queue 57fdd75cb8 Merge pull request #43440 from CaoShuFeng/audit_port
Automatic merge from submit-queue

Update basic audit filter's comment message

**Release note**:

```NONE
```
2017-04-24 06:27:59 -07:00
shijunqian 90802b2e3d Fix Content-Type error of apis 2017-04-24 16:12:00 +08:00
Kubernetes Submit Queue ac90c0e45c Merge pull request #44579 from mikedanese/cert-fix
Automatic merge from submit-queue

make certs used in roundtripper_test same as those used in proxy_test

This fixes an invalid cert error in 1.8. Gross copy paste but we will likely never have to do this again.

Part of https://github.com/kubernetes/kubernetes/issues/38228

https://github.com/kubernetes/kubernetes/blame/master/staging/src/k8s.io/apiserver/pkg/endpoints/proxy_test.go#L524-L570
2017-04-23 22:23:36 -07:00
NickrenREN e443277d58 Define const annotation variable once
Move annotation to package imported by both pkg/volume and pkg/volume/validation
2017-04-24 11:54:21 +08:00
Kubernetes Submit Queue e0ba40b67c Merge pull request #39716 from zhouhaibing089/etcd-health-check
Automatic merge from submit-queue

etcd component status check should include credentials

- [x] Add TLS credentials into `pkg/genericapiserver.Backend`.
- [x] Add TLS credentials into `pkg/registry/core/componentstatus.Server`.
- [x] `pkg/probe/http.httpProber` should accept the TLS credentials.

Now it is working.

```console
$ kubectl get cs
NAME                 STATUS    MESSAGE              ERROR
scheduler            Healthy   ok
controller-manager   Healthy   ok
etcd-0               Healthy   {"health": "true"}
```

Fixes https://github.com/kubernetes/kubernetes/issues/27343.
2017-04-22 07:30:30 -07:00
Anthony Yeh 1ab6a33db4
PATCH: Fix erroneous meaningful conflict for numeric values.
The wrong json package was used, resulting in patches being unmarshaled
with numbers as float64 rather than int64.
This in turn confused HasConflicts() which expects numeric types to match.

The end result was false positives of meaningful conflicts, such as:

```
there is a meaningful conflict (firstResourceVersion: "8517",
currentResourceVersion: "8519"):
 diff1={"metadata":{"resourceVersion":"8519"},"spec":{"replicas":0},"status":{"conditions":null,"fullyLabeledReplicas":null,"replicas":0}}
, diff2={"spec":{"replicas":0}}
```
2017-04-21 17:24:07 -07:00
Anthony Yeh 103cb17bad
Fix mergepatch.HasConflicts().
This fixes some false negatives:

* If a map had multiple entries, only the first was checked.
* If a list had multiple entries, only the first was checked.
2017-04-21 15:33:10 -07:00
Kubernetes Submit Queue fa750c02be Merge pull request #44570 from liggitt/namespace-icc
Automatic merge from submit-queue

Explicit namespace from kubeconfig should override in-cluster config

Fixes #43662 

If an explicitly specified namespace is read from a kubeconfig file, we should not fall back to in-cluster config

```release-note
kubectl commands run inside a pod using a kubeconfig file now use the namespace specified in the kubeconfig file, instead of using the pod namespace. If no kubeconfig file is used, or the kubeconfig does not specify a namespace, the pod namespace is still used as a fallback.
```
2017-04-21 14:45:23 -07:00
Monis Khan ed35deb69d
Default ObjectNameFunc for all REST Stores
All Stores in Kubernetes follow the same logic for determining the name
of an object.  This change makes it so that CompleteWithOptions defaults
the ObjectNameFunc if it is not specified.  Thus a user does not need to
remember to use ObjectMeta.Name.  Using the wrong field as the name can
lead to an object which has a name that bypasses normal object name
validation.

Signed-off-by: Monis Khan <mkhan@redhat.com>
2017-04-21 15:47:25 -04:00
Kubernetes Submit Queue ee86c18d92 Merge pull request #44623 from p0lyn0mial/split_out_admission_options
Automatic merge from submit-queue (batch tested with PRs 42202, 40784, 44642, 44623, 44761)

Split out AdmissionOptions

**What this PR does / why we need it**: The changes in this PR split out AdmissionOptions from ServerRunOptions. In the long term AdmissionOptions will accepts various dependencies
and spit out AdmissionControl

**Release note**:

NONE
2017-04-21 11:52:09 -07:00
Kubernetes Submit Queue 936137d22b Merge pull request #44076 from liggitt/impersonation-groupify
Automatic merge from submit-queue

Include system:authenticated group when impersonating

Fixes #43227

An authorized impersonation request solely for a specific username previously resulted in a `user.Info` that did not include either the `system:authenticated` or `system:unauthenticated` groups. That meant that permissions intended to be granted to all users, like discovery, would be denied the impersonated user.

This allows `kubectl get pods --as=<username>` to work as expected

```release-note
API requests using impersonation now include the `system:authenticated` group in the impersonated user automatically.
```
2017-04-21 09:22:35 -07:00
Kubernetes Submit Queue c4bc7c1166 Merge pull request #44636 from yvespp/master
Automatic merge from submit-queue

client-go PortForwarder: don't log an error if net.Listen fails

**What this PR does / why we need it**:
If ipv6 is disabled the client-go PortForwarder logs an error:
```
E0406 17:26:06.983609   29625 portforward.go:209] Unable to create listener: Error listen tcp6 [::1]:30143: socket: address family not supported by protocol
```
This pull request removes this error log. Reasons:
* Tunnel creation might still succeed on ipv4 and the error just confuses the user (see https://github.com/kubernetes/helm/issues/2223).
* If the tunnel can't be created the error gets also loggen in `listenOnPort`.
* runtime.HandleError should only be used on errors "_when a non-user facing piece of code cannot return an error"_ which isn't the case here.

**Which issue this PR fixes**
Fixes https://github.com/kubernetes/helm/issues/2223
2017-04-21 08:34:17 -07:00
Kubernetes Submit Queue 3559c067c6 Merge pull request #41571 from php-coder/fix_comments
Automatic merge from submit-queue

Minor cleanups

Minor improvements:
- `ValidateNoNewFinalizers`: remove unused const
- Mention that mutation of `spec.initContainers[*].image` field is allowed
- Improve godoc comments
2017-04-21 08:34:07 -07:00
Roman Mohr b39b3ba016 client-go workqueue example
Demonstrates how to compose a controller out of cache.Controller,
cache.Indexer and a workqueue.
2017-04-21 12:41:30 +02:00
Kubernetes Submit Queue 870585e8e1 Merge pull request #44651 from knightXun/string
Automatic merge from submit-queue (batch tested with PRs 44594, 44651)

remove strings.compare(), use string native operation

I notice we use strings.Compare() in some code, we can remove it and use native operation.
2017-04-20 14:08:59 -07:00
Kubernetes Submit Queue 7b43f922aa Merge pull request #42176 from enisoc/controller-ref-job
Automatic merge from submit-queue (batch tested with PRs 42177, 42176, 44721)

Job: Respect ControllerRef

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

This is part of the completion of the [ControllerRef](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md) proposal. It brings Job into full compliance with ControllerRef. See the individual commit messages for details.

**Which issue this PR fixes**:

This ensures that Job does not fight with other controllers over control of Pods.

Ref: #24433

**Special notes for your reviewer**:

**Release note**:

```release-note
Job controller now respects ControllerRef to avoid fighting over Pods.
```
cc @erictune @kubernetes/sig-apps-pr-reviews
2017-04-20 12:57:06 -07:00
Jordan Liggitt 63b5650885
Explicit namespace from kubeconfig should override in-cluster config 2017-04-20 13:46:23 -04:00
Jordan Liggitt 67360883bc
Switch to pointer to policy rule, visit and short circuit during authorization 2017-04-20 10:52:53 -04:00
Cao Shufeng 939b962975 refactor code from restful namer
Some codes are replaced because they will never run.
2017-04-20 17:34:08 +08:00
Kubernetes Submit Queue afc01d92d2 Merge pull request #42272 from marun/apiserver-fail-fast
Automatic merge from submit-queue

apiserver: Update genericapiserver to panic on listener error

Previously runServer would try to listen again if a listener error occurred.  This commit changes the response to a panic to allow a process manager (systemd/kubelet/etc) to react to the failure.

**Release note**:

```release-note
The Kubernetes API server now exits if it encounters a networking failure (e.g. the networking interface hosting its address goes away) to allow a process manager (systemd/kubelet/etc) to react to the problem.  Previously the server would log the failure and try again to bind to its configured address:port.
```

cc: @liggitt @sttts @deads2k @derekwaynecarr
2017-04-19 23:51:34 -07:00
Cezar Sa Espinola cc5a309fd7
prevent corrupted spdy stream after hijacking connection
Reading directly from a hijacked connection isn't safe because some
data may have already been read by the server before Hijack was called.
To ensure all data will be received it's safer to read from the returned
bufio.Reader.
2017-04-19 21:50:49 -03:00
Anthony Yeh ad026026e0 Job: Update Lister documentation for ControllerRef.
The Job Listers still use selectors, because this is the
behavior expected by callers. This clarifies the meaning of the
returned list. Some callers may need to switch to using
GetControllerOf() instead, but that is a separate, case-by-case issue.
2017-04-19 14:03:36 -07:00
p0lyn0mial 4a3dcff3bf bazel update 2017-04-19 17:22:44 +02:00
Kubernetes Submit Queue d46983f2e5 Merge pull request #44667 from gmarek/fix_get_traces
Automatic merge from submit-queue

Fix traces for get requests

Currently traces for GETs are not useful at all, as they're measuring the wrong thing.
2017-04-19 08:06:41 -07:00
gmarek 2a49281b55 Fix traces for get requests 2017-04-19 15:04:03 +02:00
Kubernetes Submit Queue 712ccf3fa4 Merge pull request #44082 from zetaab/fixzone2
Automatic merge from submit-queue

use availability_zone instead of availability (update godep for gophercloud)

**What this PR does / why we need it**: there is typo in json variable name

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

**Special notes for your reviewer**:our openstack environment region name is not nova, so I tested this and it works now

All cinder blockstorages are using variable name availability_zone instead of availability. Docs: 

v3:
https://developer.openstack.org/api-ref/block-storage/v3/index.html?expanded=create-a-volume-detail#create-a-volume

v2:
https://developer.openstack.org/api-ref/block-storage/v2/index.html?expanded=create-volume-detail#create-volume

I could not find v1 documentation anymore from openstack pages. However, https://developer.rackspace.com/docs/cloud-block-storage/v1/api-reference/cbs-volumes-operations/#create-a-volume documentation says also availability_zone is the correct one. 

Like mentioned in https://github.com/kubernetes/kubernetes/issues/44032#issuecomment-291488494 openstack CLI is using availability_zone
2017-04-19 03:26:25 -07:00
xu fei b0a3f492af remove strings.compare(), use string native operation 2017-04-19 09:32:29 +08:00
Maru Newby 30fb3be4d2 apiserver: Update genericapiserver to panic on listener error
Previously runServer would try to listen again if a listener error
occurred.  This commit changes the response to a panic to allow a
process manager (systemd/kubelet/etc) to react to the failure.
2017-04-18 15:48:45 -07:00
Yves Peter 99711a96a4 client-go PortForwarder: don't log an error if net.Listen fails 2017-04-18 22:46:32 +02:00
p0lyn0mial de9706bc15 Split out AdmissionOptions
In the long term AdmissionOptions will accepts various dependencies
and spit out AdmissionControl
2017-04-18 19:48:14 +02:00
Kubernetes Submit Queue eccba3b6d0 Merge pull request #42711 from xilabao/small-fix-in-audit-log
Automatic merge from submit-queue

clean auditStringSlice in audit
2017-04-18 03:03:21 -07:00
Kubernetes Submit Queue f40fafe755 Merge pull request #44568 from mikedanese/fix-staging
Automatic merge from submit-queue (batch tested with PRs 40055, 42085, 44509, 44568, 43956)

revert BUILD changes at the end of DRY_RUN=n copy.sh

Fixes https://github.com/kubernetes/kubernetes/issues/44567

cc @caesarxuchao @ixdy @spxtr
2017-04-17 15:39:11 -07:00
Kubernetes Submit Queue a1684fea80 Merge pull request #42085 from cblecker/gofmt-fix
Automatic merge from submit-queue (batch tested with PRs 40055, 42085, 44509, 44568, 43956)

Fix gofmt errors

**What this PR does / why we need it**:
There were some gofmt errors on master. Ran the following to fix:
```
hack/verify-gofmt.sh | grep ^diff | awk '{ print $2 }' | xargs gofmt -w -s
```

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-04-17 15:39:07 -07:00
Kubernetes Submit Queue 44127c588d Merge pull request #40055 from StudyNick/zte-20170118
Automatic merge from submit-queue

error word

dummyController Struct comment "disonnected " is error word
WaitForCacheSync method comment "contoller" is error word
2017-04-17 15:30:17 -07:00
Mike Danese ceb0b4e799 make certs used in roundtripper_test same as those used in proxy_test 2017-04-17 14:37:40 -07:00
Kubernetes Submit Queue 73fb978181 Merge pull request #44398 from caesarxuchao/move-v1/refs-and-v1/resource
Automatic merge from submit-queue (batch tested with PRs 44569, 44398)

Move v1/refs and v1/resource

This PR moves pkg/api/v1/ref.go and pkg/api/v1/resource_helper.go to their own sub packages, it's very similar to 44299 and 44302.

The PR is mostly mechanical, except that 
* i moved some utility function from resource.go to pkg/api/v1/pod and pkg/api/v1/node, as they are more appropriate
* i updated the staging/copy.sh to copy the new subpackages, so that helper functions are copied. We can get rid of this copy after client-go stops copying API types.
2017-04-17 14:03:57 -07:00
Kubernetes Submit Queue 4372b437ba Merge pull request #44513 from mml/windows
Automatic merge from submit-queue (batch tested with PRs 44519, 43194, 44513)

Use regexp instead of substring to do search and replace.

enisoc pointed out how ToLower can change (lengthen even!) the length of
a string given arbitrary input.

Follow-up to #44421 for #44419
2017-04-17 12:39:06 -07:00
Kubernetes Submit Queue ca8f1bcf3d Merge pull request #44519 from thockin/remove-deprecated-public-ips
Automatic merge from submit-queue

Remove deprecatedPublicIPs field
2017-04-17 12:11:00 -07:00
Chao Xu 4f9591b1de move pkg/api/v1/ref.go and pkg/api/v1/resource.go to subpackages. move some functions in resource.go to pkg/api/v1/node and pkg/api/v1/pod 2017-04-17 11:38:11 -07:00
Mike Danese 4eb5498bc7 run update-bazel.sh at the end of DRY_RUN=n copy.sh 2017-04-17 11:27:21 -07:00
Kubernetes Submit Queue 74d0258818 Merge pull request #44373 from knightXun/patch-2
Automatic merge from submit-queue

change event count type

event count type had better to be uint.

thx all.
2017-04-17 01:33:57 -07:00
zhouhaibing089 b1040171b6 componentstatus: support client cert health check
etcd has support for client-cert-auth, which can be configured via the flag `--ca-file`,
when that is enabled, all the client requests must present with a client certificate,
however, the current component status check uses a single transport for all of the checks,
this is wrong, the checks should be different for each of different component, and make
each of them use different transport(tls configurations).
2017-04-17 13:58:33 +08:00
xilabao 4b8abd811d remove useless check in audit.go 2017-04-17 09:58:19 +08:00
Tim Hockin fa93290b72 --amend 2017-04-16 13:06:01 -07:00
Kubernetes Submit Queue dee81ed56a Merge pull request #44113 from mikkeloscar/update-goproxy
Automatic merge from submit-queue

vendor: Update elazarl/goproxy to fix e2e test with go1.8

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

This updates the dependency `github.com/elazarl/goproxy` to include this fix c4fc26588b which makes kubernetes e2e tests build with go1.8. It was crashing before as described in https://github.com/elazarl/goproxy/issues/188#issuecomment-281092250 and #38228

**Which issue this PR fixes**

This is part of the fix for #38228 

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-04-16 10:26:55 -07:00
Kubernetes Submit Queue f05ce1e8f1 Merge pull request #44423 from monopole/fixUserAgent
Automatic merge from submit-queue

Use OS-specific libs when computing client User-Agent in kubectl, etc.

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

The User-Agent reported by clients (e.g. kubectl) in request
headers should include the name of the client executable
but not the full path to that executable.

This PR changes how this name is determined by using the
operating-system specific package "path/filepath" (meant for
working with file system paths) instead of the "path" package
(meant for URL paths).

This fixes a problem on the Windows OS in the case where, if the
user has not set their PATH to point to the location of their
client executable, the User-Agent includes the full path - which
is unnecessary.

Fixes: #44419

```release-note
Use OS-specific libs when computing client User-Agent in kubectl, etc.
```
2017-04-14 18:14:16 -07:00
Jeffrey Regan 04f993250b Use OS-specific libs when computing client User-Agent.
**What this PR does / why we need it**:

The User-Agent reported by clients (e.g. kubectl) in request
headers should include the name of the client executable
but not the full path to that executable.

This PR changes how this name is determined by using the
operating-system specific package "path/filepath" (meant for
working with file system paths) instead of the "path" package
(meant for URL paths).

This fixes a problem on the Windows OS in the case where, if the
user has not set their PATH to point to the location of their
client executable, the User-Agent unnecessarily includes the
full path.

Fixes: #44419
2017-04-14 16:06:11 -07:00
Mike Danese 3757e8bb5c bazel: statically link dockerized components
and remove libc from docker images when it's not needed.
2017-04-14 15:51:54 -07:00
Chao Xu d4850b6c2b move pkg/api/v1/helpers.go to subpackage 2017-04-14 14:25:11 -07:00
Matt Liggett fe202fcfc4 Use regexp instead of substring to do search and replace.
enisoc pointed out how ToLower can change (lengthen even!) the length of
a string given arbitrary input.
2017-04-14 14:25:02 -07:00
Mike Danese bd23931aeb ignore BUILD files in staging 2017-04-14 10:41:02 -07:00
Mike Danese 981dd8dc66 add testdata for tests in //vendor/k8s.io/... 2017-04-14 10:41:02 -07:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Andy Goldstein e63fcf708d Make controller Run methods consistent
- startup/shutdown logging
- wait for cache sync logging
- defer utilruntime.HandleCrash()
- wait for stop channel before exiting
2017-04-14 07:27:45 -04:00
Kubernetes Submit Queue 079dc0d78e Merge pull request #44421 from mml/windows
Automatic merge from submit-queue (batch tested with PRs 44362, 44421, 44468, 43878, 44480)

Drop leading path of KUBECTL.EXE if it shows up in User-Agent.

Partial fix for #44419 

Release note: kube-apiserver now drops unneeded path information if an older version of Windows kubectl sends it.
2017-04-14 01:46:01 -07:00
Kubernetes Submit Queue 47ccb092f4 Merge pull request #44302 from caesarxuchao/move-resource_helpers.go
Automatic merge from submit-queue (batch tested with PRs 44440, 44038, 44302, 44316, 43876)

Move pkg/api/ref.go and pkg/api/resource_helpers.go to subpackages

First two commits are #44296 #44299. (unfortunately, removing these commits results in conflicts)

This PR moves resource_helpers.go to a subpackage. It's mostly a mechanic move, except that:
* i kept the methods of ResourceName and ResourceList in pkg/api/method.go

I'll send one more PR to separate api.Scheme etc. to their own package.
2017-04-13 23:18:03 -07:00
Kubernetes Submit Queue 4a68dda84c Merge pull request #44038 from soltysh/batch_docs
Automatic merge from submit-queue (batch tested with PRs 44440, 44038, 44302, 44316, 43876)

Update batch types.go docs

@bgrant0607 you asked about it in https://github.com/kubernetes/kubernetes/pull/42663#discussion_r109065758
2017-04-13 23:18:01 -07:00
Kubernetes Submit Queue 5ad494077e Merge pull request #42914 from liggitt/fix-defaulting
Automatic merge from submit-queue (batch tested with PRs 44424, 44026, 43939, 44386, 42914)

remove defaulting from conversion path

follow up for #42764

* remove call to defaulting from conversion path (defaulting is a separate step from conversion)
* remove non-top-level-object defaulting registration (unused after conversion call is removed)
* generate missing top-level defaults for some api groups:
  * autoscaling/v2alpha1
  * policy/v1alpha1
  * policy/v1beta1
* register top-level defaults for some api groups that were missing them:
  * autoscaling/v2alpha1
  * settings/v1alpha1
2017-04-13 22:07:10 -07:00
Kubernetes Submit Queue f83badf057 Merge pull request #44386 from gyliu513/comment
Automatic merge from submit-queue (batch tested with PRs 44424, 44026, 43939, 44386, 42914)

`failure-domain` is no longer used in command line arg.

**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
```
2017-04-13 22:07:09 -07:00
Kubernetes Submit Queue ab22baf94d Merge pull request #44299 from caesarxuchao/move-ref.go
Automatic merge from submit-queue (batch tested with PRs 44406, 41543, 44071, 44374, 44299)

Move pkg/api/ref.go to a subpackage

First commit is #44296. (unfortunately, removing that commit results in conflicts)

This PR moves the pkg/api/ref.go to its own subpackage. It's mostly a mechanic move.

I'll send a few more PRs to make the k8s.io/kubernetes/pkg/api package only contains the code we want in the k8s.io/api repo, then we can run a [script](a0015fd1be (diff-7a2fbb4371972350ee414c6b88aee1c8)) to cut the new repo.
2017-04-13 19:52:11 -07:00
Kubernetes Submit Queue 4653a9b280 Merge pull request #41543 from dshulyak/decouple_remotecommand
Automatic merge from submit-queue (batch tested with PRs 44406, 41543, 44071, 44374, 44299)

Decouple remotecommand

Refactored unversioned/remotecommand to decouple it from undesirable dependencies:

- term package now is not required, and functionality required to resize terminal size can be plugged in directly in kubectl
- in order to remove dependency on kubelet package - constants from kubelet/server/remotecommand were moved to separate util package (pkg/util/remotecommand)
- remotecommand_test.go moved to pkg/client/tests module
2017-04-13 19:52:05 -07:00
Kubernetes Submit Queue b7ed2d1149 Merge pull request #43199 from jorenhehe/labels-typos
Automatic merge from submit-queue

fix typos

**Release note**:

```release-note
NONE
```
2017-04-13 18:13:39 -07:00
Kubernetes Submit Queue 1dcb288108 Merge pull request #41779 from StudyNick/zte-20170221
Automatic merge from submit-queue (batch tested with PRs 44447, 44456, 43277, 41779, 43942)

'workqueue' modify 'work queue'
2017-04-13 15:02:00 -07:00
Jordan Liggitt 86623ed241
Include system:authenticated group when impersonating 2017-04-13 17:08:30 -04:00
Chao Xu 9837a98564 move resource_helpers.go to a subpackage 2017-04-13 12:03:42 -07:00
Chao Xu d9920c53a5 move ref.go to its own subpackage 2017-04-13 10:02:43 -07:00
Dmitry Shulyak f50480c714 Decouple remotecommand client from term/kubelet dependencies
In order to move client/unversioned/remotecommand to client-go as a followup
for this change we have to decouple it from tons of dependencies
2017-04-13 15:56:40 +03:00
Maciej Szulik a307c47dfd Staging changes for docs in batch types.go 2017-04-13 14:15:21 +02:00
Kubernetes Submit Queue a9019fe14a Merge pull request #44399 from deads2k/server-19-deregister
Automatic merge from submit-queue

add deregistration for paths

Aggregation and TPRs require the ability to de-register endpoints.  This adds the capability and makes it threadsafe.
2017-04-13 05:12:35 -07:00
Kubernetes Submit Queue 868eb745ab Merge pull request #42663 from soltysh/37166_followup
Automatic merge from submit-queue

Add default information to CronJobSpec

This is requested followup to https://github.com/kubernetes/kubernetes/pull/41890

@smarterclayton @janetkuo ptal
2017-04-13 03:23:26 -07:00
Matt Liggett 4cff7c3d30 Drop leading path of KUBECTL.EXE if it shows up in User-Agent. 2017-04-12 17:16:32 -07:00
deads2k cd950364e5 add deregistration for paths 2017-04-12 16:21:08 -04:00
Jordan Liggitt ad116026d9
Remove vestiges of defaulting from conversion path, switch to top-level default registration only 2017-04-12 13:36:15 -04:00
Kubernetes Submit Queue 5ba21e83b9 Merge pull request #43085 from sttts/sttts-duplicated-meta-conversions
Automatic merge from submit-queue

apimachinery/pkg/apis/meta: remove duplicated conversions
2017-04-12 07:01:09 -07:00
deads2k f53c9a7e59 build external watch event so simple encoders can encode 2017-04-12 07:51:04 -04:00
Kubernetes Submit Queue 949440b43a Merge pull request #43698 from sttts/sttts-non-global-admission-plugin-registry
Automatic merge from submit-queue

Non global admission plugin registry

For testing the global state is a problem. This PR turns the actual registry into a struct that must be instantiated. For the beginning, we do this in `pkg/kubeapiserver/admission`. In some follow-up (where we hunt down all globals some day), we will move this into the genericapiserver.
2017-04-12 04:12:11 -07:00
Guangya Liu 5026b9efba `failure-domain` is no longer used in command line arg. 2017-04-12 18:15:42 +08:00
Kubernetes Submit Queue 9db7953c24 Merge pull request #44138 from sttts/sttts-cleanup-godeps-json-updater
Automatic merge from submit-queue

Clean up staging/godeps-json-updater.go
2017-04-12 03:02:42 -07:00
Kubernetes Submit Queue d70b55ead5 Merge pull request #42466 from sttts/sttts-client-go-plugin-import-verify
Automatic merge from submit-queue

hack/verify-staging-imports.sh: check that plugins are not imported b…
2017-04-12 03:02:35 -07:00
Kubernetes Submit Queue 1ba9202cd8 Merge pull request #42781 from spzala/conversionlint
Automatic merge from submit-queue

Conversionlint

**What this PR does / why we need it**:
This PR adds a comment placeholder for the exported or public functions in conversion generator files. Such functions without a comment results into golint failure in various generated files. The changes in this patch takes care of about 36 related lint failures. 
Given below is an example lint error, 
zz_generated.conversion.go:91:1: exported function Convert_v1alpha1_Binding_To_servicecatalog_Binding should have comment or be unexported

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

**Special notes for your reviewer**:
Hello, I am trying to fix golint failures as we see them in the kubernetes-incubator/service-catalog project. I have separate PRs opened for lint issues related to other generator code which are in separate libraries like gengo. Thanks! 

**Release note**:

```release-note
```
2017-04-12 03:02:26 -07:00
Dr. Stefan Schimanski 63f547e1b1 pkg/admission: make plugin registry non-global 2017-04-12 11:37:25 +02:00
Kubernetes Submit Queue bd3146a2a4 Merge pull request #44357 from deads2k/agg-29-up
Automatic merge from submit-queue

delete rolebinding from correct namespace

Fixes #44212

The rolebinding needs to be deleted from the namespace we create it in.

@mdshuai
2017-04-12 01:31:36 -07:00
Kubernetes Submit Queue abd92fab1e Merge pull request #44296 from caesarxuchao/move-api-helpers.go
Automatic merge from submit-queue

Move api helpers.go to a subpackage

Part of https://github.com/kubernetes/kubernetes/issues/44065.

This PR moves the pkg/api/helpers.go to its own subpackage. It's mostly a mechanic move, except that
* I removed ConversionError in helpers.go, it's not used by anyone
* I moved the 3 methods of Taint and Toleration to pkg/api/methods.go, and left a TODO saying refactoring these methods to functions.

I'll send a few more PRs to make the k8s.io/kubernetes/pkg/api package only contains the code we want in the k8s.io/api repo, then we can run a [script](a0015fd1be (diff-7a2fbb4371972350ee414c6b88aee1c8)) to cut the new repo.
2017-04-11 23:46:04 -07:00
Kubernetes Submit Queue 23b666894d Merge pull request #44368 from mbohlool/bugfix
Automatic merge from submit-queue

Bugfix: OpenAPI generator should pass generate type extensions

OpenAPI spec generator does not pass generated type extensions (using `x-kubernetes-` tags on types). This is already working for field extensions but not for types.
2017-04-11 21:23:26 -07:00
Kubernetes Submit Queue e60cc6ee3d Merge pull request #44090 from NickrenREN/remove-alpha-pv
Automatic merge from submit-queue

Remove alphaProvisioner in PVController and AlphaStorageClassAnnotation

remove alpha annotation and alphaProvisioner 

**Release note**:

```release-note
NONE
```
2017-04-11 20:41:40 -07:00
xu fei 461761e5b0 change event count type
event count type had better to be uint.
2017-04-12 09:53:39 +08:00
Chao Xu 08aa712a6c move helpers.go to helper 2017-04-11 15:49:11 -07:00
mbohlool ab5bcf6d2d Bugfix: OpenAPI generator should pass generate type extensions 2017-04-11 15:32:19 -07:00
Kubernetes Submit Queue c17f0f60f9 Merge pull request #41427 from timothysc/etcd_3_1_godep
Automatic merge from submit-queue (batch tested with PRs 43304, 41427, 43490, 44352)

Update etcd-client godep to 3.1.5

This transitively level sets the godeps to yank in the 3.1.5 client.  

Currently WIP, b/c it required some regen and I had some weird local permissions issue. 

xref: #41143

/cc @xiang90 @mml
2017-04-11 13:46:15 -07:00
Sahdev P. Zala 08639023d0 Conversion generated code changes for golint fix
The exported or public functions requires a doc comment to pass golint.
This commit has changes of conversion generated code. The actual doc
changes are added into a separate commit for a clean review.
2017-04-11 15:34:51 -04:00
deads2k f80adb10dc delete rolebinding from correct namespace 2017-04-11 15:30:30 -04:00
Kubernetes Submit Queue f1b9c17cef Merge pull request #44221 from ncdc/fix-validateClusterInfo-empty-cluster-check
Automatic merge from submit-queue (batch tested with PRs 43545, 44293, 44221, 43888)

validateClusterInfo: use clientcmdapi.NewCluster()

Change validateClusterInfo to use clientcmdapi.NewCluster() instead of
clientcmdapi.Cluster{} when comparing against the passed in clusterInfo.
clusterInfo most likely will be a combination of
clientcmdapi.NewCluster() merged with potential overrides. This is
necessary because otherwise, the DeepEqual between what is supposed to
be an empty Cluster and clusterInfo will fail, resulting in an error
that doesn't allow fall-through to checking for in-cluster
configuration.

https://github.com/kubernetes/kubernetes/pull/40508 changed `DirectClientConfig.getContext()` to start with a `clientcmdapi.NewCluster()` instead of the zero value for `clientcmdapi.Cluster`. This means that the `Extensions` map in the `Cluster` is initialized instead of `nil`, which breaks the `DeepEqual` test unless you compare `clusterInfo` against an initialized `clientcmdapi.NewCluster()`.

cc @smarterclayton @sttts @vjsamuel @liggitt @deads2k @soltysh @fabianofranz @kubernetes/sig-api-machinery-pr-reviews
2017-04-11 12:18:22 -07:00
Kubernetes Submit Queue 867159416f Merge pull request #44293 from deads2k/api-08-unstructureditems
Automatic merge from submit-queue (batch tested with PRs 43545, 44293, 44221, 43888)

make unstructured items correspond to other items for storage

"normal" `Items` elements include the struct itself, not a pointer to the struct.  Some of the deeper bits of storage rely on this behavior in reflective paths.

This updates the `UnstructuredList` to be "normal".

@kubernetes/sig-api-machinery-pr-reviews
2017-04-11 12:18:20 -07:00