Commit Graph

20067 Commits (46d4c621a84f8dfb566b2f864f4b5bd10b09e602)

Author SHA1 Message Date
Kubernetes Submit Queue 6ae0199eb0 Merge pull request #42402 from jorenhehe/pv-typo
Automatic merge from submit-queue

fix pv_controller typos

```release-note
NONE
```
2017-03-24 10:25:55 -07:00
Kubernetes Submit Queue d3ebfb2ffb Merge pull request #42311 from timchenxiaoyu/amounttypo
Automatic merge from submit-queue

fix amount typo
2017-03-24 10:25:34 -07:00
Kubernetes Submit Queue 6eaa8610a1 Merge pull request #42226 from timchenxiaoyu/reconciletypo
Automatic merge from submit-queue

fix reconcile typo
2017-03-24 10:25:27 -07:00
Kubernetes Submit Queue 11610d0ed6 Merge pull request #42160 from gnufied/gnufied-pkg-volume-reviewer
Automatic merge from submit-queue

Add gnufied as reviewer for pkg/volume

I have helped review and contributed code to this
area already.

cc @saad-ali @jsafrane @childsb
2017-03-24 10:25:20 -07:00
Kubernetes Submit Queue 2df943ce50 Merge pull request #36698 from fabiand/no-mpathconf
Automatic merge from submit-queue

fc: Drop multipath.conf snippet

**What this PR does / why we need it**:
Removes multipath.conf - The code does not make use of it - or ensure s that it's getting used - and it should in addition be handled elsewehre.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```

A minimalistic multipath.conf got written, but it was useless, as
it is unclear if multipathd is running and there was also no
config reload triggered.

This patch drops this snippet. In general it's probably a better idea
to leave the multipath.conf to the component managing the host.

Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
2017-03-24 10:24:49 -07:00
pospispa 1fdd163dd1 Make Some Constants Public so that They Can Be Used in an External Provisioner
Out-of-tree external provisioners have the same purpose as in-tree provisioners. As external provisioners work with PV and PVC datastructures it's an advantage to import certain Kubernetes packages instead of copy-pasting the Kubernetes code.

That's why the constants are made public so that they can be used in an external provisioner.
2017-03-24 17:09:51 +01:00
Klaus Ma 7c91274df2 Fix comments typo in rkt. 2017-03-24 11:31:15 +08:00
Bowei Du dc1e614a72 Split the GCE cloud provider into more managable chunks
Each major interface is now in its own file. Any package private
functions that are only referenced by a particular module was also moved
to the corresponding file. All common helper functions were moved to
gce_util.go.

This change is a pure movement of code; no semantic changes were made.
2017-03-23 14:40:16 -07:00
Jordan Liggitt 707f0fb131
Preserve API group order in discovery, prefer extensions over apps 2017-03-23 11:10:53 -04:00
Kubernetes Submit Queue a84f100faa Merge pull request #42422 from vmware/fix-42399.kerneltime
Automatic merge from submit-queue

Fix adding disks to more than one scsi adapter. Fixes #42399

**What this PR does / why we need it**: Allows a single node to use more than 16 disks.

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

**Special notes for your reviewer**: 

**Release note**:

```release-note
Fix adding disks to more than one scsi adapter.
```
2017-03-22 19:23:19 -07:00
Jeff Schroeder a5afdfa17f
Fix spelling of the word successfully
Auto-generated via:
    git grep -l [Ss]uccesfully  | xargs sed -ri 's/([sS])uccesfully/\1uccessfully/g'

I noticed this when running kube-scheduler with --v4 and it is annoying.
Then manually reverted changed to the vendored bits.
2017-03-22 18:33:11 -05:00
Kubernetes Submit Queue 7c24d1a665 Merge pull request #43539 from yujuhong/hostnet_ip
Automatic merge from submit-queue (batch tested with PRs 43533, 43539)

kuberuntime: don't override the pod IP for pods using host network

This fixes the issue of not passing pod IP via downward API for host network pods.
2017-03-22 15:07:18 -07:00
Yu-Ju Hong ea868d6f7b kuberuntime: don't override the pod IP for pods using host network 2017-03-22 13:28:17 -07:00
Kubernetes Submit Queue fb890dee06 Merge pull request #43474 from dcbw/cni-network-status
Automatic merge from submit-queue (batch tested with PRs 43465, 43529, 43474, 43521)

kubelet/cni: hook network plugin Status() up to CNI network discovery

Ensure that the plugin returns NotReady status until there is a
CNI network available which can be used to set up pods.

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

I think the only reason it wasn't done like this in the first place was that the dynamic "reread /etc/cni/net.d every 10s forever" was added long after the Status() hook was.  What do you think?

@freehan @caseydavenport @luxas @jbeda
2017-03-22 12:35:11 -07:00
Kubernetes Submit Queue 0450c2925f Merge pull request #43465 from kargakis/update-validation
Automatic merge from submit-queue

Disable readyReplicas validation for Deployments

Because there is no field in 1.5, when we update to 1.6 and the
controller tries to update the Deployment, it will be denied by
validation because the pre-existing availableReplicas field is greater
than readyReplicas (normally readyReplicas should always be greater or
equal).

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

@kubernetes/sig-apps-bugs
2017-03-22 12:09:33 -07:00
Michail Kargakis 7f4670d622 Disable readyReplicas validation for Deployments
Because there is no field in 1.5, when we update to 1.6 and the
controller tries to update the Deployment, it will be denied by
validation because the pre-existing availableReplicas field is greater
than readyReplicas (normally readyReplicas should always be greater or
equal).
2017-03-22 08:42:34 -04:00
Kubernetes Submit Queue ee255d09fa Merge pull request #43498 from aveshagarwal/master-issue-43228
Automatic merge from submit-queue

Add validation for affinities and taints/tolerations annotations.

It fixes annotations validation issues for pod/node affinities and taints/tolerations annotations for 1.5 to 1.6 upgrade tests as discussed in the issue https://github.com/kubernetes/kubernetes/issues/43228 .

@davidopp @derekwaynecarr @kubernetes/sig-scheduling-pr-reviews
2017-03-22 03:24:29 -07:00
xilabao d2069ab46b ignore duplicate resource in create rolebinding 2017-03-22 17:35:04 +08:00
Avesh Agarwal eccbd992da Add validation for taints annotations. 2017-03-22 01:01:49 -04:00
Avesh Agarwal ff4c1d80d2 Add validation for toleration annotations. 2017-03-22 00:53:34 -04:00
Avesh Agarwal ab5b462d17 Add node affinity, pod affinity and pod antiaffinity validation for alpha annotations. 2017-03-22 00:28:00 -04:00
Kubernetes Submit Queue 00938eac64 Merge pull request #42741 from kargakis/avoid-ns-skew
Automatic merge from submit-queue (batch tested with PRs 43481, 43419, 42741, 43480)

controller: work around milliseconds skew in AddAfter

AddAfter is not requeueing precisely after the provided time and may
skew for some millieseconds. This is really important because controllers
don't relist often so a missed check because of ms difference is
essentially dropping the key. For example, in [1] the test requeues a
Deployment for a progress check after 10s[2] but the Deployment is synced
9ms earlier ending up in the controller not recognizing the Deployment as
failed thus dropping it from the queue w/o any error. The drop is fixed by
forcing the controller to resync the Deployment but we are going to resync
after the full duration.

@deads2k if you don't like this I am going to handle this on a case by case basis

[1] https://github.com/kubernetes/kubernetes/issues/39785#issuecomment-279959133
[2] c48b2cab0f/test/e2e/deployment.go (L1122)
2017-03-21 19:29:27 -07:00
Kubernetes Submit Queue eb77144474 Merge pull request #42715 from DirectXMan12/bug/infinite-hpa
Automatic merge from submit-queue

Rate limit HPA controller to sync period

Since the HPA controller pulls information from an external source that
makes no guarantees about consistency, it's possible for the HPA
to get into an infinite update loop -- if the metrics change with
every query, the HPA controller will run it's normal reconcilation,
post a status update, see that status update itself, fetch new metrics,
and if those metrics are different, post another status update, and
repeat.  This can lead to continuously updating a single HPA.
    
By rate-limiting each HPA to once per sync interval, we prevent this
from happening.

**Release note**:
```release-note
NONE
```
2017-03-21 14:26:16 -07:00
Dan Williams 193abffdbe kubelet/cni: hook network plugin Status() up to CNI network discovery
Ensure that the plugin returns NotReady status until there is a
CNI network available which can be used to set up pods.

Fixes: https://github.com/kubernetes/kubernetes/issues/43014
2017-03-21 15:50:39 -05:00
Michail Kargakis 68b78282d7 controller: work around milliseconds skew in AddAfter 2017-03-21 16:39:32 -04:00
deads2k 1ef204aa5b add controller to update apiservices based on tpr 2017-03-21 15:58:28 -04:00
Kubernetes Submit Queue 51beb16ede Merge pull request #43422 from liggitt/convert-null-list
Automatic merge from submit-queue

Ensure slices are serialized as zero-length, not null

Fixes https://github.com/kubernetes/kubernetes/issues/43203 null serialization of slices to prevent NPE errors in clients that store and expect to receive non-null JSON values in these fields.

Ensures when we are converting to an external slice field that will be serialized even if empty (has `json` tag that does not include `omitempty`), we populate it with `[]`, not `nil`

Other places I considered putting this logic instead:

* When unmarshaling
  * Would have to be done for both protobuf and ugorji
  * Would still have to be done here (or on marshal) to handle cases where we construct objects to return
* When marshaling
  * Would have to switch to use custom json marshaler (currently we use stdlib)
* When defaulting
  * Defaulting isn't run on some fields, notably, pod template in rc/deployment spec
  * Would still have to be done here (or on marshal) to handle cases where we construct objects to return

```release-note
API fields that previously serialized null arrays as `null` and empty arrays as `[]` no longer distinguish between those values and always output `[]` when serializing to JSON.
```
2017-03-21 11:46:19 -07:00
Maxym Kutsevol 89f596f408 Update deps 2017-03-21 20:46:06 +02:00
Maxym Kutsevol 2c05bb5336 Support for v1/v2/autoprobe openstack cinder blockstorage
Support for cinder v1/v2 api with the new gophercloud/gophercloud
library. API version is configurable and defaulting autodetection.
2017-03-21 20:46:03 +02:00
deads2k 02efeeaf40 allow fallthrough handling from go-restful routes 2017-03-21 13:19:28 -04:00
deads2k 36cb9ed640 add singular resource names to discovery 2017-03-21 11:04:08 -04:00
supereagle 29c831aabd remove duplicated import 2017-03-21 14:45:26 +08:00
Pengfei Ni a16758396c Fix tiny typo 2017-03-21 14:22:33 +08:00
Kubernetes Submit Queue 1e5fa8fed5 Merge pull request #43415 from thockin/fix-nodeport-close-wait
Automatic merge from submit-queue

Install a REJECT rule for nodeport with no backend

Rather than actually accepting the connection, REJECT.  This will avoid
CLOSE_WAIT.

Fixes #43212


@justinsb @felipejfc @spiddy
2017-03-20 23:22:21 -07:00
Tim Hockin 2ec87999a9 Install a REJECT rule for nodeport with no backend
Rather than actually accepting the connection, REJECT.  This will avoid
CLOSE_WAIT.
2017-03-20 21:37:00 -07:00
Jordan Liggitt 939ca532aa
generated files 2017-03-20 23:57:38 -04:00
Jordan Liggitt 0e2f1b535d
Ensure empty serialized slices are zero-length, not null 2017-03-20 23:56:39 -04:00
Kubernetes Submit Queue e09fda63be Merge pull request #43414 from Random-Liu/use-uid-in-config
Automatic merge from submit-queue

Use uid in config.go instead of pod full name.

For https://github.com/kubernetes/kubernetes/issues/43397.

In config.go, use pod uid in pod cache.

Previously, if we update the static pod, even though a new UID is generated in file.go, config.go will only reference the pod with pod full name, and never update the pod UID in the internal cache. This causes:
1) If we change container spec, kubelet will restart the corresponding container because the container hash is changed.
2) If we change pod spec, kubelet will do nothing.

With this fix, kubelet will always restart pod whenever pod spec (including container spec) is changed.

@yujuhong @bowei @dchen1107 
/cc @kubernetes/sig-node-bugs
2017-03-20 18:18:36 -07:00
Kubernetes Submit Queue 4974a0589b Merge pull request #43337 from janetkuo/ds-template-semantic-deepequal
Automatic merge from submit-queue

Use Semantic.DeepEqual to compare DaemonSet template on updates

Switch to `Semantic.DeepEqual` when comparing templates on DaemonSet updates, since we can't distinguish between `null` and `[]` in protobuf. This avoids unnecessary DaemonSet pods restarts. 

I didn't touch `reflect.DeepEqual` used in controller because it's close to release date, and the DeepEqual in the controller doesn't cause serious issues (except for maybe causing more enqueues than needed). 

Fixes #43218 

@liggitt @kargakis @lukaszo @kubernetes/sig-apps-pr-reviews
2017-03-20 17:24:18 -07:00
Random-Liu fbc320af28 Use uid in config.go instead of pod full name. 2017-03-20 15:52:29 -07:00
Kubernetes Submit Queue a2d74cda38 Merge pull request #42452 from jingxu97/Mar/nodeNamePrefix
Automatic merge from submit-queue (batch tested with PRs 42452, 43399)

Modify getInstanceByName to avoid calling getInstancesByNames

This PR modify getInstanceByname to loop through all management zones
directly instead of calling getInstancesByNames. Currently
getInstancesByNames use a node name prefix as a filter to list the
instances. If the prefix does not match, it will return all instances
which is very wasteful since getInstanceByName only query one instance
with a specific name.

Partially fix issue #42445
2017-03-20 15:23:33 -07:00
Janet Kuo f780f32c1e Use Semantic.DeepEqual to compare DaemonSet template on updates 2017-03-20 13:58:49 -07:00
Kubernetes Submit Queue 948e3754f8 Merge pull request #43368 from feiskyer/dns-policy
Automatic merge from submit-queue (batch tested with PRs 43398, 43368)

CRI: add support for dns cluster first policy

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

PR #29378 introduces ClusterFirstWithHostNet policy but only dockertools was updated to support the feature. 

This PR updates kuberuntime to support it for all runtimes.


**Which issue this PR fixes** 

fixes #43352

**Special notes for your reviewer**:

Candidate for v1.6.

**Release note**:

```release-note
NONE
```

cc @thockin @luxas @vefimova @Random-Liu
2017-03-20 13:54:33 -07:00
Kubernetes Submit Queue bc82d87f0a Merge pull request #43398 from enisoc/deletion-race-flake
Automatic merge from submit-queue

Deflake TestSyncDeploymentDeletionRace

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

The cache was sometimes catching up while we were testing the case
where the cache is not yet caught up.

Before this fix, I could reproduce the failure with the following
command. After the fix, it passes.

```
go test -count 100000 -run TestSyncDeploymentDeletionRace
```

I checked the other controllers, and they all were already not starting informers for the deletion race test. I also checked that the deletion race tests for other controllers all pass with `-count 100000`.

**Which issue this PR fixes**:

Fixes #43390

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-03-20 13:26:03 -07:00
Kubernetes Submit Queue e668ee1182 Merge pull request #43370 from feiskyer/port-mapping
Automatic merge from submit-queue (batch tested with PRs 42659, 43370)

dockershim: process protocol correctly for port mapping

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

dockershim: process protocol correctly for port mapping.

**Which issue this PR fixes** 

Fixes #43365.

**Special notes for your reviewer**:

Should be included in v1.6.

**Release note**:

```release-note
NONE
```

cc/ @Random-Liu @justinsb @kubernetes/sig-node-pr-reviews
2017-03-20 12:40:40 -07:00
Anthony Yeh 0b9233648e Deflake TestSyncDeploymentDeletionRace
The cache was sometimes catching up while we were testing the case
where the cache is not yet caught up.

Before this fix, I could reproduce the failure with the following
command. After the fix, it passes.

```
go test -count 100000 -run TestSyncDeploymentDeletionRace
```
2017-03-20 11:13:26 -07:00
xujun e626e45b4d Remove unused argument of 'groupJobsByParent' function in cronjob controller. 2017-03-20 12:43:10 -04:00
Anthony Yeh c74aab649f RC/RS: Mark lookup-cache-size flags as deprecated. 2017-03-20 09:10:12 -07:00
Anthony Yeh f4ee44eb39 RC/RS: Check that ControllerRef UID matches found controller.
Otherwise, we may confuse a former controller by that name with a new
one that has the same name.
2017-03-20 08:57:42 -07:00
Jan Safranek 4cf36b8b39 Do not reformat devices with partitions
lsblk reports FSTYPE of devices with partition tables as empty string "",
which is indistinguishable from empty devices. We must look for dependent
devices (i.e. partitions) to see that the device is really empty and report
error otherwise.

I checked that LVM, LUKS and MD RAID have their own FSTYPE in lsblk output,
so it should be only a partition table that has empty FSTYPE.

The main point of this patch is to run lsblk without "-n", i.e. print all
dependent devices and check if they're there.
2017-03-20 13:08:13 +01:00
Pengfei Ni 95c3782043 Rewrite resolv.conf for dockershim
PR #29378 introduces ClusterFirstWithHostNet, but docker doesn't support
setting dns options togather with hostnetwork. This commit rewrites
resolv.conf same as dockertools.
2017-03-20 18:45:39 +08:00
Pengfei Ni 079158fa08 CRI: add support for dns cluster first policy
PR #29378 introduces ClusterFirstWithHostNet policy but only dockertools
was updated to support the feature. This PR updates kuberuntime to
support it for all runtimes.

Also fixes #43352.
2017-03-20 17:50:38 +08:00
Pengfei Ni 99ed3202f3 Run hack/update-bazel.sh 2017-03-20 17:48:36 +08:00
Pengfei Ni 53b5f2df48 Add unit test for MakePortsAndBindings 2017-03-20 17:47:38 +08:00
Antonio Murdaca caa6dd2599
pkg/kubelet/remote: fix typo
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-03-20 10:12:03 +01:00
Pengfei Ni 2ddaaec199 dockershim: process protocol correctly for port mapping 2017-03-20 16:52:24 +08:00
Kubernetes Submit Queue 47320fd3f0 Merge pull request #42938 from enisoc/orphan-race
Automatic merge from submit-queue

GC: Fix re-adoption race when orphaning dependents.

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

The GC expects that once it sees a controller with a non-nil
DeletionTimestamp, that controller will not attempt any adoption.
There was a known race condition that could cause a controller to
re-adopt something orphaned by the GC, because the controller is using a
cached value of its own spec from before DeletionTimestamp was set.

This fixes that race by doing an uncached quorum read of the controller
spec just before the first adoption attempt. It's important that this
read occurs after listing potential orphans. Note that this uncached
read is skipped if no adoptions are attempted (i.e. at steady state).

**Which issue this PR fixes**:

Fixes #42639

**Special notes for your reviewer**:

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

cc @kubernetes/sig-apps-pr-reviews
2017-03-20 01:30:11 -07:00
haoyuan 2b85ca8e00 fix typos 2017-03-18 22:45:07 +08:00
Kubernetes Submit Queue 7bc86d84c1 Merge pull request #43116 from dchen1107/master
Automatic merge from submit-queue (batch tested with PRs 42828, 43116)

Apply taint tolerations for NoExecute for all static pods.

Fixed https://github.com/kubernetes/kubernetes/issues/42753


**Release note**:
```
Apply taint tolerations for NoExecute for all static pods.
```

cc/ @davidopp
2017-03-17 18:14:29 -07:00
Kubernetes Submit Queue 9497139cb6 Merge pull request #42828 from janetkuo/ds-types
Automatic merge from submit-queue

Update field descriptions of DaemonSet rolling udpate

@kargakis @lukaszo @kubernetes/sig-apps-bugs
2017-03-17 17:54:14 -07:00
Anthony Yeh b4b8fdbca3 GC: Fix re-adoption race when orphaning dependents.
The GC expects that once it sees a controller with a non-nil
DeletionTimestamp, that controller will not attempt any adoption.
There was a known race condition that could cause a controller to
re-adopt something orphaned by the GC, because the controller is using a
cached value of its own spec from before DeletionTimestamp was set.

This fixes that race by doing an uncached quorum read of the controller
spec just before the first adoption attempt. It's important that this
read occurs after listing potential orphans. Note that this uncached
read is skipped if no adoptions are attempted (i.e. at steady state).
2017-03-17 15:39:26 -07:00
Kubernetes Submit Queue 4b00d5e42a Merge pull request #43307 from gnufied/fix-aws-legacy-tagging
Automatic merge from submit-queue (batch tested with PRs 43313, 43257, 43271, 43307)

Fix AWS untagged instances

To revert to 1.5 behaviour we need to consider untagged
instances if no clusterID has been specified or found.

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

cc @justinsb
2017-03-17 15:12:35 -07:00
Kubernetes Submit Queue eb43cd5eb3 Merge pull request #43271 from liggitt/affinity-namespace
Automatic merge from submit-queue (batch tested with PRs 43313, 43257, 43271, 43307)

Remove 'all namespaces' meaning of empty list in PodAffinityTerm

Removes the distinction between `null` and `[]` for the PodAffinityTerm#namespaces field (option 4 discussed in https://github.com/kubernetes/kubernetes/issues/43203#issuecomment-287237992), since we can't distinguish between them in protobuf (and it's a less than ideal API)

Leaves the door open to reintroducing "all namespaces" function via a dedicated field or a dedicated token in the list of namespaces

Wanted to get a PR open and tests green in case we went with this option.

Not sure what doc/release-note is needed if the "all namespaces" function is not present in 1.6
2017-03-17 15:12:33 -07:00
Janet Kuo 263d605112 Auto-generate 2017-03-17 14:42:37 -07:00
Kubernetes Submit Queue f37cffcf4e Merge pull request #43239 from enisoc/kubectl-controller-ref
Automatic merge from submit-queue

kubectl: Use v1.5-compatible ownership logic when listing dependents.

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

This restores compatibility between kubectl 1.6 and clusters running Kubernetes 1.5.x. It introduces transitional ownership logic in which the client considers ControllerRef when it exists, but does not require it to exist.

If we were to ignore ControllerRef altogether (pre-1.6 client behavior), we would introduce a new failure mode in v1.6 because controllers that used to get stuck due to selector overlap will now make progress. For example, that means when reaping ReplicaSets of an overlapping Deployment, we would risk deleting ReplicaSets belonging to a different Deployment that we aren't about to delete.

This transitional logic avoids such surprises in 1.6 clusters, and does no worse than kubectl 1.5 did in 1.5 clusters. To prevent this when kubectl 1.5 is used against 1.6 clusters, we can cherrypick this change.

**Which issue this PR fixes**:

Fixes #43159

**Special notes for your reviewer**:

**Release note**:
```release-note
```
2017-03-17 14:25:38 -07:00
Janet Kuo bca3691029 Use json field names instead of go field names 2017-03-17 14:24:21 -07:00
Janet Kuo 4cebc865dc Update description of fields for DaemonSet rolling udpate 2017-03-17 14:12:00 -07:00
Dawn Chen d419efbe71 Fix unittest reflecting the default taint tolerations change for static
pods.
2017-03-17 14:06:34 -07:00
Hemant Kumar 1de4c5bbe0 Fix AWS untagged instances
To revert to 1.5 behaviour we need to consider untagged
instances if no clusterID has been specified or found.
2017-03-17 14:05:52 -04:00
Kubernetes Submit Queue fe08925805 Merge pull request #42869 from better88/patch-1
Automatic merge from submit-queue

Fix revision when SetDeploymentRevision

When some oldRSs be deleted or cleared(eg. revisionHistoryLimit set 0), the revision for  SetDeploymentRevision is incorrect
2017-03-17 10:55:29 -07:00
Dawn Chen d26e906191 Apply taint tolerations for NoExecute for all static pods. 2017-03-17 09:50:27 -07:00
better88 6c13a02026 Fix revision when SetDeploymentRevision 2017-03-17 23:23:41 +08:00
André Martins cecc03ca8f kubectl: Adding IPv6 brackets for IPv6 endpoints
This fixes the lack of IPv6 when printing the IP:Port tuple with kubectl
describe command.

Signed-off-by: André Martins <aanm90@gmail.com>
2017-03-17 15:14:51 +00:00
Tomas Smetana 6898bc60ce Attach/detach controller: fix potential race in constructor 2017-03-17 13:34:53 +01:00
Julien Balestra cd7c480f86 Kubelet:rkt Create any missing hostPath Volumes 2017-03-17 10:47:02 +01:00
Kubernetes Submit Queue 8abb3ae7b2 Merge pull request #43269 from smarterclayton/fix_staging
Automatic merge from submit-queue

protobuf generation modifies types.go, which needs to be copied out

This was broken when we moved to the build container, but no one
noticed. Made it so that we get a test error if a field in a registered type has a json tag with no protobuf tag.

Fixes #35486
2017-03-17 00:10:25 -07:00
Kubernetes Submit Queue cdcec3f32b Merge pull request #43235 from caesarxuchao/tolerator-tpr-monitor-failure
Automatic merge from submit-queue

construction of GC should not fail for restmapper error caused by tpr

Fix https://github.com/kubernetes/kubernetes/issues/43147.

The issue is that GC will fail its initialization due to an RESTMapper error cause by tpr. This PR lets GC log the error instead of failing.
2017-03-16 23:23:31 -07:00
Kubernetes Submit Queue c119c254d6 Merge pull request #43259 from thockin/nodeport-allocation-polarity
Automatic merge from submit-queue

Fix polarity of a test in NodePort allocation

The result of this was that an update to a Service would release the
NodePort temporarily (the repair loop would fix it in a minute).  During
that window, another Service could get allocated that Port.

Fixes #43233
2017-03-16 22:39:30 -07:00
Jordan Liggitt 46b0da4320
generated files 2017-03-17 00:32:38 -04:00
Jordan Liggitt 8fda1c716b
Remove 'all namespaces' meaning of empty list in PodAffinityTerm 2017-03-17 00:32:07 -04:00
Clayton Coleman 6d2a3bdd60
Add a test that verifies all structs have protobuf tags 2017-03-17 00:29:14 -04:00
Kubernetes Submit Queue 4dffb61772 Merge pull request #42509 from caesarxuchao/comment
Automatic merge from submit-queue (batch tested with PRs 43254, 43255, 43184, 42509)

Update comment on the default DeletionPropagationPolicy

This is fixing the API doc, so apply the 1.6 milestone.

I'll run update-all.sh before merge.
2017-03-16 19:02:28 -07:00
NickrenREN aeedcbfb5e small change to ControlleeExpectations 2017-03-17 09:48:32 +08:00
Tim Hockin 348f7a7036 Don't use global rand for nodeport and IP allocs
Seed it at contruction.
2017-03-16 17:25:07 -07:00
Tim Hockin cb95c479cb Fix polarity of a test in NodePort allocation
The result of this was that an update to a Service would release the
NodePort temporarily (the repair loop would fix it in a minute).  During
that window, another Service could get allocated that Port.
2017-03-16 17:19:26 -07:00
Kubernetes Submit Queue a10c8f49ff Merge pull request #42931 from piosz/annotation-fix
Automatic merge from submit-queue

Setup fluentd-ds-ready label in startup script not in kubelet

fix #42840

``` release-note
TBD
```
2017-03-16 16:10:12 -07:00
Chao Xu 2378d39771 update-all.sh 2017-03-16 15:58:30 -07:00
Chao Xu 80686e67aa update comment on the default DeletionPropagationPolicy 2017-03-16 15:43:05 -07:00
Anthony Yeh de92f90f12 Deployment: Clear obsolete OverlapAnnotaiton.
This ensures old clients will not assume the Deployment is blocked.
2017-03-16 14:52:01 -07:00
Chao Xu 33da82bc67 construction of GC should not fail for restmapper error caused by tpr 2017-03-16 14:19:17 -07:00
Anthony Yeh fa23729a6d kubectl: Use v1.5-compatible ownership logic when listing dependents.
In particular, we should not assume ControllerRefs are necessarily set.
However, we can still use ControllerRefs that do exist to avoid
interfering with controllers that do use it.
2017-03-16 12:28:38 -07:00
Anthony Yeh 725ec0cc5e kubectl: Check for Deployment overlap annotation in reaper.
This effectively reverts the client-side changes in
cec3899b96.
We have to maintain the old behavior on the client side to support
version skew when talking to old servers that set the annotation.

However, the new server-side behavior is still to NOT set the
annotation.
2017-03-16 12:28:28 -07:00
Seth Jennings 753484d073 kubectl: fall back to computing QoS class if server does not populate 2017-03-16 12:24:59 -05:00
Yu-Ju Hong b1e6e7f774 Use the assert/require package in kubelet unit tests
This reduce the lines of code and improve readability.
2017-03-16 10:21:44 -07:00
Piotr Szczesniak 9bd05bdee4 Setup fluentd-ds-ready label in startup script not in kubelet 2017-03-16 13:18:31 +01:00
Kubernetes Submit Queue 754effe332 Merge pull request #42949 from wenlxie/master
Automatic merge from submit-queue

recycle pod can't get the event since channel closed

What this PR does / why we need it:
We create a   hostPath type  PV with "Recycle" persistentVolumeReclaimPolicy,  and bind a PVC to it, but after deleted the PVC, the PV cannot become to available status. This is happened after we upgrade etcd to 3.0. The reason is:
If the channel used to get the pod message and events been abnormal closed(for example, the event channel maybe closed because of "required revision has been compacted" error), the function internalRecycleVolumeByWatchingPodUntilCompletion will stuck in a loop, and the recycle pod will not been deleted, the PV can not become into available status

Special notes for your reviewer:
None
Release note:
2017-03-16 02:41:11 -07:00
Kubernetes Submit Queue 2bec20ce55 Merge pull request #43122 from liggitt/protobuf-default
Automatic merge from submit-queue

Prevent protobuf storage with etcd2

Prevents accidentally storing protobuf content in etcd2 when upgrading to 1.6

c.f. https://github.com/kubernetes/kubernetes/issues/42976#issuecomment-286537139

```release-note
if kube-apiserver is started with `--storage-backend=etcd2`, the media type `application/json` is used.
```
2017-03-15 22:07:03 -07:00
shiywang 917a0b6f1b fix kubectl config return 0 on error 2017-03-16 08:34:51 +08:00
Kubernetes Submit Queue ba25afd278 Merge pull request #40964 from tanshanshan/kubelet-unit-test
Automatic merge from submit-queue (batch tested with PRs 40964, 42967, 43091, 43115)

Improve code coverage for pkg/kubelet/status/generate.go

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

Improve code coverage for pkg/kubelet/status/generate.go  from #39559

Thanks.

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-03-15 16:08:23 -07:00
Jordan Liggitt 87e32c7532
Force etcd2 to use application/json, add base64-wrapper decoder as fallback 2017-03-15 11:24:12 -04:00
Kubernetes Submit Queue 0afdcfcaf6 Merge pull request #43114 from enisoc/deployment-upgrade-test
Automatic merge from submit-queue

Fix Deployment upgrade test.

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

When the upgrade test operates on Deployments in a pre-1.6 cluster (i.e. during the Setup phase), it needs to use the v1.5 deployment/util logic. In particular, the v1.5 logic does not filter children to only those with a matching ControllerRef.

**Which issue this PR fixes**:

Fixes #42738

**Special notes for your reviewer**:

**Release note**:
```release-note
```
cc @kubernetes/sig-apps-pr-reviews
2017-03-15 07:03:19 -07:00
Kubernetes Submit Queue df97434e8a Merge pull request #43110 from caesarxuchao/fix-42952
Automatic merge from submit-queue (batch tested with PRs 43106, 43110)

Wait for garbagecollector to be synced in test

Fix #42952

Without the `cache.WaitForCacheSync` in the test, it's possible for the GC to get a merged event of RC's creation and its update (update to deletionTimestamp != 0), before GC gets the creation event of the pod, so it's possible the GC will handle the foreground deletion of the RC before it adds the Pod to the dependency graph, thus the race.

With the `cache.WaitForCacheSync` in the test, because GC runs a single thread to process graph changes, it's guaranteed the Pod will be added to the dependency graph before GC handles the foreground deletion of the RC.

Note that this pull fixes the race in the test. The race described in the first point of #26120 still exists.
2017-03-15 06:14:21 -07:00
Kubernetes Submit Queue 222f69cf3c Merge pull request #43030 from yujuhong/rm_corrupted_checkpoint
Automatic merge from submit-queue (batch tested with PRs 42747, 43030)

dockershim: remove corrupted sandbox checkpoints

This is a workaround to ensure that kubelet doesn't block forever when
the checkpoint is corrupted.

This is a workaround for #43021
2017-03-14 22:56:20 -07:00
Kubernetes Submit Queue 1b4433d4c3 Merge pull request #42747 from dcbw/iptables-proxy-optimize
Automatic merge from submit-queue (batch tested with PRs 42747, 43030)

kube-proxy/iptables: optimize endpoint map creation by excluding invalid endpoints earlier

We don't need to do as much work as we were doing, if we exclude invalid endpoints earlier in the endpoints processing.

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

@freehan @liggitt @thockin if you could review this with a fine-toothed comb...  I can't immediately think of why invalid endpoints would be useful for the HealthChecker, and this PR prevents the HC from seeing these endpoints.
2017-03-14 22:56:18 -07:00
Kubernetes Submit Queue 792a24ac01 Merge pull request #43118 from yujuhong/sync_checkpoint
Automatic merge from submit-queue

dockershim: call sync() after writing the checkpoint

This ensures the checkpoint files are persisted.

This fixes #43021
2017-03-14 21:12:49 -07:00
Brendan Burns ea23cabfa0 Add support for bring-your-own ip address. 2017-03-14 20:36:55 -07:00
Kubernetes Submit Queue fea42bade0 Merge pull request #42854 from vladimirvivien/scaleio-k8s-fix-readOnly
Automatic merge from submit-queue (batch tested with PRs 42854, 43105, 43090)

Update ScaleIO volume plugin default readOnly value

This commit updates the code to set readOnly attribute to be set to false.

**What this PR does / why we need it**:
This PR is a minor fix that updates the default value of `readOnly` attribute to `false`.

**Release note**:

```release-note
NONE
```
2017-03-14 18:44:18 -07:00
Yu-Ju Hong 48afc7d4e0 dockershim: call sync() after writing the checkpoint
This ensures the checkpoint files are persisted.
2017-03-14 18:36:51 -07:00
Pengfei Ni 91616f666a kubelet: check and enforce minimum docker api version 2017-03-15 09:28:06 +08:00
Anthony Yeh 0c015927c4 Fix Deployment upgrade test.
When the upgrade test operates on Deployments in a pre-1.6 cluster
(i.e. during the Setup phase), it needs to use the v1.5 deployment/util
logic. In particular, the v1.5 logic does not filter children to only
those with a matching ControllerRef.
2017-03-14 17:39:29 -07:00
Chao Xu 0605ba7a6d wait for garbagecollector to be synced in test 2017-03-14 16:19:33 -07:00
Kubernetes Submit Queue f8dd2569a1 Merge pull request #42991 from jsafrane/fix-default-beta
Automatic merge from submit-queue (batch tested with PRs 42775, 42991, 42968, 43029)

Remove 'beta' from default storage class annotation

I forgot to update default storage class annotation in my storage.k8s.io/v1beta1 -> v1 PRs. Let's fix it before 1.6 is released.

I consider it as a bugfix, in #40088 I already updated the release notes to include non-beta annotation  `storageclass.kubernetes.io/is-default-class`

```release-note
NONE
```


@kubernetes/sig-storage-pr-reviews 
@msau42, please help with merging.
2017-03-14 13:52:41 -07:00
Kubernetes Submit Queue c11498a34d Merge pull request #42775 from gyliu513/kubectl-taint
Automatic merge from submit-queue (batch tested with PRs 42775, 42991, 42968, 43029)

`kubectl taint` update for `NoExecute`.

**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**:
Fixes #42774
**Release note**:

```release-note
```
2017-03-14 13:52:39 -07:00
Kubernetes Submit Queue a8d8542fc7 Merge pull request #42765 from janetkuo/ds-update-validation-fix
Automatic merge from submit-queue

Add DaemonSet templateGeneration validation and tests, and fix a bunch of validation test errors

For DaemonSet update:
1. Validate that templateGeneration is increased when and only when template is changed
1. Validate that templateGeneration is never decreased
1. Added validation tests for templateGeneration 
1. Fix a bunch of errors in validate tests
   - fake tests: almost all validation test error cases failed on "missing resource version", "name changes", "missing update strategy", "selector/template labels mismatch", not on the real validation we wanted to test
   - some error cases should be success cases

@kargakis @lukaszo @kubernetes/sig-apps-bugs 

*I've verified locally that all DaemonSet e2e tests pass with this change.*
2017-03-14 12:54:49 -07:00
Chao Xu 68effc7b2d fix fake_event_expansion.go 2017-03-14 11:52:49 -07:00
Vladimir Vivien 0715b32439 Update ScaleIO volume plugin default readOnly value
This commit updates the code to set the default value of the readOnly attribute to false.
It also updates the example docs to add full list of supported plugin attributes and doc.
2017-03-14 14:19:48 -04:00
Timothy St. Clair e729c57534 Add the ability to lock on ConfigMaps to support HA for
self hosted components w/o locking on an endpoint which
has a series of issues.
2017-03-14 12:55:46 -05:00
Kubernetes Submit Queue 70b3848bce Merge pull request #42935 from yifan-gu/fix_flock
Automatic merge from submit-queue (batch tested with PRs 42942, 42935)

pkg/util/flock: Fix the flock so it actually locks.

With this PR, the second call to `Acquire()` will block unless the lock is released (process exits).
Also removed the memory mutex in the previous code since we don't need `Release()` here so no need to save and protect the local fd.

Fix #42929.
2017-03-14 10:19:18 -07:00
Kubernetes Submit Queue 6de28fab7d Merge pull request #42942 from vishh/gpu-cont-fix
Automatic merge from submit-queue (batch tested with PRs 42942, 42935)

[Bug] Handle container restarts and avoid using runtime pod cache while allocating GPUs

Fixes #42412

**Background**
Support for multiple GPUs is an experimental feature in v1.6. 
Container restarts were handled incorrectly which resulted in stranding of GPUs
Kubelet is incorrectly using runtime cache to track running pods which can result in race conditions (as it did in other parts of kubelet). This can result in same GPU being assigned to multiple pods.

**What does this PR do**
This PR tracks assignment of GPUs to containers and returns pre-allocated GPUs instead of (incorrectly) allocating new GPUs.
GPU manager is updated to consume a list of active pods derived from apiserver cache instead of runtime cache.
Node e2e has been extended to validate this failure scenario.

**Risk**
Minimal/None since support for GPUs is an experimental feature that is turned off by default. The code is also isolated to GPU manager in kubelet.

**Workarounds**
In the absence of this PR, users can mitigate the original issue by setting `RestartPolicyNever`  in their pods.
There is no workaround for the race condition caused by using the runtime cache though.
Hence it is worth including this fix in v1.6.0.

cc @jianzhangbjz @seelam @kubernetes/sig-node-pr-reviews 

Replaces #42560
2017-03-14 10:19:17 -07:00
Lou Yihua 64f2b0c0fc Update generated & client-go 2017-03-14 23:49:21 +08:00
Lou Yihua 63f1b077dc Add Host field to TCPSocketAction
Currently, TCPSocketAction always uses Pod's IP in connection. But when a
pod uses the host network, sometimes firewall rules may prevent kubelet
from connecting through the Pod's IP. This PR introduces the 'Host' field
for TCPSocketAction, and if it is set to non-empty string, the probe will
be performed on the configured host rather than the Pod's IP. This gives
users an opportunity to explicitly specify 'localhost' as the target for
the above situations.
2017-03-14 23:48:28 +08:00
shiywang 52e4be2578 Be able to specify the timeout to wait for pod for kubectl logs/attach 2017-03-14 23:00:31 +08:00
Kubernetes Submit Queue f1e9004da9 Merge pull request #42927 from Random-Liu/fix-kubelet-panic
Automatic merge from submit-queue (batch tested with PRs 42802, 42927, 42669, 42988, 43012)

Fix kubelet panic in cgroup manager.

Fixes https://github.com/kubernetes/kubernetes/issues/42920.
Fixes https://github.com/kubernetes/kubernetes/issues/42875
Fixes #42927 
Fixes #43059

Check the error in walk function, so that we don't use info when there is an error.

@yujuhong @dchen1107 @derekwaynecarr @vishh /cc @kubernetes/sig-node-bugs
2017-03-14 07:31:31 -07:00
Andy Goldstein 433fc606c6 Convert PrefixWriter to an interface
Convert PrefixWriter to an interface to allow other packages to create
instances. This is needed for downstream projects such as OpenShift.
2017-03-14 10:31:13 -04:00
zhengjiajin 996200b71e update annotations 2017-03-14 20:03:31 +08:00
Guangya Liu ab94015ee8 `kubectl taint` update for `NoExecute`. 2017-03-14 18:24:40 +08:00
wenlxie 33385214bc recycle pod can't get the event since the channel been closed 2017-03-14 10:35:08 +08:00
Yu-Ju Hong 035afab901 dockershim: remove corrupted sandbox checkpoints
This is a workaround to ensure that kubelet doesn't block forever when
the checkpoint is corrupted.
2017-03-13 15:41:01 -07:00
Yifan Gu a489bd2674 pkg/util/flock: Fix the flock so it actually locks.
With this PR, the second call to `Acquire()` will block unless the lock is released (process exits).
Also removed the memory mutex in the previous code since we don't need `Release()` here so no need to save and protect the local fd.

Fix #42929.
2017-03-13 14:24:59 -07:00
Random-Liu e6341cc3c7 Fix kubelet panic in cgroup manager. 2017-03-13 12:06:08 -07:00
Vishnu kannan ad743a922a remove dead code in gpu manager
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-03-13 10:58:26 -07:00
Vishnu kannan ff158090b3 use active pods instead of runtime pods in gpu manager
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-03-13 10:58:26 -07:00
Vishnu Kannan 8ed9bff073 handle container restarts for GPUs
Signed-off-by: Vishnu Kannan <vishnuk@google.com>
2017-03-13 10:58:26 -07:00
Derek Carr 39b380c7bd Unit test quota for nodeport associated with loadbalancer 2017-03-13 11:21:56 -04:00
Jan Safranek 06feaccead Remove 'beta' from default storage class annotation 2017-03-13 12:53:41 +01:00
Kubernetes Submit Queue e1248bcbbc Merge pull request #42962 from k82cn/fix_min_tolerant_time
Automatic merge from submit-queue

Fixed incorrect result of getMinTolerationTime.

For the following case, `getMinTolerationTime` should return one; but  it returned -1 :
1. for tolerations[0], TolerationSeconds is nil, minTolerationTime is not set 
2. for tolerations[1], it's TolerationSeconds (1) is bigger than `minTolerationTime`, so minTolerationTime is still -1 which means infinite.

```
+		{
+			tolerations: []v1.Toleration{
+				{
+					TolerationSeconds: nil,
+				},
+				{
+					TolerationSeconds: &one,
+				},
+			},
+		},
```
2017-03-12 23:55:39 -07:00
Kubernetes Submit Queue 65ddace3ed Merge pull request #42702 from smarterclayton/printer_owners
Automatic merge from submit-queue

Add pkg/printers OWNERS

Should also include more sig-api-machinery as this will be moving to server side
2017-03-12 21:04:57 -07:00
Hemant Kumar a4a3d20934 Fix vsphere selinux support
Managed flag must be true for SELinux relabelling to work
for vsphere.
2017-03-12 23:21:07 -04:00
tanshanshan 26ab52a3cb fix 2017-03-13 10:00:19 +08:00
Klaus Ma d0e04427d7 Fixed incorrect result of getMinTolerationTime. 2017-03-12 20:21:14 +08:00
Kubernetes Submit Queue e315c388b2 Merge pull request #42944 from liggitt/patch-defaulting
Automatic merge from submit-queue

Ensure patched objects are defaulted correctly

Restores defaulting behavior for patch API calls removed in e34e1abe33 (diff-517d1b81963bbc7c9b0a16e6eb3c0e2f)

Restores the unit test that ensures we get a defaulted result after applying a patch

Fixes https://github.com/kubernetes/kubernetes/issues/42764
Fixes #42834
2017-03-11 17:49:41 -08:00
Kubernetes Submit Queue 3f660a9779 Merge pull request #42913 from aveshagarwal/master-fix-taint-based-eviction-no-node-cidr
Automatic merge from submit-queue

Fix taint based pod eviction for clusters where controller manager is not running with allocate-node-cidrs set

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

In my cluster, I have not set allocate-node-cidr, and It is causing taint based pod eviction to fail. 

@gmarek @kubernetes/sig-scheduling-bugs @davidopp @derekwaynecarr
2017-03-11 14:02:45 -08:00
Cao Shufeng b2f530d756 [cli] fix Generator's error messages
Invalid variables are used when format error messages. This change
fixes them.
2017-03-11 02:09:52 -05:00
Kubernetes Submit Queue 8cb14a4f7f Merge pull request #42755 from aveshagarwal/master-fix-default-toleration-seconds
Automatic merge from submit-queue (batch tested with PRs 41794, 42349, 42755, 42901, 42933)

Fix DefaultTolerationSeconds admission plugin

DefaultTolerationSeconds is not working as expected. It is supposed to add default tolerations (for unreachable and notready conditions). but no pod was getting these toleration. And api server was throwing this error:

```
Mar 08 13:43:57 fedora25 hyperkube[32070]: E0308 13:43:57.769212   32070 admission.go:71] expected pod but got Pod
Mar 08 13:43:57 fedora25 hyperkube[32070]: E0308 13:43:57.789055   32070 admission.go:71] expected pod but got Pod
Mar 08 13:44:02 fedora25 hyperkube[32070]: E0308 13:44:02.006784   32070 admission.go:71] expected pod but got Pod
Mar 08 13:45:39 fedora25 hyperkube[32070]: E0308 13:45:39.754669   32070 admission.go:71] expected pod but got Pod
Mar 08 14:48:16 fedora25 hyperkube[32070]: E0308 14:48:16.673181   32070 admission.go:71] expected pod but got Pod
```

The reason for this error is that the input to admission plugins is internal api objects not versioned objects so expecting versioned object is incorrect. Due to this, no pod got desired tolerations and it always showed:

```
Tolerations: <none>
```

After this fix, the correct  tolerations are being assigned to pods as follows:

```
Tolerations:	node.alpha.kubernetes.io/notReady=:Exists:NoExecute for 300s
		node.alpha.kubernetes.io/unreachable=:Exists:NoExecute for 300s
```

@davidopp @kevin-wangzefeng @kubernetes/sig-scheduling-pr-reviews @kubernetes/sig-scheduling-bugs @derekwaynecarr 

Fixes https://github.com/kubernetes/kubernetes/issues/42716
2017-03-10 22:02:18 -08:00
Jordan Liggitt 464db160b4
Ensure patched objects are defaulted correctly 2017-03-10 22:07:10 -05:00
Kubernetes Submit Queue 59aa924a9b Merge pull request #42642 from fraenkel/envfrom
Automatic merge from submit-queue

Invalid environment var names are reported and pod starts

When processing EnvFrom items, all invalid keys are collected and
reported as a single event.

The Pod is allowed to start.

fixes #42583
2017-03-10 17:37:31 -08:00
Kubernetes Submit Queue 9590f694c8 Merge pull request #41830 from irfanurrehman/fed-rbac-1
Automatic merge from submit-queue

[Federation] Kubefed Init should use the right RBAC API version clientset

**What this PR does / why we need it**:
Implements the need as described in https://github.com/kubernetes/kubernetes/issues/41263
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
https://github.com/kubernetes/kubernetes/issues/41263

**Special notes for your reviewer**:
@madhusudancs @shashidharatd @marun 
cc @kubernetes/sig-federation-bugs

**Release note**:

```
NONE
```
2017-03-10 15:56:47 -08:00
Kubernetes Submit Queue 486ec2b7c9 Merge pull request #42862 from caesarxuchao/sync-warning
Automatic merge from submit-queue (batch tested with PRs 38805, 42362, 42862)

Let GC print specific message for RESTMapping failure

Make the error messages reported in https://github.com/kubernetes/kubernetes/issues/39816 to be more specific, also only print the message once.

I'll also update the garbage collector's doc to clearly state we don't support tpr yet.

We'll wait for the watchable discovery feature (@sttts are you going to work on that?) to land in 1.7, and then enable the garbage collector to handle TPR.

cc @hongchaodeng @MikaelCluseau @djMax
2017-03-10 14:01:23 -08:00
Kubernetes Submit Queue d2d3884f83 Merge pull request #42362 from soltysh/deployment_generators
Automatic merge from submit-queue (batch tested with PRs 38805, 42362, 42862)

Fix deployment generator after introducing deployments in apps/v1beta1

This PR does two things:

1. Switches all generator to produce versioned objects, to bypass the problem of having an object in multiple versions, which then results in not having stable generator (iow. producing exactly the same object).
2. Introduces new generator for `apps/v1beta1` deployments.

@kargakis @janetkuo ptal

@kubernetes/sig-apps-pr-reviews @kubernetes/sig-cli-pr-reviews ptal

This is a followup to https://github.com/kubernetes/kubernetes/pull/39683, so I'm adding 1.6 milestone.

```release-note
Introduce new generator for apps/v1beta1 deployments
```
2017-03-10 14:01:21 -08:00
Kubernetes Submit Queue e2218290cf Merge pull request #42444 from jingxu97/Mar/deleteVolume
Automatic merge from submit-queue (batch tested with PRs 42608, 42444)

Return nil when deleting non-exist GCE PD

When gce cloud tries to delete a disk, if the disk could not be found
from the zones, the function should return nil error. This modified behavior is also consistent with AWS
2017-03-10 12:50:24 -08:00
Avesh Agarwal c3a80719a2 Fix taint based pod eviction for clusters where controller manager
is not running with --allocate-node-cidrs set.
2017-03-10 15:39:21 -05:00
Chao Xu d7aef0a338 Let GC print specific message for RESTMapping failure 2017-03-10 11:38:57 -08:00
Kris ee4227f4bf Remove krousey from some OWNERS files 2017-03-10 11:12:29 -08:00
Kubernetes Submit Queue e261cabb09 Merge pull request #42877 from gmarek/taint_cleanup
Automatic merge from submit-queue (batch tested with PRs 42877, 42853)

Remove unused functions and make logs slightly better

Zero risk cleanup, removing function that are not used anymore, and adding few more logs to help debugging problems.

cc @aveshagarwal
2017-03-10 09:54:21 -08:00
Kubernetes Submit Queue 18ffc95308 Merge pull request #36704 from fabxc/client-metrics2
Automatic merge from submit-queue

Use Prometheus instrumentation conventions

The `System` and `Subsystem` parameters are subject to removal.
(x-ref: https://github.com/prometheus/client_golang/issues/240)

All metrics should use base units, which is seconds in the duration
case.

Counters should always end in `_total` and metrics should avoid
referring to potential label dimensions. Those should rather be
mentioned in the documentation string.

@kubernetes/sig-instrumentation 

Reference docs:
https://prometheus.io/docs/practices/instrumentation/
https://prometheus.io/docs/practices/naming/

**Release note**:
```
Breaking change: Renamed REST client Prometheus metrics to follow the instrumentation conventions ("request_latency_microseconds" -> "rest_client_request_latency_seconds", "request_status_codes" -> "rest_client_requests_total"). Please update your alerting pipeline if you rely on them. 
```
2017-03-10 09:04:18 -08:00
Maciej Szulik 597a359c38 Error out when cronjob generator not specified, but cronjobs are not available 2017-03-10 12:08:01 +01:00
Maciej Szulik aa4390750c Introduce new generator for apps/v1beta1 deployments 2017-03-10 12:08:01 +01:00
Maciej Szulik 1049dad0a4 Switch generators to use versioned objects 2017-03-10 12:08:01 +01:00
gmarek fddac63c27 Remove unused functions and make logs slightly better 2017-03-10 11:57:51 +01:00
Kubernetes Submit Queue c38717b73a Merge pull request #42843 from janetkuo/ds-status-kubectl
Automatic merge from submit-queue

Add new DaemonSetStatus to kubectl printer and describer

@kargakis @lukaszo @kubernetes/sig-apps-pr-reviews @kubernetes/sig-cli-pr-reviews 

```release-note
Add new DaemonSet status fields to kubectl printer and describer. 
```
2017-03-10 01:56:59 -08:00
timchenxiaoyu c295514443 accurate hint 2017-03-10 16:41:51 +08:00
Fabian Reinartz 2b66b49a2f Use Histogram instead of Summary
A histogram allows to aggregate by labels and calculate more
comprehensive quantiles.
2017-03-10 07:24:38 +01:00
Fabian Reinartz 49e2074f74 Use Prometheus instrumentation conventions
The `System` and `Subsystem` parameters are subject to removal.
(x-ref: https://github.com/prometheus/client_golang/issues/240)

All metrics should use base units, which is seconds in the duration
case.

Counters should always end in `_total` and metrics should avoid
referring to potential label dimensions. Those should rather be
mentioned in the documentation string.
2017-03-10 07:24:38 +01:00
Kubernetes Submit Queue ab6fecfa3a Merge pull request #42811 from gnufied/validation-no-probe
Automatic merge from submit-queue (batch tested with PRs 42811, 42859)

 Validation PVs for mount options

We are going to move the validation in its own package and we will be calling validation for individual volume types as needed.

Fixes https://github.com/kubernetes/kubernetes/issues/42573
2017-03-09 18:47:52 -08:00
Avesh Agarwal 9f533de80d Fix DefaultTolerationSeconds admission plugin. It was using
versioned object whereas admission plugins operate on internal objects.
2017-03-09 20:24:43 -05:00
Kubernetes Submit Queue 1f5708d460 Merge pull request #42640 from lukaszo/ds-updates-fix
Automatic merge from submit-queue (batch tested with PRs 42024, 42780, 42808, 42640)

kubectl: respect DaemonSet strategy parameters for rollout status

It handles "after-merge" comments from #41116

cc @kargakis @janetkuo 

I will add one more e2e test later. I need to handle some in company stuff.
2017-03-09 16:41:54 -08:00
Kubernetes Submit Queue 7002c53a9c Merge pull request #42808 from ravisantoshgudimetla/nodecontroller_eviction_flake
Automatic merge from submit-queue (batch tested with PRs 42024, 42780, 42808, 42640)

Node controller test flake 39975 with delay for try function

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

/cc @ncdc @gmarek @liggitt
2017-03-09 16:41:52 -08:00
Kubernetes Submit Queue 9498a1270f Merge pull request #42024 from luomiao/fix-vsphere-remove-port
Automatic merge from submit-queue

Remove VCenterPort from vsphere cloud provider.

**What this PR does / why we need it**:
Address a bug inside vsphere cloud provider when a port number other than 443 is specified inside the config file.
The url which is used for communicating with govmomi should not include port number.
A port number other than 443 will result in 404 error.
VCenterPort stays in VSphereConfig structure for backward compatibility.

**Which issue this PR fixes** : fixes https://github.com/kubernetes/kubernetes-anywhere/issues/338
2017-03-09 15:59:33 -08:00
Janet Kuo 39857f4865 Add new DaemonSetStatus to kubectl printer and describer 2017-03-09 15:45:17 -08:00
Hemant Kumar 12d6b87894 Validation PVs for mount options
We are going to move the validation in its own package
and we will be calling validation for individual volume types
as needed.
2017-03-09 18:24:37 -05:00
Kubernetes Submit Queue d790851c8f Merge pull request #42694 from dchen1107/master
Automatic merge from submit-queue (batch tested with PRs 42734, 42745, 42758, 42814, 42694)

Dropped docker 1.9.x support. Changed the minimumDockerAPIVersion to

1.22

cc/ @Random-Liu @yujuhong 

We talked about dropping docker 1.9.x support for a while. I just realized that we haven't really done it yet. 

```release-note
Dropped the support for docker 1.9.x and the belows. 
```
2017-03-09 15:07:00 -08:00
Kubernetes Submit Queue 5a47671614 Merge pull request #42814 from yujuhong/cri-kubemark-3rd-time-is-the-charm
Automatic merge from submit-queue (batch tested with PRs 42734, 42745, 42758, 42814, 42694)

kubemark: enable CRI in the hollow kubelet
2017-03-09 15:06:58 -08:00
Solly Ross 8337031bf5 Rate limit HPA controller to sync period
Since the HPA controller pulls information from an external source that
makes no guarantees about consistency, it's possible for the HPA
to get into an infinite update loop -- if the metrics change with
every query, the HPA controller will run it's normal reconcilation,
post a status update, see that status update itself, fetch new metrics,
and if those metrics are different, post another status update, and
repeat.  This can lead to continuously updating a single HPA.

By rate-limiting each HPA to once per sync interval, we prevent this
from happening.
2017-03-09 16:32:01 -05:00
Dawn Chen 69eaea2fcc Merge pull request #42779 from dashpole/fix_status
[Bug Fix] Allow Status Updates for Pods that can be deleted
2017-03-09 13:23:00 -08:00
ravisantoshgudimetla 7d444263a5 Change from Micro to Milli for introducing delay 2017-03-09 14:10:28 -05:00
Łukasz Oleś b32afe1720 kubectl: respect DaemonSet strategy parameters for rollout status
It handles "after-merge" comments from #41116
2017-03-09 20:02:52 +01:00
Jordan Liggitt 9262c57ba8
Switch clusterinfo to print recommended proxy endpoints 2017-03-09 13:07:02 -05:00
Yu-Ju Hong 9878c1884d kubemark: enable CRI in the hollow kubelet 2017-03-09 09:52:17 -08:00
David Ashpole e3e0bc6ce0 do not skip pods that can be deleted 2017-03-09 09:35:50 -08:00
Kubernetes Submit Queue aad34ad26e Merge pull request #42553 from k82cn/autogen_proto
Automatic merge from submit-queue (batch tested with PRs 42786, 42553)

Updated auto generated protobuf codes.

Generated by `./hack/update-generated-protobuf-dockerized.sh` in Mac.
2017-03-09 07:37:36 -08:00
Kubernetes Submit Queue 9cfc4f1a10 Merge pull request #42739 from yujuhong/created_time
Automatic merge from submit-queue (batch tested with PRs 42762, 42739, 42425, 42778)

FakeDockerClient: add creation timestamp

This fixes #42736
2017-03-09 02:51:38 -08:00
Kubernetes Submit Queue 4cf553f78e Merge pull request #42767 from Random-Liu/cleanup-infra-container-on-error
Automatic merge from submit-queue (batch tested with PRs 42768, 42760, 42771, 42767)

Stop sandbox container when hit network error.

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

This PR stops the sandbox container when hitting a network error.
This PR also adds a unit test for it.

I'm not sure whether we should try teardown pod network after `SetUpPod` failure. We don't do that in dockertools https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/dockertools/docker_manager.go#L2276.

@yujuhong @freehan
2017-03-09 00:08:01 -08:00
Michael Fraenkel cadc8a141d Update docs and client 2017-03-09 07:34:56 +00:00
Michael Fraenkel c4d07466e8 Invalid environment var names are reported and pod starts
When processing EnvFrom items, all invalid keys are collected and
reported as a single event.

The Pod is allowed to start.
2017-03-09 07:21:53 +00:00
Kubernetes Submit Queue 6fac75c80a Merge pull request #42768 from yujuhong/fix_sandbox_listing
Automatic merge from submit-queue

dockershim: Fix the race condition in ListPodSandbox

In ListPodSandbox(), we
 1. List all sandbox docker containers
 2. List all sandbox checkpoints. If the checkpoint does not have a
    corresponding container in (1), we return partial result based on
    the checkpoint.

The problem is that new PodSandboxes can be created between step (1) and
(2). In those cases, we will see the checkpoints, but not the sandbox
containers. This leads to strange behavior because the partial result
from the checkpoint does not include some critical information. For
example, the creation timestamp'd be zero, and that would cause kubelet's
garbage collector to immediately remove the sandbox.

This change fixes that by getting the list of checkpoints before listing
all the containers (since in RunPodSandbox we create them in the reverse
order).
2017-03-08 21:33:31 -08:00
Kubernetes Submit Queue ec46846a25 Merge pull request #38691 from xiangpengzhao/fix-empty-logpath
Automatic merge from submit-queue (batch tested with PRs 42211, 38691, 42737, 42757, 42754)

Only create the symlink when container log path exists

When using `syslog` logging driver instead of `json-file`, there will not be container log files such as `<containerID-json.log>`. We should not create symlink in this case.
2017-03-08 18:52:26 -08:00
Random-Liu 2690461cbb Stop sandbox container when hit network error. 2017-03-08 17:28:42 -08:00
Eric Paris df590da6ab Return early from eviction debug helpers if !glog.V(3)
Should keep us from running a bunch of loops needlessly.
2017-03-08 20:19:52 -05:00
Yu-Ju Hong 38d8da1215 FakeDockerClient: add creation timestamp
This is necessary for kubemark to work correctly.
2017-03-08 17:11:16 -08:00
Yu-Ju Hong 8328a66bdf dockershim: Fix the race condition in ListPodSandbox
In ListPodSandbox(), we
 1. List all sandbox docker containers
 2. List all sandbox checkpoints. If the checkpoint does not have a
    corresponding container in (1), we return partial result based on
    the checkpoint.

The problem is that new PodSandboxes can be created between step (1) and
(2). In those cases, we will see the checkpoints, but not the sandbox
containers. This leads to strange behavior because the partial result
from the checkpoint does not include some critical information. For
example, the creation timestamp'd be zero, and that would cause kubelet's
garbage collector to immediately remove the sandbox.

This change fixes that by getting the list of checkpoints before listing
all the containers (since in RunPodSandbox we create them in the reverse
order).
2017-03-08 17:02:34 -08:00
Janet Kuo 076fd62056 Add DaemonSet templateGeneration validation and tests, and fix a bunch of validation test errors
1. Validate that templateGeneration is increased when and only when template is changed
2. Validate that templateGeneration is never decreased
3. Added validation tests for templateGeneration
4. Fix a bunch of errors in validate tests, for example, all validation test error cases failed
   on lack of resource version, or on name changes, not on the real validation we wanted to test
2017-03-08 16:37:09 -08:00
Yu-Ju Hong 1095652cb8 Add more logs to help debugging 2017-03-08 12:27:49 -08:00
Kubernetes Submit Queue 55c436fde7 Merge pull request #42652 from liggitt/ctx-namespace
Automatic merge from submit-queue

Use namespace from context

Fixes #42653

Updates rbac_test.go to submit objects without namespaces set, which matches how actual objects are submitted to the API.
2017-03-08 10:52:27 -08:00
Kubernetes Submit Queue c48b2cab0f Merge pull request #42678 from liggitt/user-fuzzer
Automatic merge from submit-queue

Fix user fuzzer to avoid round trip flake

Fixes #42651
2017-03-08 10:02:31 -08:00
Michael Fraenkel f2815156b0 create secret from-env-file 2017-03-08 07:58:01 -08:00
Michael Fraenkel 7eb49628c6 create configmap from-env-file 2017-03-08 07:58:01 -08:00
Wojciech Tyczynski c3d7ee11d1 Merge pull request #42712 from yujuhong/revert_again
Revert "kubemark: enable CRI for the hollow nodes"
2017-03-08 16:40:15 +01:00
gmarek 48d784272e Move taint eviction feature flag to feature-gates 2017-03-08 10:04:18 +01:00
xiangpengzhao 7fed242d55 Only create the symlink when container log path exists 2017-03-08 01:36:48 -05:00
Yu-Ju Hong 6578d5e842 Revert "kubemark: enable CRI for the hollow nodes"
This reverts commit c89e9cdbf1.
2017-03-07 22:01:41 -08:00