Commit Graph

16753 Commits (5464d42a36cccc35b88c8ac2a743cce340075e10)

Author SHA1 Message Date
Maciej Szulik ed6ede3715 Deprecate extensions/v1beta1.Jobs related stuff 2016-11-07 12:44:51 +01:00
Maciej Szulik 8216e47b6a Generated changes 2016-11-07 11:26:50 +01:00
Kubernetes Submit Queue 7bc358681a Merge pull request #36235 from jszczepkowski/hpa-events-fix
Automatic merge from submit-queue

Improved event generation for HPA.
2016-11-07 02:16:27 -08:00
pospispa dc9bb87ac7 Simplifies NFS and Host Path Plugin - Removed newRecyclerFunc, newDeleterFunc and newProvisionerFunc
struct hostPathPlugin contains newRecyclerFunc, newDeleterFunc and newProvisionerFunc items that have only one instance, i.e. newRecycler, newDeleter or newProvisioner function.

That's why the newRecyclerFunc, newDeleterFunc and newProvisionerFunc items are removed and the newRecycler, newDeleter or newProvisioner functions are called directly.

In addition, the TestRecycler tests whether NewFakeRecycler function is called and returns nil. This is no longer needed so this particular part of the test is removed. In addition, the no longer used NewFakeRecycler function is removed also.

Similarly for the NFS plugin, struct nfsPlugin contains newRecyclerFunc item that has only one instance, i.e. newRecycler function. That's why the newRecyclerFunc item is removed and the newRecycler function is called directly. In addition, the TestRecycler tests whether newMockRecycler function is called and returns nil. This is no longer needed so this particular part of the test is removed. In addition, the no longer used newMockRecycler function is removed also.
2016-11-07 10:39:04 +01:00
Kubernetes Submit Queue dc37723ccd Merge pull request #36256 from colemickens/colemickens-pr-azure-lb-dsr
Automatic merge from submit-queue

azure: loadbalancer rules use DSR

**What this PR does / why we need it**:
Enables "direct server return" on the load balancer in Azure, which causes the DIP to be preserved when traffic goes through the load balancer. This enables service traffic to go to the Service Port rather than having to go through the NodePort.

**Special notes for your reviewer**:
N/A.

**Tested with...**:
```shell
kubectl run nginx --image=nginx
kubectl run nginx2 --image=nginx
kubectl expose deployment nginx --port=80 --type=LoadBalancer
kubectl expose deployment nginx2 --port=80 --type=LoadBalancer
```
Ensuring that both services got external IPs and that the resources created looked correct.

**Release note**:
```release-note
azure: load balancer preserves destination ip address
```

CC: @brendandburns
2016-11-07 01:37:30 -08:00
Kubernetes Submit Queue e6fadcbf4b Merge pull request #36283 from nikhiljindal/nscascdelTests
Automatic merge from submit-queue

Adding more e2e tests for federated namespace cascading deletion and fixing bugs

Ref https://github.com/kubernetes/kubernetes/issues/33612

Adding more e2e tests for testing cascading deletion of federated namespace.
New tests are now verifying that cascading deletion happen when DeletionOptions.OrphanDependents=false and it does not happen when DeleteOptions.OrphanDependents=true.

Also updated deletion helper to always add OrphanFinalizer. generic registry will remove it if DeleteOptions.OrphanDependents=false. Also updated namespace registry to do the same.

We need to add the orphan finalizer to keep the orphan by default behavior. We assume that its dependents are going to be orphaned and hence add that finalizer. If user does not want the orphan behavior, he can do so using DeleteOptions and then the registry will remove that finalizer.

cc @kubernetes/sig-cluster-federation @caesarxuchao @derekwaynecarr
2016-11-07 01:37:14 -08:00
Paulo Pires 562d0756ef
Fixed copyright headers. 2016-11-07 09:18:07 +00:00
Maciej Szulik 0b5ef16008 Support ScheduledJob name 2016-11-07 10:14:12 +01:00
Maciej Szulik 41d88d30dd Rename ScheduledJob to CronJob 2016-11-07 10:14:12 +01:00
Paulo Pires acf3f368bc
Added new userspace proxy mode specifically for Windows. 2016-11-07 09:11:35 +00:00
Jitendra Bhurat 4cf9b3c362
Added netsh util package. 2016-11-07 09:11:34 +00:00
Kubernetes Submit Queue 0c7421fb51 Merge pull request #36068 from sttts/sttts-old-self-signed-cn
Automatic merge from submit-queue

Restore old apiserver cert CN

This patch got lost during rebase of https://github.com/kubernetes/kubernetes/pull/35109:

- set `host@<unix-timestamp>` as CN in self-signed apiserver certs
- skip non-domain CN in getNamedCertificateMap
2016-11-07 00:37:12 -08:00
Kubernetes Submit Queue cc7070d5d8 Merge pull request #35583 from justinsb/replace_ratelimit
Automatic merge from submit-queue

Create simple version of ratelimit package

Allows for better testing.
2016-11-07 00:01:18 -08:00
Kubernetes Submit Queue 14961af811 Merge pull request #35665 from m1093782566/m109-pet-test
Automatic merge from submit-queue

Add StatefulSet update pod unit test and set log level

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What**:
- Add petset controller update pet unit test
- set petset controller log level

**Why**
- #32482 fixed "losing pet updated information between update retries", as @bprashanth suggested, "there should be a UT to ensure we fix identity if something corrupts it". I implement the UT in this PR.
- set petset controller log level in order to avoid spamming.

@bprashanth
2016-11-06 23:19:22 -08:00
Zihong Zheng 55f75c37f7 Default to the old behavior for proxier sync. 2016-11-06 22:45:53 -08:00
Dr. Stefan Schimanski 893d041726 Update bazel 2016-11-07 06:49:50 +01:00
Dr. Stefan Schimanski 05d290e5be Restore old apiserver cert CN 2016-11-07 06:49:49 +01:00
Kubernetes Submit Queue fefdad2366 Merge pull request #36324 from mwielgus/diseve
Automatic merge from submit-queue

Add more events to disruption controller

To provide users with information that their PDB may not be working as intended.

cc: @davidopp
2016-11-06 21:21:23 -08:00
Kubernetes Submit Queue 0068c3094a Merge pull request #36095 from caesarxuchao/deprecate-LegacyHostIP
Automatic merge from submit-queue

[RFC] Prepare for deprecating NodeLegacyHostIP

Ref https://github.com/kubernetes/kubernetes/issues/9267#issuecomment-257994766

*What this PR does*
- Add comments saying "LegacyHostIP" will be deprecated in 1.7;
- Add v1.NodeLegacyHostIP to be consistent with the internal API (useful for client-go migration #35159)
- Let cloudproviders who used to only set LegacyHostIP set the IP as both InternalIP and ExternalIP
- Master used to ssh tunnel to node's ExternalIP or LegacyHostIP to do [healthz check](https://github.com/kubernetes/kubernetes/blame/master/pkg/master/master.go#L328-L332). OTOH, if on-prem, kubelet only [sets](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/kubelet_node_status.go#L430-L431) LegacyHostIP or InternalIP. In order to deprecate LegacyHostIP in 1.7, I let healthz check to use InternalIP if ExternalIP is not available. (The healthz check is the only consumer of LegacyHostIP in k8s.)

@liggitt @justinsb @bgrant0607 

```release-note
LegacyHostIP will be deprecated in 1.7.
```
2016-11-06 21:21:15 -08:00
Kubernetes Submit Queue f7e0c6c19e Merge pull request #35418 from sttts/sttts-discovery-cache
Automatic merge from submit-queue

Add caching for discovery info with invalidation on cache-miss

TODO:
- [x] write tests for `CachedDiscoveryClient`
- [x] write tests for `DeferredDiscoveryRESTMapper` on cache-miss
- [x] find better way/structure to get rid of `invalidateCh` in c06ba3175b
2016-11-06 20:10:57 -08:00
Pengfei Ni f8e5f81fed cleanup TODOs in dockershim 2016-11-07 11:41:06 +08:00
Kubernetes Submit Queue f37039b2f5 Merge pull request #36249 from sjenning/fix-lbaas-openstack-init
Automatic merge from submit-queue

Fix LBaaS version detection in openstack cloudprovider

`lbversion` is the local variable used for version detection when `os.lbOpts.LBVersion` is not specified.

xref https://bugzilla.redhat.com/show_bug.cgi?id=1391837

@ncdc @derekwaynecarr @anguslees
2016-11-06 19:36:03 -08:00
Pengfei Ni 3aee57d4ae Add security context support in dockershim 2016-11-07 11:07:56 +08:00
Pengfei Ni 3df60eb163 Implement security context in kuberuntime 2016-11-07 11:07:56 +08:00
Pengfei Ni 476cd96098 run hack/update-bazel.sh 2016-11-07 11:07:56 +08:00
Pengfei Ni 766b570c19 run hack/update-generated-runtime.sh 2016-11-07 11:07:56 +08:00
Pengfei Ni 453391ea88 CRI: add security context for sandbox/container 2016-11-07 11:07:12 +08:00
Kubernetes Submit Queue 4b081985ed Merge pull request #36248 from ncdc/operationNotSupportedCache-mutex
Automatic merge from submit-queue

Fix possible race in operationNotSupportedCache

Because we can run multiple workers to delete namespaces simultaneously, the
operationNotSupportedCache needs to be guarded with a mutex to avoid concurrent
map read/write errors.
2016-11-06 18:57:39 -08:00
Kubernetes Submit Queue 94bbe29cb9 Merge pull request #36313 from luxas/fix_crossbuild2
Automatic merge from submit-queue

Fix the crossbuild that #35132 broke

@dashpole @dchen1107 @vishh 

A quick LGTM would be nice in order to not block any releases.
2016-11-06 16:35:46 -08:00
Derek Carr 669ce59b9b Use available informers in quota replenishment 2016-11-06 18:45:36 -05:00
Marcin Wielgus 51e7bd92db Add more events to disruption controller 2016-11-07 00:07:52 +01:00
Gyu-Ho Lee ce26f21ee6
options, kube-apiserver: clarify scheme on etcd endpoints
When etcd server uses TLS, the scheme should be https.
2016-11-06 13:22:58 -08:00
Kubernetes Submit Queue 182a09c3c7 Merge pull request #35526 from justinsb/fix_35521_b
Automatic merge from submit-queue

kubelet bootstrap: start hostNetwork pods before we have PodCIDR

Network readiness was checked in the pod admission phase, but pods that
fail admission are not retried.  Move the check to the pod start phase.

Issue #35409 
Issue #35521
2016-11-06 12:53:14 -08:00
Kubernetes Submit Queue a10975d05d Merge pull request #36196 from mwielgus/disruptedpods
Automatic merge from submit-queue

Add DisruptedPod list to PodDisruptionBudgetStatus

To ensure that PodDisruptionBudget is race free a list of pods that were planned to be disrupted needs to be added to the status. ApiServer when evicting a pod will add it to this list. Disruption controller will skip pods from that list when calculating the number of healthy pods. The pods from the list are removed either when they are gone or when they were not actually disrupted.
2016-11-06 12:16:13 -08:00
Kubernetes Submit Queue 5396cbf2a6 Merge pull request #36038 from caesarxuchao/add-versioned-expansions
Automatic merge from submit-queue

Add missing expansion files to versioned clientset

I copied the expansion functions that only existed in the internalclientset to release_1_5.

Most changes are mechanical. This is needed for migrating k8s to use versioned clientset, so I add the 1.5 milestone.
2016-11-06 11:38:11 -08:00
Marcin 1fee246ca9 Autogenerated stuff for policy/v1beta1 api change 2016-11-06 19:37:33 +01:00
Marcin 47a1458ff3 Add DisruptedPod map to PodDisruptionBudgetStatus 2016-11-06 19:37:33 +01:00
Kubernetes Submit Queue 28733b0f8b Merge pull request #36201 from yujuhong/cri_inits
Automatic merge from submit-queue

CRI: rearrange kubelet rutnime initialization

Consolidate the code used by docker+cri and remote+cri for consistency, and to
prevent changing one without the other.  Enforce that
`--experimental-runtime-integration-type` has to be set in order for kubelet
use the CRI interface, *even for out-of-process shims`. This simplifies the
temporary `if` logic in kubelet while CRI still co-exists with older logic.
2016-11-06 10:23:52 -08:00
Kubernetes Submit Queue c04cab536b Merge pull request #36134 from liggitt/kubelet-auth-cleanup
Automatic merge from submit-queue

Cleanup auth logging, allow starting secured kubelet in local-up-cluster.sh

Cleanup for https://github.com/kubernetes/features/issues/89
2016-11-06 08:33:04 -08:00
Brendan Burns 55f031e167 Add retry to node scheduability marking. 2016-11-06 08:28:36 -08:00
Lucas Käldström 190a513cf8 Fix the crossbuild that #35132 broke 2016-11-06 08:08:25 -08:00
Kubernetes Submit Queue ebc8dc85aa Merge pull request #36207 from smarterclayton/optimize_self_link
Automatic merge from submit-queue

SetSelfLink is inefficient

Generating self links, especially for lists, is inefficient.  Replace
use of net.URL.String() call with direct encoding that reduces number of
allocations. Switch from calling meta.ExtractList|SetList to a function
that iterates over each object in the list.

In steady state for nodes performing frequently small get/list
operations, and for larger LISTs significantly reduces CPU and
allocations.

@wojtek-t this is the next big chunk of CPU use during the large N nodes simulation test (11% of master CPU). Takes a few allocations out of the critical path
2016-11-06 06:42:49 -08:00
Kubernetes Submit Queue c02a9c6aad Merge pull request #36080 from ncdc/lister-gen
Automatic merge from submit-queue

lister-gen updates

- Remove "zz_generated." prefix from generated lister file names
- Add support for expansion interfaces
- Switch to new generated JobLister

@deads2k @liggitt @sttts @mikedanese @caesarxuchao for the lister-gen changes
@soltysh @deads2k for the informer / job controller changes
2016-11-06 06:05:23 -08:00
Kubernetes Submit Queue 7acec071c3 Merge pull request #35430 from jsafrane/remove-pv-annotations
Automatic merge from submit-queue

Remove PV annotations for quobyte provisioner

This is the last provisioner that uses annotations to pass secrets from provisioner to deleter.

Fixes #34822

@johscheuer, I don't have access to quobyte, please take look and retest the plugin. An e2e test for quobyte would be nice!

@kubernetes/sig-storage
2016-11-06 05:26:45 -08:00
Michail Kargakis f97666eb66 kubectl: enhancements for deployment progress deadline
Changes:
* add deployment conditions in the describer
* abort 'rollout status' for deployments that have exceeded their
progress deadline
2016-11-06 14:08:33 +01:00
Kubernetes Submit Queue 33dab1d555 Merge pull request #35629 from hpcloud/bug/33128-unused-waitfordetach
Automatic merge from submit-queue

Remove unused WaitForDetach from Detacher interface and plugins

See issue #33128 and PR #33270

We can't rely on the device name provided by OpenStack Cinder, and thus
must perform detection based on the drive serial number (aka It's cinder ID)
on the kubelet itself.

This needs to be removed now, as part of #33128, as the code can't be
updated to attempt device detection and fallback through to the Cinder
provided deviceName, as detection "fails" when the device is gone, and
if cinder has reported a deviceName that another volume has used in
relaity, then this will block forever (or until the other, unreleated,
volume has been detached)
2016-11-06 04:52:23 -08:00
Kubernetes Submit Queue 8371a778f6 Merge pull request #35839 from Random-Liu/add-cri-runtime-status
Automatic merge from submit-queue

CRI: Add Status into CRI.

For https://github.com/kubernetes/kubernetes/issues/35701.
Fixes https://github.com/kubernetes/kubernetes/issues/35701.

This PR added a `Status` call in CRI, and the `RuntimeStatus` is defined as following:

``` protobuf
message RuntimeCondition {
    // Type of runtime condition.
    optional string type = 1;
    // Status of the condition, one of true/false.
    optional bool status = 2;
    // Brief reason for the condition's last transition.
    optional string reason = 3;
    // Human readable message indicating details about last transition.
    optional string message = 4;
}

message RuntimeStatus {
    // Conditions is an array of current observed runtime conditions.
    repeated RuntimeCondition conditions = 1;
}
```

Currently, only `conditions` is included in `RuntimeStatus`, and the definition is almost the same with `NodeCondition` and `PodCondition` in K8s api.

@yujuhong @feiskyer @bprashanth If this makes sense, I'll send a follow up PR to let dockershim return `RuntimeStatus` and let kubelet make use of it.
@yifan-gu @euank Does this make sense to rkt?
/cc @kubernetes/sig-node
2016-11-06 04:16:29 -08:00
Kubernetes Submit Queue 5e8b22fdcb Merge pull request #36013 from bowei/kubedns-logging
Automatic merge from submit-queue

Kubedns logging

fixes 
https://github.com/kubernetes/kubernetes/issues/29053

may resolve https://github.com/kubernetes/kubernetes/issues/29054, but depends on what the specific ask is
2016-11-06 03:38:27 -08:00
Kubernetes Submit Queue 4b1e36f970 Merge pull request #36190 from dashpole/revert_node_inode_pressure_split
Automatic merge from submit-queue

We only report diskpressure to users, and no longer report inodepressure

See #36180 for more information on why #33218 was reverted.
2016-11-06 03:00:34 -08:00
Jun Gong dbb715eb42 Fix kubelet's PodAdmitResult's message 2016-11-06 18:29:26 +08:00
Kubernetes Submit Queue 6f053ec4bc Merge pull request #36112 from yujuhong/stop_sandbox
Automatic merge from submit-queue

CRI: stop sandbox before removing it

Stopping a sandbox includes reclaiming the network resources.  By always
stopping the sandbox before removing it, we reduce the possibility of leaking
resources in some corner cases.
2016-11-06 02:22:40 -08:00
Kubernetes Submit Queue 43a915e628 Merge pull request #35491 from pmorie/byebye-getrootcontext
Automatic merge from submit-queue

Remove GetRootContext method from VolumeHost interface

Remove the `GetRootContext` call from the `VolumeHost` interface, since Kubernetes no longer needs to know the SELinux context of the Kubelet directory.

Per #33951 and #35127.

Depends on #33663; only the last commit is relevant to this PR.
2016-11-06 01:09:19 -08:00
Kubernetes Submit Queue 486a1ad3e4 Merge pull request #31707 from apprenda/windows_infra_container
Automatic merge from submit-queue

Initial work on running windows containers on Kubernetes

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

This is the first stab at getting the Kubelet running on Windows (fixes #30279), and getting it to deploy network-accessible pods that consist of Windows containers. Thanks @csrwng, @jbhurat for helping out.

The main challenge with Windows containers at this point is that container networking is not supported. In other words, each container in the pod will get it's own IP address. For this reason, we had to make a couple of changes to the kubelet when it comes to setting the pod's IP in the Pod Status. Instead of using the infra-container's IP, we use the IP address of the first container.

Other approaches we investigated involved "disabling" the infra container, either conditionally on `runtime.GOOS` or having a separate windows-docker container runtime that re-implemented some of the methods (would require some refactoring to avoid maintainability nightmare). 

Other changes:
- The default docker endpoint was removed. This results in the docker client using the default for the specific underlying OS.

More detailed documentation on how to setup the Windows kubelet can be found at https://docs.google.com/document/d/1IjwqpwuRdwcuWXuPSxP-uIz0eoJNfAJ9MWwfY20uH3Q. 

cc: @ikester @brendandburns @jstarks
2016-11-06 01:30:11 -07:00
Kubernetes Submit Queue 8cb94beeea Merge pull request #36231 from justinsb/avoid_duplicate_node_addresses
Automatic merge from submit-queue

Don't add duplicate Hostname address

If the cloudprovider returned an address of type Hostname, we shouldn't
add a duplicate one.

Fixes #36234
2016-11-06 00:24:20 -07:00
Kubernetes Submit Queue f650ddf800 Merge pull request #35132 from dashpole/per_volume_inode
Automatic merge from submit-queue

Per Volume Inode Accounting

Collects volume inode stats using the same find command as cadvisor.  The command is "find _path_ -xdev -printf '.' | wc -c".  The output is passed to the summary api, and will be consumed by the eviction manager.

This cannot be merged yet, as it depends on changes adding the InodesUsed field to the summary api, and the eviction manager consuming this.  Expect tests to fail until this happens.
DEPENDS ON #35137
2016-11-05 23:45:44 -07:00
Kubernetes Submit Queue 649c0ddd0e Merge pull request #35342 from timstclair/rejected
Automatic merge from submit-queue

[AppArmor] Hold bad AppArmor pods in pending rather than rejecting

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

Overview of the fix:

If the Kubelet needs to reject a Pod for a reason that the control plane doesn't understand (e.g. which AppArmor profiles are installed on the node), then it might contiinuously try to run the pod on the same rejecting node. This change adds a concept of "soft rejection", in which the Pod is admitted, but not allowed to run (and therefore held in a pending state). This prevents the pod from being retried on other nodes, but also prevents the high churn. This is consistent with how other missing local resources (e.g. volumes) is handled.

A side effect of the change is that Pods which are not initially runnable will be retried. This is desired behavior since it avoids a race condition when a new node is brought up but the AppArmor profiles have not yet been loaded on it.

``` release-note
Pods with invalid AppArmor configurations will be held in a Pending state, rather than rejected (failed). Check the pod status message to find out why it is not running.
```

@kubernetes/sig-node @timothysc @rrati @davidopp
2016-11-05 22:52:26 -07:00
Kubernetes Submit Queue 1e9635fb51 Merge pull request #35522 from kargakis/fix-rollback-rest
Automatic merge from submit-queue

registry: make rollback rest speak only api errors

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

@kubernetes/deployment ptal
2016-11-05 22:12:32 -07:00
Kubernetes Submit Queue 2c50d2b6fc Merge pull request #36094 from janetkuo/overlapping-deployment-select
Automatic merge from submit-queue

Update how we detect overlapping deployments

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

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

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

**Special notes for your reviewer**: cc @kubernetes/deployment 

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
NONE
```

When looking for overlapping deployments, we should also find other deployments that select current deployment's pods,
not just the ones whose pods are selected by current deployment.
2016-11-05 21:04:58 -07:00
nikhiljindal aa518d13de Adding more e2e tests for federated namespace cascading deletion and fixing a few bugs 2016-11-05 20:57:57 -07:00
Cole Mickens 23454c1774 azure: loadbalancer rules use DSR 2016-11-05 20:33:37 -07:00
Kubernetes Submit Queue c80acb4cb8 Merge pull request #35481 from smarterclayton/apidoc
Automatic merge from submit-queue

Describe graceful deletionTimestamp more accurately

Spawned from #34160
2016-11-05 18:51:47 -07:00
Kubernetes Submit Queue 973685c006 Merge pull request #32309 from smarterclayton/generic_storage_factory
Automatic merge from submit-queue

Storage factory should not hardcode special resources

Prepares for future movement

@deads2k
2016-11-05 18:05:33 -07:00
Kubernetes Submit Queue 37e3074d3e Merge pull request #36100 from timstclair/cris-leak
Automatic merge from submit-queue

Cleanup leaking goroutine

Cleanup potential go-routine leak in ExecSync path by removing timeout support. Timeout support is added in https://github.com/kubernetes/kubernetes/pull/33366 and https://github.com/kubernetes/kubernetes/pull/35893, and until those merge this is consistent with current behavior.

/cc @rhcarvalho
2016-11-05 16:52:46 -07:00
Kubernetes Submit Queue 7d1ef3e9c9 Merge pull request #34987 from timstclair/redirect
Automatic merge from submit-queue

Handle redirects in apiserver proxy handler

Overview:
1. Peek at the HTTP response from the proxied backend
2. If it is a redirect response (302/3), redo the request to the redirect location
3. If it's not a redirect, forward the response to the client and then set up the proxy as before

This change is required for implementing streaming requests in the Container Runtime Interface (CRI). See [design](https://docs.google.com/document/d/1OE_QoInPlVCK9rMAx9aybRmgFiVjHpJCHI9LrfdNM_s/edit).

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

/cc @yujuhong
2016-11-05 14:58:26 -07:00
Kubernetes Submit Queue 47519962bf Merge pull request #35484 from smarterclayton/delete_warning
Automatic merge from submit-queue

Add --force to kubectl delete and explain force deletion

--force is required for --grace-period=0. --now is == --grace-period=1.
Improve command help to explain what graceful deletion is and warn about
force deletion.

Part of #34160 & #29033

```release-note
In order to bypass graceful deletion of pods (to immediately remove the pod from the API) the user must now provide the `--force` flag in addition to `--grace-period=0`.  This prevents users from accidentally force deleting pods without being aware of the consequences of force deletion.  Force deleting pods for resources like StatefulSets can result in multiple pods with the same name having running processes in the cluster, which may lead to data corruption or data inconsistency when using shared storage or common API endpoints.
```
2016-11-05 11:19:04 -07:00
Kubernetes Submit Queue 17fda0a135 Merge pull request #35806 from bdbauer/new_deletion
Automatic merge from submit-queue

Made changes to DELETE API to let v1.DeleteOptions be passed in as a queryParameter

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

```release-note
DELETE requests can now pass in their DeleteOptions as a query parameter or a body parameter, rather than just as a body parameter.
```
2016-11-05 08:49:34 -07:00
Kubernetes Submit Queue f1603181a3 Merge pull request #35970 from deads2k/controller-15-enable
Automatic merge from submit-queue

make using service account credentials from controllers optional

Adds a flag to make the "SA per controller" behavior optional.
2016-11-05 08:11:10 -07:00
Kubernetes Submit Queue da56dc1e33 Merge pull request #35206 from juanvallejo/jvallejo/exit-w-errorcode-on-non-existent-cmds
Automatic merge from submit-queue

update default run function for sub-commands

**Release note**:

``` release-note
release-note-none
```

This patch updates parent commands of sub-commands to exit with a usage
error and exit code 1 on an invalid (non-sub-command) argument.

cc @kargakis
2016-11-05 07:33:46 -07:00
m1093782566 396d959252 implement statefulset update pet unit test
Change-Id: I2234ee8357752aaa8801efb52d5963c215a0344d
2016-11-05 19:47:01 +08:00
Kubernetes Submit Queue f4738ff575 Merge pull request #35883 from justinsb/aws_strong_volumetype
Automatic merge from submit-queue

AWS: strong-typing for k8s vs aws volume ids
2016-11-05 02:29:17 -07:00
Random-Liu 90fe0c5994 Update bazel. 2016-11-05 00:02:05 -07:00
Random-Liu 772bf8e14d Populate NetworkReady Status. 2016-11-05 00:02:05 -07:00
Random-Liu 4bd9dbf6ad Add RuntimeStatus in container/runtime.go 2016-11-05 00:02:05 -07:00
Random-Liu 55c5232810 Add Status implementation. 2016-11-05 00:02:05 -07:00
Random-Liu fc10a25ae1 Add Status into CRI. 2016-11-05 00:00:26 -07:00
Kubernetes Submit Queue 66a7a1f961 Merge pull request #36200 from yujuhong/remove_logs
Automatic merge from submit-queue

dockershim: remove unused GetContainerLogs method
2016-11-04 21:03:22 -07:00
Chao Xu 094de4ef49 copy PodInitialized conditon to v1 2016-11-04 20:42:22 -07:00
Clayton Coleman 0be25e481b
generated: docs 2016-11-04 23:38:37 -04:00
Random-Liu 158e48861c Add remote streaming implementation. 2016-11-04 17:47:12 -07:00
Justin Santa Barbara cef8315ae8 Add constants for node role labels
Rather than sharing well-known strings, we should be declaring these in
the API.
2016-11-04 18:00:35 -04:00
Kubernetes Submit Queue a811515d34 Merge pull request #35691 from kargakis/controller-changes-for-perma-failed
Automatic merge from submit-queue

Controller changes for perma failed deployments

This PR adds support for reporting failed deployments based on a timeout
parameter defined in the spec. If there is no progress for the amount
of time defined as progressDeadlineSeconds then the deployment will be
marked as failed by a Progressing condition with a ProgressDeadlineExceeded
reason.

Follow-up to https://github.com/kubernetes/kubernetes/pull/19343

Docs at kubernetes/kubernetes.github.io#1337

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

@kubernetes/deployment @smarterclayton
2016-11-04 14:49:43 -07:00
Chao Xu 783af943db Add v1.NodeLegacyHostIP to be consistent with the internal API;
Mark NodeLegacyHostIP will be deprecated in 1.7;
Let cloudprovider that used to only set NodeLegacyHostIP set the IP as both InternalIP and ExternalIP, to allow dprecation in 1.7
2016-11-04 14:29:49 -07:00
Clayton Coleman cbe0787ca4
Describe graceful deletion in more detail 2016-11-04 17:08:32 -04:00
Kubernetes Submit Queue 3cdf8bb1ef Merge pull request #36189 from euank/kubelet-nolog-redir
Automatic merge from submit-queue

kubelet: don't print httplogs for redirects

Goes with #36020, but can merge independently.

cc @timstclair
2016-11-04 14:06:18 -07:00
Kubernetes Submit Queue dd53b749e4 Merge pull request #35334 from timothysc/proxy_min_sync
Automatic merge from submit-queue

Proxy min sync period

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**:
Gives the proxy the option to set a lower bound on the sync period when there are a high number of endpoint changes.  This prevents excessive iptables re-writes under a number of conditions.

fixes #33693
and alleviates the symptoms of #26637

**NOTE:** 
There are other minor fixes that I'm working on but keeping the PRs separate. 

**Release note**:

<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->

`Added iptables-min-syn-period(2) to proxy to prevent excessive iptables writes`
2016-11-04 14:06:02 -07:00
Dr. Stefan Schimanski c8513c31a1 Update bazel 2016-11-04 21:17:12 +01:00
Dr. Stefan Schimanski 14ce6f6065 Add caching for discovery info 2016-11-04 21:17:12 +01:00
Yu-Ju Hong 5a148ee6e9 CRI: rearrange kubelet runtime initialization
Consolidate the code used by docker+cri and remote+cri for consistency, and to
prevent changing one without the other.  Enforce that
`--experimental-runtime-integration-type` has to be set in order for kubelet
use the CRI interface, *even for out-of-process shims`. This simplifies the
temporary `if` logic in kubelet while CRI still co-exists with older logic.
2016-11-04 12:29:13 -07:00
Tim St. Clair 6e0702a50d Handle redirects in apiserver proxy handler 2016-11-04 12:26:24 -07:00
Kubernetes Submit Queue f787cea237 Merge pull request #36020 from timstclair/klet-stream
Automatic merge from submit-queue

Separate Direct and Indirect streaming paths, implement indirect path for CRI

This PR refactors the `pkg/kubelet/container.Runtime` interface to remove the `ExecInContainer`, `PortForward` and `AttachContainer` methods. Instead, those methods are part of the `DirectStreamingRuntime` interface which all "legacy" runtimes implement. I also added an `IndirectStreamingRuntime` which handles the redirect path and is implemented by CRI runtimes. To control the size of this PR, I did not fully setup the indirect streaming path for the dockershim, so I left legacy path behind.

Most of this PR is moving & renaming associated with the refactoring. To understand the functional changes, I suggest tracing the code from `getExec` in `pkg/kubelet/server/server.go`, which calls `GetExec` in `pkg/kubelet/kubelet_pods.go` to determine whether to follow the direct or indirect path.

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

/cc @kubernetes/sig-node
2016-11-04 11:52:06 -07:00
deads2k ebf796a649 make using service account credentials from controllers optional 2016-11-04 14:17:34 -04:00
Andy Goldstein 4855917bc3 Fix possible race in operationNotSupportedCache
Because we can run multiple workers to delete namespaces simultaneously, the
operationNotSupportedCache needs to be guarded with a mutex to avoid concurrent
map read/write errors.
2016-11-04 14:11:54 -04:00
Kubernetes Submit Queue f6b313b1da Merge pull request #36070 from liggitt/requestinfowatch
Automatic merge from submit-queue

Recognize watch operations via ?watch param

@deads2k @smarterclayton
2016-11-04 11:06:59 -07:00
Benjamin Bauer 2e7195fbcb Updated openapi spec, swagger spec, and swagger doc 2016-11-04 10:58:42 -07:00
Seth Jennings 98756575c4 fix version detection in openstack lbaas 2016-11-04 12:56:37 -05:00
Kubernetes Submit Queue a96f028208 Merge pull request #35990 from juanvallejo/jvallejo/update-port-validation-message
Automatic merge from submit-queue

update port validation message

Related Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1355703#c2

Port validation that results in a multi-line message:
```
* spec.template.spec.containers[0].livenessProbe.httpGet.port: Invalid value: "": must contain only alpha-numeric characters (a-z, 0-9), and hyphens (-)
* spec.template.spec.containers[0].livenessProbe.httpGet.port: Invalid value: "": must contain at least one letter (a-z)
```

suggests that ports can only be at minimum one letter.

Per [this bugzilla comment](https://bugzilla.redhat.com/show_bug.cgi?id=1355703#c2), this patch updates the second bullet point on the error message to be clearer:

```
* spec.template.spec.containers[0].livenessProbe.httpGet.port: Invalid value: "": must contain only alpha-numeric characters (a-z, 0-9), and hyphens (-)
* spec.template.spec.containers[0].livenessProbe.httpGet.port: Invalid value: "": must contain at least one letter or number (a-z, 0-9)
```

**Release note**:
```release-note
release-note-none
```
2016-11-04 09:52:29 -07:00
David Ashpole d68572e581 eviction message now includes resource that was exhausted 2016-11-04 09:30:02 -07:00
Michail Kargakis 365cfa1ef3 extensions: invalidate progress deadline less than minreadyseconds 2016-11-04 16:40:20 +01:00
Michail Kargakis f52ea8fc67 Update replica annotations every time they are out of sync 2016-11-04 16:29:41 +01:00
David Ashpole 9aca40dee6 revert #33218. dont need #36180. We only use diskpressure 2016-11-04 08:29:27 -07:00