Commit Graph

38773 Commits (506129ba4e8d446128f780c122365d388d96fd86)

Author SHA1 Message Date
Rodolfo Carvalho 506129ba4e Add timeout argument to ExecInContainer
This allows us to interrupt/kill the executed command if it exceeds the
timeout (not implemented by this commit).

Set timeout in Exec probes. HTTPGet and TCPSocket probes respect the
timeout, while Exec probes used to ignore it.

Add e2e test for exec probe with timeout. However, the test is skipped
while the default exec handler doesn't support timeouts.
2016-11-07 13:00:59 +01:00
Kubernetes Submit Queue 83c5a1c895 Merge pull request #36343 from wojtek-t/bump_to_3_0_14
Automatic merge from submit-queue

Bump etcd to 3.0.14 in tests

Ref #20504
2016-11-07 03:11:17 -08:00
Kubernetes Submit Queue 301326585f Merge pull request #36308 from kargakis/not-found-fix
Automatic merge from submit-queue

test: ignore 404 when deleting pods

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

@kubernetes/deployment
2016-11-07 02:16:36 -08: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
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 5dd346ab75 Merge pull request #34693 from yarntime/add_pod_affinity_test_cases
Automatic merge from submit-queue

add podAntiAffinity test cases

add podAntiAffinity test cases.
2016-11-07 01:37:22 -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
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
Wojciech Tyczynski b34ac6baef Bump etcd to 3.0.14 in tests 2016-11-07 08:41:17 +01: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
Kubernetes Submit Queue 30fa3231ed Merge pull request #36260 from timothysc/etcd_3_0_14
Automatic merge from submit-queue

Update godep to 3.0.14 to match release recommendations.

Updates godep and regen of bazel build output. 

/cc @wojtek-t
2016-11-06 22:03:44 -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 3c17fa5d36 Merge pull request #36048 from madhusudancs/federation-kubefed-init-10c
Automatic merge from submit-queue

[Federation][init-10c] Fix hyperkube binary path in the image and disable auth mechanisms we don't support for now.

Please review only the last commit here. This is based on PR #36047 which will be reviewed independently.

Design Doc: PR #34484

cc @kubernetes/sig-cluster-federation @nikhiljindal
2016-11-06 20:46:52 -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
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
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 f715b26d9c Merge pull request #35932 from jayunit100/sched_events_spam_reduce
Automatic merge from submit-queue

Reduce spam in Events from scheduler by counter aggregation of failure

Fixes #35842
Part of overall #35555
2016-11-06 17:48:31 -08:00
Kubernetes Submit Queue 9534c4f563 Merge pull request #32427 from Random-Liu/system-verification
Automatic merge from submit-queue

Node Conformance Test: Add system verification

For #30122 and #29081.

This PR introduces system verification test in node e2e and conformance test. It will run before the real test. Once the system verification fails, the test will just fail. The output of the system verification is like this:

```
I0909 23:33:20.622122    2717 validators.go:45] Validating os...
OS: Linux
I0909 23:33:20.623274    2717 validators.go:45] Validating kernel...
I0909 23:33:20.624037    2717 kernel_validator.go:79] Validating kernel version
KERNEL_VERSION: 3.16.0-4-amd64
I0909 23:33:20.624146    2717 kernel_validator.go:93] Validating kernel config
CONFIG_NAMESPACES: enabled
CONFIG_NET_NS: enabled
CONFIG_PID_NS: enabled
CONFIG_IPC_NS: enabled
CONFIG_UTS_NS: enabled
CONFIG_CGROUPS: enabled
CONFIG_CGROUP_CPUACCT: enabled
CONFIG_CGROUP_DEVICE: enabled
CONFIG_CGROUP_FREEZER: enabled
CONFIG_CGROUP_SCHED: enabled
CONFIG_CPUSETS: enabled
CONFIG_MEMCG: enabled
I0909 23:33:20.679328    2717 validators.go:45] Validating cgroups...
CGROUPS_CPU: enabled
CGROUPS_CPUACCT: enabled
CGROUPS_CPUSET: enabled
CGROUPS_DEVICES: enabled
CGROUPS_FREEZER: enabled
CGROUPS_MEMORY: enabled
I0909 23:33:20.679454    2717 validators.go:45] Validating docker...
DOCKER_GRAPH_DRIVER: aufs
```

It verifies the system following a predefined `SysSpec`:

``` go
// DefaultSysSpec is the default SysSpec.
 var DefaultSysSpec = SysSpec{
    OS:            "Linux",
    KernelVersion: []string{`3\.[1-9][0-9].*`, `4\..*`}, // Requires 3.10+ or 4+
    // TODO(random-liu): Add more config
    KernelConfig: KernelConfig{
        Required: []string{
            "NAMESPACES", "NET_NS", "PID_NS", "IPC_NS", "UTS_NS",
            "CGROUPS", "CGROUP_CPUACCT", "CGROUP_DEVICE", "CGROUP_FREEZER",
            "CGROUP_SCHED", "CPUSETS", "MEMCG",
        },
        Forbidden: []string{},
    },
    Cgroups: []string{"cpu", "cpuacct", "cpuset", "devices", "freezer", "memory"},
    RuntimeSpec: RuntimeSpec{
        DockerSpec: &DockerSpec{
            Version: []string{`1\.(9|\d{2,})\..*`}, // Requires 1.9+
            GraphDriver: []string{"aufs", "overlay", "devicemapper"},
        },
    },
 }
```

Currently, it only supports:
- Kernel validation: version validation and kernel configuration validation
- Cgroup validation: validating whether required cgroups subsystems are enabled.
- Runtime Validation: currently, only validates docker graph driver.

The validating framework is ready. The specific validation items could be added over time.

@dchen1107 
/cc @kubernetes/sig-node
2016-11-06 17:12: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
Kubernetes Submit Queue 649f243df0 Merge pull request #33819 from thockin/makefile-verify-generated
Automatic merge from submit-queue

Verify generated files

Fixes #33751 

Once I un-check-in generated files, this becomes moot again.
2016-11-06 15:23:06 -08:00
Marcin Wielgus 51e7bd92db Add more events to disruption controller 2016-11-07 00:07:52 +01:00
Kubernetes Submit Queue b75c3a45a1 Merge pull request #35776 from jimmycuadra/petset-rename-docs-examples
Automatic merge from submit-queue

Rename PetSet to StatefulSet in docs and examples.

**What this PR does / why we need it**: Addresses some of the pre-code-freeze changes for implementing the PetSet --> StatefulSet rename. (#35534)

**Special notes for your reviewer**: This PR only changes docs and examples, as #35731 hasn't been merged yet and I don't want to create merge conflicts. I'll open another PR for any remaining code changes needed after that PR is merged. /cc @erictune @janetkuo @chrislovecnm
2016-11-06 13:30:21 -08:00
Kubernetes Submit Queue f67a9fdcab Merge pull request #35061 from mwielgus/dep-fed-e2e
Automatic merge from submit-queue

E2e test for federated deployment controller

Based on e2e tests for federated deployment.

cc: @quinton-hoole
2016-11-06 13:30:12 -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
Kubernetes Submit Queue 1f0febc8c9 Merge pull request #35905 from jsafrane/secret-types
Automatic merge from submit-queue

Update Secret.type examples used for provisioning.

Kubernetes now checks that secrets used for provisioning of volumes
have correct type (PR #35675), all examples should reflect it.
2016-11-06 11:00:17 -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
Marcin e90d97d262 Autogenerated bazel BUILD 2016-11-06 19:27:24 +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
Marcin Wielgus f7d37219d9 E2e test for federated deployment controller 2016-11-06 19:21:59 +01:00
Kubernetes Submit Queue b7512d9c8b Merge pull request #36240 from wojtek-t/quota_bytes_backend
Automatic merge from submit-queue

Increase quota-bytes for etcd in v3 mode

Ref #20504
2016-11-06 09:45:59 -08:00
Kubernetes Submit Queue 835bc1b95d Merge pull request #35067 from mwielgus/daemonset-fed-e2e
Automatic merge from submit-queue

E2e tests for federated daemonset

Based on federated secrets e2e tests.

cc: @quinton-hoole
2016-11-06 09:10:34 -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
Lucas Käldström 190a513cf8 Fix the crossbuild that #35132 broke 2016-11-06 08:08:25 -08:00
Kubernetes Submit Queue eeb5ef2705 Merge pull request #36226 from piosz/fluent-manifest
Automatic merge from submit-queue

Made fluentd-gcl config consitent for GCI and ContainerVM
2016-11-06 07:56:40 -08:00
Kubernetes Submit Queue 6ee92d9311 Merge pull request #36215 from piosz/hpa-controller
Automatic merge from submit-queue

Enable HPA controller based on autoscaling/v1 api group

ref #29778

``` release-note
Enable HPA controller based on autoscaling/v1 api group.
```
2016-11-06 07:18:15 -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 48ef0faa0e Merge pull request #35216 from edsiper/fluentd-jemalloc
Automatic merge from submit-queue

cluster-addons: enable Jemalloc for Fluentd based images

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

This Pull Request includes two patches that enable the recommended use of Jemalloc memory allocator for container images that are based in Fluentd. The patches applies to the following cluster-addons:
- fluentd-es-image
- fluentd-gcp-image

**Which issue this PR fixes** 

This PR is part of the solution for issues:
-  kubernetes/kubernetes/issues/32762
-  GoogleCloudPlatform/fluent-plugin-google-cloud/issues/87

When Fluentd runs in high load environments, it's likely the default operating system memory allocator will generate a high fragmentation ending up in a high memory usage. In order to reduce fragmentation and decrease memory usage an alternative memory allocator as Jemalloc is used. 

![](https://cloud.githubusercontent.com/assets/369718/19498577/eaa9f324-954e-11e6-9a6b-6b30310a66a3.png)

For the record: fluentd-es-image uses [td-agent](https://docs.treasuredata.com/articles/td-agent) Fluentd package maintained by Treasure Data, which contains Jemalloc 4.2.1 (latest stable version). The google-fluentd package used in fluentd-gcp-image comes with Jemalloc 2.2.5, which have many known issues, I strongly suggest google-fluentd package gets updated.

**Special notes for your reviewer**:

In the research of this topic have been involved @piosz and @Crassirostris.
2016-11-06 05:26:58 -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
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
Michail Kargakis e7158d8eaf test: ignore 404 when deleting pods 2016-11-06 13:30:47 +01: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 ff8e780c30 Merge pull request #36244 from Crassirostris/export-rescheduler-logs
Automatic merge from submit-queue

Add rescheduler.log to the logs exported from master

Related to https://github.com/kubernetes/kubernetes/issues/36227

@piosz
2016-11-06 03:38:35 -08:00