Commit Graph

21014 Commits (b3fc6556e4d59e00d360f7fd8035e606a032603b)

Author SHA1 Message Date
Kubernetes Submit Queue a86392a326 Merge pull request #45333 from colemickens/cmpr-cpfix
Automatic merge from submit-queue (batch tested with PRs 45382, 45384, 44781, 45333, 45543)

azure: improve user agent string

**What this PR does / why we need it**: the UA string doesn't actually contain "kubernetes" in 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**: none 

**Release note**:

```release-note
NONE
```

cc: @brendandburns
2017-05-10 17:47:45 -07:00
Kubernetes Submit Queue aacc9729f1 Merge pull request #44781 from wongma7/outervolumespec
Automatic merge from submit-queue (batch tested with PRs 45382, 45384, 44781, 45333, 45543)

Ensure desired state of world populator runs before volume reconstructor

If the kubelet's volumemanager reconstructor for actual state of world runs before the desired state of world has been populated, the pods in the actual state of world will have some incorrect volume information: namely outerVolumeSpecName, which if incorrect leads to part of the issue here https://github.com/kubernetes/kubernetes/issues/43515, because WaitForVolumeAttachAndMount searches the actual state of world with the correct outerVolumeSpecName and won't find it so reports 'timeout waiting....', etc. forever for existing pods. The comments acknowledge that this is a known issue

The all sources ready check doesn't work because the sources being ready doesn't necessarily mean the desired state of world populator added pods from the sources. So instead let's put the all sources ready check in the *populator*, and when the sources are ready, it will be able to populate the desired state of world and make "HasAddedPods()" return true. THEN, the reconstructor may run.

@jingxu97 PTAL, you wrote all of the reconstruction stuff

```release-note
NONE
```
2017-05-10 17:47:43 -07:00
Random-Liu 613c42b89b Make a log line more clear in kuberuntime_manager.go. 2017-05-10 16:32:00 -07:00
David Ashpole b69dacbd86 remove unused fields from Kubelet struct 2017-05-10 16:25:09 -07:00
Kubernetes Submit Queue 14b898d115 Merge pull request #45595 from justinsb/sts_alias_2
Automatic merge from submit-queue

Add sts alias for kubectl statefulset
2017-05-10 16:06:58 -07:00
Matthew Wong 9c6223f885 Don't attempt to make and chmod subPath if it already exists 2017-05-10 18:47:03 -04:00
Shyam Jeedigunta 27fa52390b Use real proxier inside hollow-proxy but with mocked syscalls 2017-05-10 23:45:26 +02:00
Yu-Ju Hong daa329c9ae Remove the deprecated `--enable-cri` flag
Except for rkt, CRI is the default and only integration point for
container runtimes.
2017-05-10 13:03:41 -07:00
Kubernetes Submit Queue 3ddbed969b Merge pull request #45490 from deads2k/owners-01-extensions
Automatic merge from submit-queue

add owners to new packages

Adds owners files to some packages that need it.
2017-05-10 12:51:51 -07:00
Kubernetes Submit Queue bfa18037ce Merge pull request #45404 from wojtek-t/edge_based_winuserspace_proxy
Automatic merge from submit-queue

Edge based winuserspace proxy

Last PR in the series of making kube-proxy event-based.

This is a sibling PR to https://github.com/kubernetes/kubernetes/pull/45356 that is already merged.
The second commit is removing the code that is no longer used.
2017-05-10 12:51:43 -07:00
Kubernetes Submit Queue 77b2e6302c Merge pull request #45236 from verb/sharedpid-2-default
Automatic merge from submit-queue

Enable shared PID namespace by default for docker pods

**What this PR does / why we need it**: This PR enables PID namespace sharing for docker pods by default, bringing the behavior of docker in line with the other CRI runtimes when used with docker >= 1.13.1.

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

**Special notes for your reviewer**: cc @dchen1107 @yujuhong 

**Release note**:

```release-note
Kubernetes now shares a single PID namespace among all containers in a pod when running with docker >= 1.13.1. This means processes can now signal processes in other containers in a pod, but it also means that the `kubectl exec {pod} kill 1` pattern will cause the pod to be restarted rather than a single container.
```
2017-05-10 12:06:01 -07:00
Derek Carr 4e002eacb1 Do not fail cgroup exists checks for unknown controllers 2017-05-10 14:52:09 -04:00
divyenpatel 9f89b57b74 fix implementation of VolumesAreAttached function 2017-05-10 10:16:13 -07:00
Justin Santa Barbara e1fdb8b027 Add sts alias for kubectl statefulset
Saves a lot of typing!
2017-05-10 09:57:36 -04:00
Wojciech Tyczynski ce752e3fc9 Remove no-longer used code in proxy/config 2017-05-10 12:16:35 +02:00
Wojciech Tyczynski 57d35d5acb Switch winuserspace proxy to be event based for services 2017-05-10 12:14:37 +02:00
Shiyang Wang d43f4bb3b6 refactor functions in editoptions.go to use less arguments 2017-05-10 16:46:04 +08:00
zhangxiaoyu-zidif 00b67443f0 daemoncontroller.go:format for 2017-05-10 14:06:34 +08:00
Kubernetes Submit Queue 3fbfafdd0a Merge pull request #45523 from colemickens/cmpr-cpfix3
Automatic merge from submit-queue

azure: load balancer: support UDP, fix multiple loadBalancerSourceRanges support, respect sessionAffinity

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

1. Adds support for UDP ports
2. Fixes support for multiple `loadBalancerSourceRanges`
3. Adds support the Service spec's `sessionAffinity`
4. Removes dead code from the Instances file

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

**Special notes for your reviewer**: n/a

**Release note**:

```release-note
azure: add support for UDP ports
azure: fix support for multiple `loadBalancerSourceRanges`
azure: support the Service spec's `sessionAffinity`
```
2017-05-09 22:07:55 -07:00
xiangpengzhao a9a36fcf4b
Display <none> for "kubectl get pods -o wide" when node is empty. 2017-05-10 12:53:14 +08:00
Kubernetes Submit Queue 148b5da60b Merge pull request #44746 from xiangpengzhao/fix-podpreset
Automatic merge from submit-queue

Add support for PodPreset in `kubectl get` command

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-05-09 21:16:17 -07:00
Kubernetes Submit Queue 51a3413371 Merge pull request #45307 from yujuhong/mv-docker-client
Automatic merge from submit-queue (batch tested with PRs 45453, 45307, 44987)

Migrate the docker client code from dockertools to dockershim

Move docker client code from dockertools to dockershim/libdocker. This includes
DockerInterface (renamed to Interface), FakeDockerClient, etc.

This is part of #43234
2017-05-09 20:23:44 -07:00
Kubernetes Submit Queue 61593ba8b8 Merge pull request #45453 from k82cn/k8s_45220
Automatic merge from submit-queue (batch tested with PRs 45453, 45307, 44987)

Init cache with assigned non-terminated pods before scheduling

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

**Release note**:

```release-note
The fix makes scheduling go routine waiting for cache (e.g. Pod) to be synced.
```
2017-05-09 20:23:37 -07:00
Lee Verberne f83337a8ac Fix AssertCalls usage for kubelet fake runtimes
Despite its name, AssertCalls() does not assert anything. It returns an
error that must be checked. This was causing false negatives for
a handful of unit tests.
2017-05-10 01:40:58 +00:00
Kubernetes Submit Queue 7c3f8c9bcf Merge pull request #45181 from vmware/NodeAddressesIPV6IssueNew
Automatic merge from submit-queue

Filter out IPV6 addresses from NodeAddresses() returned by vSphere

The vSphere CP returns both IPV6 and IPV4 addresses for a Node as part of NodeAddresses() implementation. However, Kubelet fails due to duplicate api.NodeAddress value when the node has an IPV6 address associated with it. This issue is tracked in #42690. The following are observed:

- when we enabled the logs and checked the addresses sent by vSphere CP to Kubelet, we don't see any duplicate addresses at all.
- Also, kubelet_node_status doesn’t receive any duplicate address from cloud provider.

However, when we filter out the IPV6 addresses and only return IPV4 addresses to the Kubelet, it works perfectly fine. 

Even though the Kubelet receives the non-duplicate node-addresses, it still errors out with duplicate node addresses. It might be an issue when kubelet propagates these addresses to API server (or) API server is enable to handle IPV6 addresses.

@divyenpatel @abrarshivani @pdhamdhere @tusharnt

**Release note**:

```release-note
None
```
2017-05-09 18:16:03 -07:00
xiangpengzhao baafbf406e Add support for PodPreset in kubectl get command 2017-05-10 08:59:22 +08:00
xilabao 697efd1baf De-duplication in printer 2017-05-10 08:45:20 +08:00
Matthew Wong bbe82a2688 Ensure desired state of world populator runs before volume reconstructor 2017-05-09 18:25:59 -04:00
Kubernetes Submit Queue 76889118d7 Merge pull request #45280 from JulienBalestra/run-pod-inside-unique-netns
Automatic merge from submit-queue

rkt: Generate a new Network Namespace for each Pod

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

This PR concerns the Kubelet with the Container runtime rkt.
Currently, when a Pod stops and the kubelet restart it, the Pod will use the **same network namespace** based on its PodID.

When the Garbage Collection is triggered, it delete all the old resources and the current network namespace.

The Pods and all containers inside it loose the _eth0_ interface.
I explained more in details in #45149 how to reproduce this behavior.

This PR generates a new unique network namespace name for each new/restarting Pod.
The Garbage collection retrieve the correct network namespace and remove it safely.

**Which issue this PR fixes** : 

fix #45149 

**Special notes for your reviewer**:

Following @yifan-gu guidelines, so maybe expecting him for the final review.

**Release note**:

`NONE`
2017-05-09 15:07:34 -07:00
Kubernetes Submit Queue aee07e9464 Merge pull request #45446 from zdj6373/cni
Automatic merge from submit-queue

cni Log changes

Newly modified log error, modified
2017-05-09 14:23:32 -07:00
Dhawal Patel 0e57b912a6 Update comment on ServiceAnnotationLoadBalancerInternal 2017-05-09 13:41:15 -07:00
Kubernetes Submit Queue b60d322c27 Merge pull request #44991 from aaronlevy/cns
Automatic merge from submit-queue

Skip inspecting pod network if unknown namespace

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

If we fail to determine the network namespace of a container we still try to inspect the state - even though there is no way for it to succeed. This leads to errors like:

> NetworkPlugin cni failed on the status hook for pod "X": Unexpected command output nsenter: cannot open : No such file or directory

Instead, if we cannot determine the network namespace, we should just exit with a (hopefully) more clear error message.

I left the wording as assuming a terminated pod, based on:
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/dockershim/helpers.go#L208-L211

ref: 
https://github.com/kubernetes-incubator/bootkube/issues/475
https://github.com/coreos/coreos-kubernetes/issues/856
2017-05-09 13:36:56 -07:00
Kubernetes Submit Queue f8f9d7db93 Merge pull request #45304 from deads2k/controller-03-ns-discovery
Automatic merge from submit-queue (batch tested with PRs 45304, 45006, 45527)

increase the QPS for namespace controller

The namespace controller is really chatty. Especially to discovery since that involves two requests for every API version available. This bumps the QPS and burst on the namespace controller to avoid being stuck waiting.
2017-05-09 12:04:41 -07:00
Klaus Ma 7bf698a2c8 generated codes. 2017-05-10 01:50:38 +08:00
Kubernetes Submit Queue 202a9f8445 Merge pull request #42317 from NickrenREN/attach-detach-error-info-print
Automatic merge from submit-queue

add and clear err message about RemoveVolumeFromReportAsAttached()

**Release note**:

```release-note
NONE
```
2017-05-09 10:44:32 -07:00
Kubernetes Submit Queue fc28762671 Merge pull request #45448 from zhangxiaoyu-zidif/cleancode-nfs-return-err
Automatic merge from submit-queue (batch tested with PRs 44798, 45537, 45448, 45432)

nfs.go: cleancode err

**What this PR does / why we need it**:
The modification makes  code clean, simple, and easy to inspect. 

**Release note**:

```release-note
NONE
```
2017-05-09 08:29:37 -07:00
Kubernetes Submit Queue 49626c975b Merge pull request #44798 from zetaab/master
Automatic merge from submit-queue

Statefulsets for cinder: allow multi-AZ deployments, spread pods across zones

**What this PR does / why we need it**: Currently if we do not specify availability zone in cinder storageclass, the cinder is provisioned to zone called nova. However, like mentioned in issue, we have situation that we want spread statefulset across 3 different zones. Currently this is not possible with statefulsets and cinder storageclass. In this new solution, if we leave it empty the algorithm will choose the zone for the cinder drive similar style like in aws and gce storageclass solutions. 

**Which issue this PR fixes** fixes #44735

**Special notes for your reviewer**:

example:

```
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
  name: all
provisioner: kubernetes.io/cinder
---
apiVersion: v1
kind: Service
metadata:
  annotations:
    service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
  name: galera
  labels:
    app: mysql
spec:
  ports:
  - port: 3306
    name: mysql
  clusterIP: None
  selector:
    app: mysql
---
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
  name: mysql
spec:
  serviceName: "galera"
  replicas: 3
  template:
    metadata:
      labels:
        app: mysql
      annotations:
        pod.alpha.kubernetes.io/initialized: "true"
    spec:
      containers:
      - name: mysql
        image: adfinissygroup/k8s-mariadb-galera-centos:v002
        imagePullPolicy: Always
        ports:
        - containerPort: 3306
          name: mysql
        - containerPort: 4444
          name: sst
        - containerPort: 4567
          name: replication
        - containerPort: 4568
          name: ist
        volumeMounts:
        - name: storage
          mountPath: /data
        readinessProbe:
          exec:
            command:
            - /usr/share/container-scripts/mysql/readiness-probe.sh
          initialDelaySeconds: 15
          timeoutSeconds: 5
        env:
          - name: POD_NAMESPACE
            valueFrom:
              fieldRef:
                apiVersion: v1
                fieldPath: metadata.namespace
  volumeClaimTemplates:
  - metadata:
      name: storage
      annotations:
        volume.beta.kubernetes.io/storage-class: all
    spec:
      accessModes: [ "ReadWriteOnce" ]
      resources:
        requests:
          storage: 12Gi
```

If this example is deployed it will automatically create one replica per AZ. This helps us a lot making HA databases.

Current storageclass for cinder is not perfect in case of statefulsets. Lets assume that cinder storageclass is defined to be in zone called nova, but because labels are not added to pv - pods can be started in any zone. The problem is that at least in our openstack it is not possible to use cinder drive located in zone x from zone y. However, should we have possibility to choose between cross-zone cinder mounts or not? Imo it is not good way of doing things that they mount volume from another zone where the pod is located(means more network traffic between zones)? What you think? Current new solution does not allow that anymore (should we have possibility to allow it? it means removing the labels from pv).

There might be some things that needs to be fixed still in this release and I need help for that. Some parts of the code is not perfect.

Issues what i am thinking about (I need some help for these):
1) Can everybody see in openstack what AZ their servers are? Can there be like access policy that do not show that? If AZ is not found from server specs, I have no idea how the code behaves. 
2) In GetAllZones() function, is it really needed to make new serviceclient using openstack.NewComputeV2 or could I somehow use existing one
3) This fetches all servers from some openstack tenant(project). However, in some cases kubernetes is maybe deployed only to specific zone. If kube servers are located for instance in zone 1, and then there are another servers in same tenant in zone 2. There might be usecase that cinder drive is provisioned to zone-2 but it cannot start pod, because kubernetes does not have any nodes in zone-2. Could we have better way to fetch kubernetes nodes zones? Currently that information is not added to kubernetes node labels automatically in openstack (which should I think). I have added those labels manually to nodes. If that zone information is not added to nodes, the new solution does not start stateful pods at all, because it cannot target pods.


cc @rootfs @anguslees @jsafrane 

```release-note
Default behaviour in cinder storageclass is changed. If availability is not specified, the zone is chosen by algorithm. It makes possible to spread stateful pods across many zones.
```
2017-05-09 08:10:44 -07:00
Kubernetes Submit Queue 49e5435529 Merge pull request #45403 from sttts/sttts-tri-state-watch-capacity
Automatic merge from submit-queue

apiserver: injectable default watch cache size

This makes it possible to override the default watch capacity in the REST options getter. Before this PR the default is written into the storage struct explicitly, and if it is the default, the REST options getter didn't know. With this the PR the default is applied late and can be injected from the outside.
2017-05-09 07:27:35 -07:00
Kubernetes Submit Queue 02d75cb453 Merge pull request #45481 from CaoShuFeng/xtables/lock
Automatic merge from submit-queue

Remove leaked tmp file in unit tests

Some unit tests leave a temp file in work space:
pkg/util/iptables/xtables.lock
This patch remove that file
@dcbw 
**Release note**:

```NONE
```
2017-05-09 06:40:31 -07:00
Kubernetes Submit Queue d602ea69dc Merge pull request #45295 from rootfs/vol-owner
Automatic merge from submit-queue

add rootfs gnufied and childsb to volume approver

**What this PR does / why we need it**:
add me and @gnufied @childsb to volume approver 
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-05-09 04:13:00 -07:00
JulienBalestra 7a2e0e24f7 Generate a new Network Namespace for each Pod. 2017-05-09 09:59:00 +02:00
Cole Mickens 3fc0c05d83 azure: instances: remove dead code 2017-05-09 00:00:12 -07:00
Cole Mickens c349d36da3 azure: loadbalancer: fix sourceAddrPrefix support
Fixes support for multiple instances of loadBalancerSourceRanges.
Previously, the names of the rules for each address range conflicted
causing only one to be applied. Now each gets a unique name.
2017-05-08 23:58:29 -07:00
Cole Mickens 355c2be7a0 azure: loadbalancer: support UDP svc ports+rules 2017-05-08 23:58:25 -07:00
Kubernetes Submit Queue 20fa30e4b5 Merge pull request #45330 from NickrenREN/openstack-backoff
Automatic merge from submit-queue (batch tested with PRs 45018, 45330)

Add exponential backoff to openstack loadbalancer functions

Using  exponential backoff to lower openstack load and reduce API call throttling


**Release note**:

```release-note
NONE
```
2017-05-08 23:00:38 -07:00
Kubernetes Submit Queue f036725a0e Merge pull request #45018 from ravisantoshgudimetla/cleanup_qos#39148
Automatic merge from submit-queue (batch tested with PRs 45018, 45330)

Clean up for qos.go

**What this PR does / why we need it**:
Seems we are not using any of those functions. 

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



**Release note**:

```release-note
A small clean up to remove unnecessary functions.
```
2017-05-08 23:00:36 -07:00
Cole Mickens 8b50b83067 azure: loadbalancer: respect svc sessionaffinity
If the Service spec sets sessionAffinity, reflects that in the
configuration specified for the Azure loadbalancer.
2017-05-08 20:08:05 -07:00
Balu Dontu d05b279d9b Filter out IPV6 addresses from NodeAddresses() returned by vSphere 2017-05-08 18:23:06 -07:00
Hardy Simpson e7ea942aac fix endpoints controller del lead-election endpoints 2017-05-09 00:53:50 +00:00
Kubernetes Submit Queue f263fbe5e1 Merge pull request #45200 from jcbsmpsn/init-certificate-manager-no-certs
Automatic merge from submit-queue (batch tested with PRs 45200, 45203)

Allow certificate manager to be initialized with no certs.

Adds support to the certificate manager so it can be initialized with no
certs and only a connection to the certificate request signing API. This
specifically covers the scenario for the kubelet server certificate,
where there is a request signing client but on first boot there is no
bootstrapping or local certs.
2017-05-08 17:43:40 -07:00
Kubernetes Submit Queue ceff8d8d4d Merge pull request #45320 from pwittrock/junit
Automatic merge from submit-queue (batch tested with PRs 45508, 44258, 44126, 45441, 45320)

Print a newline after ginkgo tests so the test infra doesn't think th…

Fixes #45279

Print a newline after ginkgo tests so the test infra doesn't think that they fail

```release-note
NONE
```
2017-05-08 16:34:48 -07:00
Kubernetes Submit Queue 60e02711d4 Merge pull request #44126 from xiangpengzhao/fix-const
Automatic merge from submit-queue (batch tested with PRs 45508, 44258, 44126, 45441, 45320)

Use existing global var criSupportedLogDrivers

**What this PR does / why we need it**:
Use existing global var `criSupportedLogDrivers` defined in docker_service.go. If CRI supports other log drivers in the future, we will only need to modify that global var.

cc @Random-Liu
2017-05-08 16:34:44 -07:00
Kubernetes Submit Queue a062782524 Merge pull request #44258 from wlan0/master
Automatic merge from submit-queue (batch tested with PRs 45508, 44258, 44126, 45441, 45320)

cloud initialize node in external cloud controller

@thockin This PR adds support in the `cloud-controller-manager` to initialize nodes (instead of kubelet, which did it previously)

This also adds support in the kubelet to skip node cloud initialization when `--cloud-provider=external`

Specifically,

Kubelet

1. The kubelet has a new flag called `--provider-id` which uniquely identifies a node in an external DB
2. The kubelet sets a node taint - called "ExternalCloudProvider=true:NoSchedule" if cloudprovider == "external"

Cloud-Controller-Manager

1. The cloud-controller-manager listens on "AddNode" events, and then processes nodes that starts with that above taint. It performs the cloud node initialization steps that were previously being done by the kubelet.
2. On addition of node, it figures out the zone, region, instance-type, removes the above taint and updates the node.
3. Then periodically queries the cloudprovider for node addresses (which was previously done by the kubelet) and updates the node if there are new addresses

```release-note
NONE  
```
2017-05-08 16:34:43 -07:00
Kubernetes Submit Queue cfe6769f4e Merge pull request #45508 from sjenning/fix-plugin-loader
Automatic merge from submit-queue (batch tested with PRs 45508, 44258, 44126, 45441, 45320)

check for walkErr before fileInfo deref

Fixes #45507

@derekwaynecarr @fabianofranz
2017-05-08 16:34:41 -07:00
Kubernetes Submit Queue 6316ecefaa Merge pull request #45501 from timothysc/componentconfig_to_configmap
Automatic merge from submit-queue (batch tested with PRs 41903, 45311, 45474, 45472, 45501)

Adds a helper to convert componentconfig into a configmap

**What this PR does / why we need it**:
Adds a utility function that will be used by self-hosted components such as `kubeadm` but is also a step towards https://github.com/kubernetes/kubernetes/issues/44857 

**Special notes for your reviewer**:

**Release note**:

```
NONE
```

/cc @kubernetes/sig-cluster-lifecycle-pr-reviews  @bsalamat
2017-05-08 15:46:42 -07:00
Kubernetes Submit Queue d092fc546b Merge pull request #45474 from xiangpengzhao/fix-port-none
Automatic merge from submit-queue (batch tested with PRs 41903, 45311, 45474, 45472, 45501)

Display <none> when port is empty.

**What this PR does / why we need it**:
If container ports are not specified, `kubectl describe` displays `<none>` instead of empty.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-05-08 15:46:39 -07:00
Kubernetes Submit Queue 52903829b1 Merge pull request #45311 from vmware/fix_fetch_VM_UUID
Automatic merge from submit-queue (batch tested with PRs 41903, 45311, 45474, 45472, 45501)

Fetch VM UUID from - /sys/class/dmi/id/product_serial

**What this PR does / why we need it**:
Current code fetch VM uuid using uuid reported at `'/sys/devices/virtual/dmi/id/product_uuid'.` This doesn't work with all the distros like Ubuntu 16.04 and Fedora. 

updating code to fetch VM uuid from `/sys/class/dmi/id/product_serial`



**Which issue this PR fixes**
fixes #

**Special notes for your reviewer**:
Verified UUID  is matching with VM UUID on ubuntu 16.04, Cent OS 7.3 , and Photon OS

@BaluDontu @tusharnt

**Release note**:

```release-note
NONE
```
2017-05-08 15:46:37 -07:00
Kubernetes Submit Queue 332b095ca9 Merge pull request #44968 from MrHohn/kube-proxy-healthcheck
Automatic merge from submit-queue (batch tested with PRs 44727, 45409, 44968, 45122, 45493)

Separate healthz server from metrics server in kube-proxy

From #14661, proposal is on kubernetes/community#552.

Couple bullet points as in commit:
- /healthz will be served on 0.0.0.0:10256 by default.
- /metrics and /proxyMode will be served on port 10249 as before.
- Healthz handler will verify timestamp in iptables mode.

/assign @nicksardo @bowei @thockin 

**Release note**:

```release-note
NONE
```
2017-05-08 14:54:38 -07:00
Kubernetes Submit Queue 95d8fbb599 Merge pull request #45409 from humblec/glusterfs-code-cleanup
Automatic merge from submit-queue (batch tested with PRs 44727, 45409, 44968, 45122, 45493)

More go friendly variable names.

clusterId -> clusterID
volumeId  -> volumeID

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-05-08 14:54:37 -07:00
Kubernetes Submit Queue f4fc4be805 Merge pull request #44727 from x1957/master
Automatic merge from submit-queue

adds log when gpuManager.start() failed

If gpuManager.start() returns error, there is no log.

We confused with scheduler do not schedule any pod(with gpu) to one node.
kubectl describe node xxx shows there is no gpu on that node, because the gpu driver do not work on that node, gpuManager.start() failed, but we can not see anything in log.
2017-05-08 14:27:48 -07:00
Kubernetes Submit Queue e2924880df Merge pull request #41799 from johscheuer/fix-quobyte-example
Automatic merge from submit-queue

Remove unnecessary constants and add type to secret

**What this PR does / why we need it**:
Adds the type field to the secret for the `persistent-volume-provisioning` example of Quobyte. Also remove unnecessary constants in Quobyte Code base.

FYI
@rootfs @saad-ali @quolix
2017-05-08 13:25:22 -07:00
Timothy St. Clair 3ea4de60d9 Add a utility to convert componentconfig into a configmap 2017-05-08 15:18:27 -05:00
Seth Jennings 77ac3290d6 check for walkErr before fileInfo deref 2017-05-08 13:39:01 -05:00
Kubernetes Submit Queue 843c40e32e Merge pull request #45370 from deads2k/server-23-handlers
Automatic merge from submit-queue

refactor names for the apiserver handling chain

The names and structure around the handling chain got a bit confused.  This simplifies it back out into a single struct with three parts: overall handler, gorestful handler, pathrecording mux and makes the delegate wiring simpler
2017-05-08 07:06:27 -07:00
Kubernetes Submit Queue 08a030f464 Merge pull request #45088 from xilabao/add-validate-in-create-rolebinding
Automatic merge from submit-queue

add validate in create rolebinding
2017-05-08 06:21:49 -07:00
Kubernetes Submit Queue 69f2665c80 Merge pull request #45445 from xiangpengzhao/cleanup-petset
Automatic merge from submit-queue

Clean up petset

**What this PR does / why we need it**:
Rename legacy petset to statefulset.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-05-08 06:21:35 -07:00
deads2k c631934453 add owners to new packages 2017-05-08 08:46:57 -04:00
deads2k 4389f71576 refactor names for the apiserver handling chain 2017-05-08 07:55:31 -04:00
Cao Shufeng a393e95018 Remove leaked tmp file in unit tests 2017-05-08 18:07:02 +08:00
xiangpengzhao b981909206
Rename vars scheduledJob to cronJob in describe.go 2017-05-08 17:30:10 +08:00
Dr. Stefan Schimanski b799e62e1a apiserver: tri-state watch cache capacity: off, default, value 2017-05-08 11:29:01 +02:00
xiangpengzhao 3e389566bf
Display <none> when port is empty. 2017-05-08 16:08:49 +08:00
xilabao 0c0a32d870 add validate in create rolebinding 2017-05-08 15:52:44 +08:00
NickrenREN 0861688237 add and clear err message in RemoveVolumeFromReportAsAttached 2017-05-08 09:37:21 +08:00
Nail Islamov 66f45195af Replacing “Pod Injection Policy” with “Pod Preset” in the code documentation 2017-05-08 09:13:22 +10:00
Kubernetes Submit Queue 1f6bc94bf8 Merge pull request #39713 from k82cn/init_container_defaults
Automatic merge from submit-queue

Set defaults of init containers.

fixes #38542
2017-05-06 23:03:48 -07:00
Kubernetes Submit Queue 15f0468986 Merge pull request #44895 from dcbw/iptables-restore-manual-locking
Automatic merge from submit-queue

util/iptables: grab iptables locks if iptables-restore doesn't support --wait

When iptables-restore doesn't support --wait (which < 1.6.2 don't), it may
conflict with other iptables users on the system, like docker, because it
doesn't acquire the iptables lock before changing iptables rules. This causes
sporadic docker failures when starting containers.

To ensure those don't happen, essentially duplicate the iptables locking
logic inside util/iptables when we know iptables-restore doesn't support
the --wait option.

Unfortunately iptables uses two different locking mechanisms, one until
1.4.x (abstract socket based) and another from 1.6.x (/run/xtables.lock
flock() based).  We have to grab both locks, because we don't know what
version of iptables-restore exists since iptables-restore doesn't have
a --version option before 1.6.2.  Plus, distros (like RHEL) backport the
/run/xtables.lock patch to 1.4.x versions.

Related: https://github.com/kubernetes/kubernetes/pull/43575
See also: https://github.com/openshift/origin/pull/13845
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1417234

@kubernetes/rh-networking @kubernetes/sig-network-misc @eparis @knobunc @danwinship @thockin @freehan
2017-05-06 15:17:21 -07:00
zhangxiaoyu-zidif aec46961e9 nfs.go: cleancode err 2017-05-06 19:06:27 +08:00
Kubernetes Submit Queue 79a2e359cd Merge pull request #44024 from zhangxiaoyu-zidif/egnew
Automatic merge from submit-queue

fix the typos of e.g.

fix the typos of e.g.


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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-05-05 23:41:33 -07:00
Dan Williams 1067a22885 iptables: add OWNERS file 2017-05-05 23:34:18 -05:00
xiangpengzhao 709ca2e4cc
Clean up petset 2017-05-06 11:24:34 +08:00
zdj6373 aa86d7734b Log changes 2017-05-06 11:22:37 +08:00
wlan0 45d2bc06b7 cloud initialize node in external cloud controller 2017-05-05 16:51:45 -07:00
Abrar Shivani d6ba5d48c1 Add approvers to vsphere cloudprovider 2017-05-05 16:48:23 -07:00
Kubernetes Submit Queue c6ce00968d Merge pull request #45392 from nicksardo/gce-get-stats
Automatic merge from submit-queue (batch tested with PRs 43006, 45305, 45390, 45412, 45392)

[GCE] Collect latency metric on get/list calls

**What this PR does / why we need it**:
Collects latency & count measurements on GET and LIST operations to GCE cloud.

**Release note**:
```release-note
NONE
```
2017-05-05 16:39:11 -07:00
Kubernetes Submit Queue 99ede8ac1b Merge pull request #45390 from mbohlool/c4
Automatic merge from submit-queue (batch tested with PRs 43006, 45305, 45390, 45412, 45392)

Update go-restful dependency

This is required by #44787. But because both this and the changes in 44787 need constant rebase, I am trying to get this one in separately to make less rebases.

The change is only a dependency update.
2017-05-05 16:39:08 -07:00
Kubernetes Submit Queue b5831357dc Merge pull request #45305 from jwforres/fix-error-msg-spelling
Automatic merge from submit-queue (batch tested with PRs 43006, 45305, 45390, 45412, 45392)

Fix spelling in container manager error message
2017-05-05 16:39:06 -07:00
Kubernetes Submit Queue 069a25f378 Merge pull request #43006 from apilloud/fix_failure_crash
Automatic merge from submit-queue

Fix crash on Pods().Get() failure

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

Fixes a potential crash in syncPod when Pods().Get() returns an error other than NotFound. This is unlikely to occur with the standard client, but easily shows up with a stub kube client that returns Unimplemented to everything. Updates the unit test as well.

**Release note**:
`NONE`
2017-05-05 16:25:23 -07:00
Kubernetes Submit Queue 17d33ea82e Merge pull request #44830 from NickrenREN/remove-NodeLegacyHostIP
Automatic merge from submit-queue

Remove deprecated NodeLegacyHostIP

**Release note**:
```release-note
Remove deprecated node address type `NodeLegacyHostIP`.
```

ref #44807
2017-05-05 15:38:58 -07:00
Zihong Zheng e5db5dc3a1 Autogenerated files 2017-05-05 14:44:38 -07:00
Zihong Zheng ca59d909cf Separate healthz server from metrics server in kube-proxy
- /healthz will be served on 0.0.0.0:10256 by default.
- /metrics and /proxyMode will be served on port 10249
  as before.
- Healthz handler will verify timestamp in iptables mode.
2017-05-05 14:43:44 -07:00
Zihong Zheng eed08362d8 Add healthz server support to healthcheck package 2017-05-05 14:42:27 -07:00
Kubernetes Submit Queue 5b3d0bbe66 Merge pull request #44714 from jamiehannaford/unix_user_type
Automatic merge from submit-queue (batch tested with PRs 44590, 44969, 45325, 45208, 44714)

Use dedicated UnixUserID and UnixGroupID types

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

DRYs up type definitions by using the dedicated types in apimachinery 

**Which issue this PR fixes**

#38120

**Release note**:
```release-note
UIDs and GIDs now use apimachinery types
```
2017-05-05 14:08:17 -07:00
Kubernetes Submit Queue 32335ee473 Merge pull request #45208 from MrHohn/proxy-localendpoint-logic
Automatic merge from submit-queue (batch tested with PRs 44590, 44969, 45325, 45208, 44714)

Fix onlylocal endpoint's healthcheck nodeport logic

I was in the middle of rebasing #41162, surprisingly found the healthcheck nodeport logic in kube-proxy is still buggy. Separate this fix out as it isn't GA related.

/assign @freehan @thockin

**Release note**:

```release-note
NONE
```
2017-05-05 14:08:15 -07:00
Kubernetes Submit Queue ec3448deac Merge pull request #44969 from ianchakeres/ianchakeres/mount-err-cleanup
Automatic merge from submit-queue (batch tested with PRs 44590, 44969, 45325, 45208, 44714)

Refactor volume operation log and error messages

What this PR does / why we need it:
Adds wrappers for volume-specific error and log messages. Each message has a simple version that can be displayed to the user and a detailed version that can be used in logs. The messages that are used for events was also cleaned up. @msau42 

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

Special notes for your reviewer:
pkg/kubelet/volumemanager/reconciler/reconciler.go can be refactored. I can do that refactoring after this one.

Release note:

NONE
2017-05-05 14:08:10 -07:00
mbohlool ea042c6ca0 Update go-restful dependency 2017-05-05 13:57:01 -07:00
Yu-Ju Hong cf3635c876 Update bazel BUID files 2017-05-05 11:48:08 -07:00
Yu-Ju Hong 8cc4b3a81e Move legacy log symlink to kuberuntime
Also remove the dockertools.DockerType constant.
2017-05-05 11:48:08 -07:00
Yu-Ju Hong 389c140eaf Move docker client code from dockertools to dockershim/dockerlib
The code affected include DockerInterface (renamed to Interface),
FakeDockerClient, etc.
2017-05-05 11:48:08 -07:00
Kubernetes Submit Queue cc1f9f7254 Merge pull request #44740 from ravisantoshgudimetla/kubectl_taints_label_selector#44522
Automatic merge from submit-queue

Kubectl taint node based on label selector

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes  #44522
**Release note**:
```
Taints the node based on label selector
```
2017-05-05 09:25:02 -07:00
Kubernetes Submit Queue 40424457e4 Merge pull request #45411 from gmarek/nc_bug
Automatic merge from submit-queue (batch tested with PRs 45322, 44770, 45411)

Fix and make TaintManager harder to break before we move it out of NC

Fix #45342

cc @gyliu513
2017-05-05 08:19:44 -07:00
Kubernetes Submit Queue 4e74c43e9a Merge pull request #43436 from xilabao/add-set-rolebinding-command
Automatic merge from submit-queue

add set rolebinding/clusterrolebinding command

add command to set user/group/serviceaccount in rolebinding/clusterrolebinding /cc @liggitt @deads2k
2017-05-05 07:21:58 -07:00
gmarek 51c07147c8 Make taint manager harder to break before we move it out of NC 2017-05-05 15:48:44 +02:00
Kubernetes Submit Queue 99540c6435 Merge pull request #44922 from DirectXMan12/owners/add-directxman12-to-apis-autoscaling
Automatic merge from submit-queue

OWNERS: add directxman12 to pkg/apis/autoscaling

Added directxman12 (current SIG lead of SIG-autoscaling) as a reviewer for pkg/apis/autoscaling.

**Release note**:
```release-note
NONE
```
2017-05-05 06:37:29 -07:00
Kubernetes Submit Queue 5baa947c8c Merge pull request #45413 from gmarek/test_panic
Automatic merge from submit-queue (batch tested with PRs 43732, 45413)

Extend timeouts in timed_workers_test

Fix #45375

If it won't be enough I'll rewrite it to allow injectable timers.
2017-05-05 05:48:34 -07:00
Kubernetes Submit Queue 571ffcf926 Merge pull request #43732 from wanghaoran1988/fix_issue_42479
Automatic merge from submit-queue (batch tested with PRs 43732, 45413)

Handle maxUnavailable larger than spec.replicas

**What this PR does / why we need it**:
Handle maxUnavailable larger than spec.replicas
**Which issue this PR fixes** 
fixes #42479

**Special notes for your reviewer**:
None
**Release note**:
```
NONE
```
2017-05-05 05:48:33 -07:00
Jamie Hannaford 9440a68744 Use dedicated Unix User and Group ID types 2017-05-05 14:07:38 +02:00
gmarek 8f86881d18 Extend timeouts in timed_workers_test 2017-05-05 13:18:14 +02:00
Humble Chirammal 16badd361f More go friendly variable names.
clusterId -> clusterID
volumeId  -> volumeID

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-05-05 16:17:20 +05:30
Carlory 849454cd72 fix typo in docker_container.go
Signed-off-by: Carlory <fanbaofa@gmail.com>
2017-05-05 10:38:44 +00:00
Kubernetes Submit Queue ee39d359dd Merge pull request #45356 from wojtek-t/edge_based_userspace_proxy
Automatic merge from submit-queue

Edge based userspace proxy

Second last PR from my changes to kube-proxy to make it event-based.

This is switching userspace proxy to be even-based similarly to what we already did with iptables.
2017-05-05 02:06:35 -07:00
Kubernetes Submit Queue b9f340d922 Merge pull request #45349 from gmarek/taint_immunity
Automatic merge from submit-queue (batch tested with PRs 45218, 45349)

Make Daemons tolerate NoExecute taints correctly

Fix #45348

@kubernetes/sig-scheduling-pr-reviews
2017-05-05 01:18:32 -07:00
Wojciech Tyczynski 33a7a288a5 Switch userspace proxy to be event based for services 2017-05-05 09:35:38 +02:00
Wojciech Tyczynski 12058c6a63 Delete unused code 2017-05-05 09:35:38 +02:00
NickrenREN edea294ca2 Add exponential backoff to openstack loadbalancer functions
Using  exponential backoff to lower openstack load and reduce API call throttling
2017-05-05 10:24:32 +08:00
xilabao 20876757c2 add set rolebinding/clusterrolebinding command 2017-05-05 09:55:35 +08:00
Nick Sardo 63841dadb1 missed a file 2017-05-04 18:26:45 -07:00
Nick Sardo 48d58a15ec Add missing underscore 2017-05-04 18:07:53 -07:00
Nick Sardo 14d2cf85a6 Undo capture of list clusters 2017-05-04 18:06:10 -07:00
Nick Sardo 4a51f8a186 Add metric capture on GETs 2017-05-04 18:04:34 -07:00
Phillip Wittrock 83ff8f2d6c Print a newline after ginkgo tests so the test infra doesn't think that they fail
Fixes #45279
2017-05-04 16:20:53 -07:00
Ian Chakeres bbc8859176 Refactor volume operation log and error messages 2017-05-04 13:29:01 -07:00
Kubernetes Submit Queue d22a9c2599 Merge pull request #45321 from caesarxuchao/remove-GetGVK
Automatic merge from submit-queue (batch tested with PRs 45362, 45159, 45321, 45238)

Remove redundent GetObjectKind() defined on types

Embedding TypeMeta is enough.
2017-05-04 13:25:05 -07:00
divyenpatel 6886d69f12 change way to fetch VM UUID from VM 2017-05-04 12:27:32 -07:00
Chao Xu 5f5a70f65f generated clientset changes
propagate to client-go
update-bazel.sh
2017-05-04 11:30:51 -07:00
Chao Xu bbb94e42c1 remove registry from testing/fixture.go; update client-gen to not use
registry in the generated clients
2017-05-04 11:30:51 -07:00
Chao Xu 47b410f58b Remove redundent GetObjectKind() defined on top-level types
TypeMeta is embedded in all these types and TypeMeta has GetObjectKind()
method to implement the runtime.Object interface.
2017-05-04 10:31:58 -07:00
Andrew Pilloud b8dca4dd9d Refactor syncPod to fix panics on error 2017-05-04 10:18:24 -07:00
Kubernetes Submit Queue ca520e34a3 Merge pull request #44669 from humblec/gluster-metadata-pv
Automatic merge from submit-queue (batch tested with PRs 45081, 44669)

Add more metadata about dynamically provisioned PVs using PV annotation

This patch add below fields to Gluster dynamic pvs.

"Description: "Gluster: dynamically provisioned PVs"
"Creator": "heketi-dynamic"
"Type": "file"

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-05-04 10:05:56 -07:00
Kubernetes Submit Queue d41b11b8fb Merge pull request #45329 from supereagle/remove-useless-code
Automatic merge from submit-queue

remove useless code in kubelet

**What this PR does / why we need it**:
This code has logical error as the etc-hosts file will be recreated even it already exists. In addition, if do not recreate etc-hosts file when it exists, the pod ip in it will be out of date when pod ips change. So remove this code as it is not needed.

**Which issue this PR fixes**: 

**Special notes for your reviewer**:
xrefer: #44481, #44473

**Release note**:
```release-note
NONE
```
2017-05-04 09:06:33 -07:00
Humble Chirammal 1d17c0ccef Add more metadata about dynamically provisioned PVs using
PV annotation:

This patch add below fields to Gluster dynamic pvs:

   "Description: "Gluster: dynamically provisioned PV"
   "Creator": "heketi-dynamic"
   "Type": "file"

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-05-04 20:17:53 +05:30
Kubernetes Submit Queue 82bc084297 Merge pull request #45169 from ncdc/lister-gen-typo
Automatic merge from submit-queue

Fix typo in lister-gen, regenerate

NamespaeLister -> NamespaceLister

@stevekuznetsov, just for you 😄
2017-05-04 07:24:01 -07:00
gmarek f371c14314 Make Daemons tolerate NoExecute taints correctly 2017-05-04 15:25:03 +02:00
Kubernetes Submit Queue 1bfef70836 Merge pull request #44466 from deads2k/server-22-custom-mux
Automatic merge from submit-queue

use our own serve mux that directs how we want

alternative to https://github.com/kubernetes/kubernetes/pull/44405

I really wanted to avoid writing my own, but the gorilla mux works via redirect, which would be a change.  This does exact pattern matches only unless someone explicitly requests a prefix match.

@liggitt happier?
2017-05-04 05:43:53 -07:00
Kubernetes Submit Queue f6ec7bade1 Merge pull request #45316 from yujuhong/dockershim-plugin-settings
Automatic merge from submit-queue (batch tested with PRs 45316, 45341)

Pass NoOpLegacyHost to dockershim in --experimental-dockershim mode

This allows dockershim to use network plugins, if needed.

/cc @Random-Liu
2017-05-04 05:19:49 -07:00
Kubernetes Submit Queue 3b8aac9b22 Merge pull request #45285 from suyogbarve/master
Automatic merge from submit-queue

use of --local should completely eliminate communication with API server

This PR is a bug fix for #45223 
It allows --local flag to completely avoid communication with api server. 

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

fixes #45223

This is a simple change, to set the value of boolean flag "local" on o.Local variable
2017-05-04 01:40:20 -07:00
Cole Mickens b224e85ebd azure: improve user agent string 2017-05-04 01:10:13 -07:00
supereagle b186e367e1 remove useless code in kubelet 2017-05-04 13:53:48 +08:00
Kubernetes Submit Queue 3a259d38b2 Merge pull request #45292 from yujuhong/seccomp_test
Automatic merge from submit-queue (batch tested with PRs 44068, 45292)

Add the seccomp profile loading test to dockershim

The test was originally in docker_manager_test.go (now removed). I
copied and adapated the logic for the new test. Also move the origina
test fixtures needed for the test.

ref: the original test is at https://github.com/kubernetes/kubernetes/blob/v1.6.2/pkg/kubelet/dockertools/docker_manager_linux_test.go#L294

This is part of #43234
2017-05-03 20:50:00 -07:00
Kubernetes Submit Queue 08a825c9e9 Merge pull request #44068 from mkumatag/k8s_add_apiversion
Automatic merge from submit-queue

Use Docker API Version instead of docker version

**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 #
Fixes #42492
**Special notes for your reviewer**:

**Release note**:

`Update cadvisor to latest head to use docker APIversion exposed by cadvisor`
2017-05-03 20:21:45 -07:00
Kubernetes Submit Queue 482e3501dc Merge pull request #44904 from feiskyer/status
Automatic merge from submit-queue (batch tested with PRs 45056, 44904, 45312)

CRI: clarify the behavior of PodSandboxStatus and ContainerStatus

**What this PR does / why we need it**:
Currently, we define that ImageStatus should return `nil, nil` when requested image doesn't exist, and kubelet is relying on this behavior now.

However, we haven't clearly defined the behavior of PodSandboxStatus and ContainerStatus. Currently, they return error when requested sandbox/container doesn't exist, and kubelet is also relying on this behavior.

**Which issue this PR fixes** 

Fixes #44885.

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-05-03 19:44:02 -07:00
Kubernetes Submit Queue e1423acc50 Merge pull request #45056 from ericchiang/update-oauth2
Automatic merge from submit-queue

bump(golang.org/x/oauth2): a6bd8cefa1811bd24b86f8902872e4e8225f74c4

As I tackle https://github.com/kubernetes/kubernetes/issues/42654 kubectl's OpenID Connect plugin will start using golang.org/x/oauth2 for refreshing, instead of go-oidc's own hand rolled oauth2 implementation. In preparation, update golang.org/x/oauth2 to include 7374b3f1ec which fixes refreshing with Okta.

We also somehow removed the dependency on `google.golang.org/appengine`. Maybe 8cf58155e4?

cc @kubernetes/sig-auth-pr-reviews
2017-05-03 19:34:14 -07:00
xiangpengzhao 9af3b0a406 Use existed global var criSupportedLogDrivers and helper function IsCRISupportedLogDriver 2017-05-04 10:25:21 +08:00
Kubernetes Submit Queue 84f41f3388 Merge pull request #41733 from feiskyer/images
Automatic merge from submit-queue (batch tested with PRs 45314, 45250, 41733)

CRI: add ImageFsInfo API

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

kubelet currently relies on cadvisor to get the ImageFS info for supported runtimes, i.e., docker and rkt. This PR adds ImageFsInfo API to CRI so kubelet could get the ImageFS correctly for all runtimes.

**Which issue this PR fixes** 

First step for  #33048 ~~also reverts temporary ImageStats in #33870~~.

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-05-03 18:47:04 -07:00
Yu-Ju Hong 40b0474956 pass noopnetworkhost to dockershim 2017-05-03 16:32:01 -07:00
Yu-Ju Hong 78b2c3b4c2 kuberuntime: remove the unused network plugin
Network plugin is completely handled by the container runtimes. Remove
this unused field in the kuberuntime manager.
2017-05-03 16:21:46 -07:00
Suyog Barve 05131c627f use of --local should completely eliminate communication with API server
fix testcase use of --local should completely eliminate communication with API server
2017-05-03 15:57:57 -05:00
Kubernetes Submit Queue e537cec9b0 Merge pull request #45299 from yujuhong/cleanup-trivial
Automatic merge from submit-queue

More dockertools cleanup

This is part of #43234.
2017-05-03 13:57:49 -07:00
deads2k c837c7fb1a use our own serve mux that directs how we want 2017-05-03 16:21:45 -04:00
Jessica Forrester bd64b3b15c
Fix spelling in container manager error message 2017-05-03 16:08:16 -04:00
Yu-Ju Hong 3cd6b21b77 Add the seccomp profile loading test to dockershim
The test was originally in docker_manager_test.go (now removed). I
copied and adapated the logic for the new test.

Also move the original test fixtures needed for the test.
2017-05-03 12:55:56 -07:00
deads2k 575c6d7ad8 increase the QPS for namespace controller 2017-05-03 15:25:13 -04:00
Kubernetes Submit Queue fcd9b7f7ba Merge pull request #44295 from rootfs/azure-devicepath-nil
Automatic merge from submit-queue (batch tested with PRs 45283, 45289, 45248, 44295)

Azure disk: dealing with missing disk probe

**What this PR does / why we need it**:
While Azure disks are expected to attach to SCSI host 3 and above on general purpose instances, on certain Azure instances disks are under SCSI host 2. 

This fix searches all LUNs but excludes those used by Azure sys disks, based on udev rules [here](https://raw.githubusercontent.com/Azure/WALinuxAgent/master/config/66-azure-storage.rules)

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-05-03 12:08:00 -07:00
Yu-Ju Hong 51188e6f70 Update bazel files 2017-05-03 11:22:06 -07:00
Yu-Ju Hong 607bdd574d Move docker keyring lookup test to pkg/credentailprovider
Also remove unused image tests in docker_test.go
2017-05-03 11:22:06 -07:00
Yu-Ju Hong 5644587e07 More dockertools cleanup
Move some constants/functions to dockershim and remove unused tests.
2017-05-03 11:22:06 -07:00
Kubernetes Submit Queue 80f26fa8a8 Merge pull request #44523 from caesarxuchao/remove-client-go-api-scheme
Automatic merge from submit-queue

Remove imports of k8s.io/client-go/pkg/api

k8s.io/client-go/pkg/api will be eliminated by #44784, so we need to remove all imports of it.

This PR is large, but mostly simple changes, like:
* using constants defined in the v1 package instead of those in the internal package 
* using k8s.io/client-go/kubernetes/scheme.Codecs/Schemes instead of those in k8s.io/client-go/pkg/api
* using `v1.SchemeGroupVersion` instead of `api.Registry.GroupOrDie(api.GroupName).GroupVersion` in tests
* importing `k8s.io/kubernetes/pkg/api` instead of `k8s.io/client-go/pkg/api` if possible

With this PR https://github.com/kubernetes/kubernetes/pull/45159, the only remaining imports of `k8s.io/client-go/pkg/api` are from k8s.io/metrics.
``` bash
$ git grep "\"k8s.io/client-go/pkg/api\"" | grep -v "staging/src/k8s.io/client-go/pkg/api"
staging/src/k8s.io/metrics/pkg/apis/custom_metrics/install/install.go:25:	"k8s.io/client-go/pkg/api"
Binary file staging/src/k8s.io/metrics/pkg/apis/custom_metrics/types.generated.go matches
staging/src/k8s.io/metrics/pkg/apis/custom_metrics/types.go:22:	"k8s.io/client-go/pkg/api"
staging/src/k8s.io/metrics/pkg/apis/metrics/install/install.go:26:	"k8s.io/client-go/pkg/api"
staging/src/k8s.io/metrics/pkg/apis/metrics/types.go:21:	"k8s.io/client-go/pkg/api"
Binary file staging/src/k8s.io/metrics/pkg/apis/metrics/v1alpha1/zz_generated.conversion.go matches
Binary file staging/src/k8s.io/metrics/pkg/apis/metrics/zz_generated.deepcopy.go matches
staging/src/k8s.io/metrics/pkg/client/clientset_generated/clientset/fake/clientset_generated.go:24:	"k8s.io/client-go/pkg/api"
staging/src/k8s.io/metrics/pkg/client/custom_metrics/client.go:26:	"k8s.io/client-go/pkg/api"
staging/src/k8s.io/metrics/pkg/client/custom_metrics/fake/fake_client.go:24:	"k8s.io/client-go/pkg/api"
```
2017-05-03 10:46:34 -07:00
Huamin Chen 9a90626ff6 add rootfs gnufied and childsb to volume approver
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-05-03 17:45:18 +00:00
Huamin Chen f14a0744e6 Azure disk: dealing with missing disk probe
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-05-03 17:33:17 +00:00
Lee Verberne b668371a63 Enable shared PID namespace by default for docker 2017-05-03 17:12:08 +00:00
Kubernetes Submit Queue c320218d7b Merge pull request #45282 from feiskyer/gc-fix
Automatic merge from submit-queue

Fix flake in sandbox garbage collection

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

Sorry for introducing a flakiness in #43053: the creation time is not set in `makeGCSandbox`, which caused the garbage collection removes sandboxes randomly if there are more than one dead sandboxes belonging to same pod.

This PR fixes the flakiness in sandbox garbage collection.

**Which issue this PR fixes** 

Fixes #45281 #45274.

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```


cc/ @Random-Liu @shashidharatd @kubernetes/sig-node-bugs
2017-05-03 09:38:47 -07:00
Kubernetes Submit Queue 4ff9234eec Merge pull request #44908 from suyogbarve/proxybug
Automatic merge from submit-queue

allow kubectl proxy to handle specified reject methods and default to…

What this PR does / why we need it:
"kubect proxy" command had a bug and was not supporting feature to reject http methods
--reject-methods='POST,PUT,PATCH'
this was due to missing filter for RejectMethods in kubectl/cmd/proxy.go
This PR adds the desired flag, however to retain the current behaviour of "kubectl proxy" the Default Rejected methods are changed from 'POST,PUT,PATCH' to '^$' i.e. none.

Issue not created and no existing issue found
2017-05-03 08:55:18 -07:00
Jesse Haka 66e49eecca add possibility to leave AZ empty, and it will automatically generate zone for it
update bazel

fix gofmt

make getzones function lowercase

add az to log
2017-05-03 16:37:20 +03:00
Pengfei Ni f4cb35846e Fix flake in sandbox garbage collection 2017-05-03 21:05:24 +08:00
Kubernetes Submit Queue d21fa462aa Merge pull request #45272 from sttts/sttts-unsafe-guess-kindtoresource
Automatic merge from submit-queue (batch tested with PRs 45272, 45115)

apimachinery: make explicit that meta.KindToResource is only a guess

All non-test code using `KindToResource` is suspicious and should be fixed with a real RESTMapper.
2017-05-03 05:36:57 -07:00
Kubernetes Submit Queue 451b7ca7f7 Merge pull request #43053 from feiskyer/sandbox_gc
Automatic merge from submit-queue (batch tested with PRs 45005, 43053)

kubelet: fix sandbox garbage collection

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

Currently, kuberuntime garbage collection can't distinguish just-created sandboxes from failed sandboxes. Especially when the time from sandbox creation to ready is longer than GC's minAge. In such cases, those sandboxes may be garbage collected early before they are ready.

This PR removes `sandboxMinGCAge` and only garbage collect sandboxes when 

* they are containing no containers at all
* and not the latest sandbox if it is belonging to an existing pod.

**Which issue this PR fixes** 

Fixes #42856.

**Release note**:

```release-note
NONE
```

cc @yujuhong @Random-Liu
2017-05-03 01:07:07 -07:00
Dr. Stefan Schimanski b0b711119b apimachinery: rename meta.{ -> UnsafeGuess}KindToResource 2017-05-03 09:49:02 +02:00
Dr. Stefan Schimanski 20df61009d Get rid of meta.KindToResource in rollingupdate 2017-05-03 09:49:02 +02:00
Pengfei Ni 5f7de0ab97 Add ImageFsInfo API for ImageManagerService 2017-05-03 15:17:45 +08:00
Pengfei Ni f3ae5ab721 Run hack/update-generated-runtime.sh 2017-05-03 15:17:45 +08:00
Pengfei Ni 43b58b8752 CRI: Add ImageFsInfo API 2017-05-03 15:15:53 +08:00
Kubernetes Submit Queue 2371a70b7a Merge pull request #45166 from feiskyer/namespace-network
Automatic merge from submit-queue (batch tested with PRs 45013, 45166)

CRI: remove PodSandboxStatus.Linux.Namespaces.Network

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

PodSandboxStatus.Linux.Namespaces.Network is not used, so this PR removes it from CRI.

**Which issue this PR fixes**

Closes: #44972

**Special notes for your reviewer**:

**Release note**:

```release-note
Remove PodSandboxStatus.Linux.Namespaces.Network from CRI.
```

/assign @Random-Liu @yujuhong
2017-05-02 23:46:03 -07:00
Pengfei Ni 1c593bd62c Update test for sandbox gc 2017-05-03 14:29:16 +08:00
Pengfei Ni 691f0482fb Fix sandbox garbage collection.
Sandboxes are garbage collected only when they are containing no containers at
all and not the latest sandbox if it is belonging to an existing pod.
2017-05-03 14:29:16 +08:00
Kubernetes Submit Queue 2a87baba6c Merge pull request #45199 from yujuhong/clean-up-dockertools
Automatic merge from submit-queue

Clean up code in dockertools

Move functions and sub packages to dockershim.
Part of #43234.
2017-05-02 20:55:59 -07:00
Chao Xu d978f22e04 remove references to client-go/pkg/api 2017-05-02 17:16:06 -07:00
Kubernetes Submit Queue 932dabda51 Merge pull request #44338 from shashidharatd/leader-election
Automatic merge from submit-queue (batch tested with PRs 40544, 44338, 45225)

Use ObjectGetter Interface instead of clientset.Interface for leaderelection pkg

**What this PR does / why we need it**:
We plan to reuse leaderelection pkg to add leader election function to federation controller manager, but the current implementation uses kubernetes clientset.Interface and federation clientset does not satisfy all the interface methods. It would be better if the leaderelection package use rest.Interface which is also supported by federation clientset.
This pr is to refactor leaderelection pkg to use rest.Interface instead of clientset.Interface

**Special notes for your reviewer**:
This is a sub-task of bigger work to add leader election to federation controller manager as documented in #44283

**Release note**:
```
NONE
```
2017-05-02 13:03:57 -07:00
Kubernetes Submit Queue 72a469f3ac Merge pull request #40544 from henriquetruta/broken-podspec-link
Automatic merge from submit-queue

Fixes broken link in PodSpec

The PodSpec reference to NodeSelector misses
the `.md` extension in the file.



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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-05-02 12:45:48 -07:00
Kubernetes Submit Queue e10c59af41 Merge pull request #43003 from deads2k/server-05-discovery
Automatic merge from submit-queue (batch tested with PRs 45227, 43003, 45231)

separate discovery from the apiserver

This decouples the API discovery handlers from the core API server code.  It separates the code into a new package and clarifies interfaces with existing TPR code.

@kubernetes/sig-api-machinery-pr-reviews
2017-05-02 11:24:53 -07:00
Kubernetes Submit Queue 1a09348541 Merge pull request #45227 from wojtek-t/edge_based_hollow_proxy
Automatic merge from submit-queue

Fix hollow proxy to watch services and endpoints

Ref #34727
2017-05-02 11:19:06 -07:00
Kubernetes Submit Queue 02a26f43a8 Merge pull request #44796 from CaoShuFeng/canisubresource
Automatic merge from submit-queue (batch tested with PRs 45100, 45152, 42513, 44796, 45222)

add subresource support to kube auth can-i

Eg:
    kubectl auth can-i get pods --sub-resource=log

**Release note**:

```release-note
```
2017-05-02 10:35:12 -07:00
Kubernetes Submit Queue 44d5bf29e0 Merge pull request #45100 from sttts/sttts-deflake-TestUpdateNodeWithMultiplePods
Automatic merge from submit-queue (batch tested with PRs 45100, 45152, 42513, 44796, 45222)

node-controller: deflake TestUpdateNodeWithMultiplePods
2017-05-02 10:34:58 -07:00
Zihong Zheng 1cac5db856 Fix onlylocal endpoint's healthcheck nodeport logic 2017-05-02 09:47:27 -07:00
Henrique Truta 4a487cbb11 Fixes broken link in PodSpec
The PodSpec reference to NodeSelector misses
 the .md extension in the file.
2017-05-02 13:33:49 -03:00
Guangya Liu f97337211d Improved code coverage for pkg/kubelet/types/labels
The test coverage improved from 0% to 100%.
2017-05-02 23:30:56 +08:00
deads2k e099f5eee6 separate discovery from the apiserver 2017-05-02 08:50:43 -04:00
Wojciech Tyczynski 5ee74d5838 Fix kube-proxy to watch services and endpoints 2017-05-02 13:28:05 +02:00
Dr. Stefan Schimanski a426adcb2f node-controller: deflake TestUpdateNodeWithMultiplePods
Use absolute time and increase grace duration to 500ms for tests under load.
2017-05-02 08:01:52 +02:00
Cao Shufeng de3db1eec3 add subresource support to kube auth can-i
Eg:
    kubectl auth can-i get pods --subresource=log
2017-05-02 12:08:20 +08:00
Pengfei Ni d301f22863 CRI: remove PodSandboxStatus.Linux.Namespaces.Network
Closes: #44972
2017-05-02 10:34:41 +08:00
Kubernetes Submit Queue 5ffbd37661 Merge pull request #34727 from ncdc/kube-proxy-config
Automatic merge from submit-queue (batch tested with PRs 45077, 45180, 34727, 45079, 45177)

Refactor kube-proxy configuration

This is a proof of concept refactoring of the configuration and startup of kube-proxy. Most flags have been removed and replaced by a single config file, specified by `--config`. This is in regards to the component configuration improvement suggestions listed in #32215.

Also during this effort, I discovered that Hyperkube is roughly reimplementing portions of cobra, and that the current cobra command definitions are solely used to generated docs and man pages. I would like to move the individual commands as well as Hyperkube to using cobra, but that is a separate issue and discussion.

cc @mikedanese @liggitt @deads2k @eparis @sttts @smarterclayton @dgoodwin @timothysc
2017-05-01 18:55:13 -07:00
Kubernetes Submit Queue cb27476153 Merge pull request #45180 from caesarxuchao/move-metrics-to-staging
Automatic merge from submit-queue (batch tested with PRs 45077, 45180, 34727, 45079, 45177)

Move k8s.io/metrics to staging/

This is to break the cyclic dependency in our code base: kubernetes depends on k8s.io/metrics, which depends on kubernetes/staging/client-go.

@DirectXMan12 i actually moved it to staging because we will need the flexibility to update metrics code directly to do many planned refactors, so the copy of metrics in kubernetes has to be the source of truth.

client-gen is not enabled for the code yet, we can enable it after you port your changes to client-gen.

`make generated_files` is enabled for metrics.
2017-05-01 18:55:11 -07:00
Jacob Simpson a926c1f258 Allow certificate manager to be initialized with no certs.
Adds support to the certificate manager so it can be initialized with no
certs and only a connection to the certificate request signing API. This
specifically covers the scenario for the kubelet server certificate,
where there is a request signing client but on first boot there is no
bootstrapping or local certs.
2017-05-01 17:36:33 -07:00
Yu-Ju Hong c35c00f3f1 update bazel 2017-05-01 17:32:58 -07:00
Yu-Ju Hong 951b2d922b move securitycontext from dockertools to dockershim 2017-05-01 17:32:38 -07:00
Yu-Ju Hong b209f47562 Move exported constants/functions from dockertools to dockershim
Previously we exported many constants and functions in dockertools to
share with the dockershim package. This change moves such
constants/functions to dockershim and unexport them.

This change involves only mechnical changes and should not have any
functional impact.
2017-05-01 17:25:11 -07:00
Kubernetes Submit Queue 3ec39c35bf Merge pull request #45107 from jcbsmpsn/fix-unit-test-keys
Automatic merge from submit-queue

Restructure unit tests for more cert/keys.

Just changing the unit tests so there is multiple cert/key pairs to be used.
No functional change, no new tests. Follow on PRs will make more use
of the multiple cert/key pairs.
2017-05-01 16:57:54 -07:00
Chao Xu 3294200dc8 move metrics to staging 2017-05-01 16:43:50 -07:00
Yu-Ju Hong 93ecaf6812 Move exec.go from dockertools to dockershim 2017-05-01 16:00:46 -07:00
Andy Goldstein 43cb024402 Add kube-proxy config file support
Add support for configuring kube-proxy via a config file instead of
command line flags.
2017-05-01 18:02:47 -04:00
Yu-Ju Hong 9f3184c5a4 Remove DockerManager from kubelet
This commit deletes code in dockertools that is only used by
DockerManager. A follow-up change will rename and clean up the rest of
the files in this package.

The commit also sets EnableCRI to true if the container runtime is not
rkt. A follow-up change will remove the flag/field and all references to
it.
2017-05-01 12:14:50 -07:00
Kubernetes Submit Queue 1d7c5cc08e Merge pull request #41742 from feiskyer/apparmor
Automatic merge from submit-queue (batch tested with PRs 40774, 41742)

CRI: using typed filed for Apparmor

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

CRI supports AppArmor via annotations [today](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/api/v1alpha1/runtime/api.proto#L237), we should move them to typed and structured fields instead. (refer [here](https://github.com/kubernetes/kubernetes/issues/30819#issuecomment-253369441))

**Which issue this PR fixes** 

Part of #39130.

**Release note**:

```release-note
NONE
```
2017-05-01 11:19:16 -07:00
Kubernetes Submit Queue c1ebba0ae2 Merge pull request #38925 from xiangpengzhao/fix-volume-panic
Automatic merge from submit-queue

Fix nil pointer issue when making mounts for container

When rebooting one of the nodes in my colleague's cluster, two panics were discovered:

```
E1216 04:07:00.193058    2394 runtime.go:52] Recovered from panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:58
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:51
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:41
/usr/local/go/src/runtime/asm_amd64.s:472
/usr/local/go/src/runtime/panic.go:443
/usr/local/go/src/runtime/panic.go:62
/usr/local/go/src/runtime/sigpanic_unix.go:24
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubelet/kubelet.go:1313
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubelet/kubelet.go:1473
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubelet/dockertools/docker_manager.go:1495
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubelet/dockertools/docker_manager.go:2125
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubelet/dockertools/docker_manager.go:2093
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubelet/kubelet.go:1971
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubelet/kubelet.go:530
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubelet/pod_workers.go:171
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubelet/pod_workers.go:154
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubelet/pod_workers.go:215
/usr/local/go/src/runtime/asm_amd64.s:1998
E1216 04:07:00.275030    2394 runtime.go:52] Recovered from panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:58
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:51
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:41
/usr/local/go/src/runtime/asm_amd64.s:472
/usr/local/go/src/runtime/panic.go:443
/usr/local/go/src/runtime/panic.go:62
/usr/local/go/src/runtime/sigpanic_unix.go:24
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubelet/server/stats/volume_stat_caculator.go:98
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubelet/server/stats/volume_stat_caculator.go:63
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:86
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:87
/usr/local/go/src/runtime/asm_amd64.s:1998
```

kubectl version
```
Client Version: version.Info{Major:"1", Minor:"3", GitVersion:"v1.3.8", GitCommit:"693ef591120267007be359f97191a6253e0e4fb5", GitTreeState:"clean", BuildDate:"2016-09-28T03:03:21Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"3", GitVersion:"v1.3.8", GitCommit:"693ef591120267007be359f97191a6253e0e4fb5", GitTreeState:"clean", BuildDate:"2016-09-28T02:52:25Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"linux/amd64"}
```

The second panic had already been fixed by #33616 and #34251. Not sure what caused the first nil pointer issue and whether it has been fixed yet in the master branch. Just fix it by ignoring the nil pointer when making mounts.

cc @jingxu97 @yujuhong
2017-05-01 10:01:16 -07:00
Andy Goldstein 11e4f149d9 Fix typo in lister-gen, regenerate
NamespaeLister -> NamespaceLister
2017-05-01 12:18:45 -04:00
Pengfei Ni ac76766a92 CRI: move apparmor annotations to container security context 2017-05-01 20:55:16 +08:00
Kubernetes Submit Queue 08606b530b Merge pull request #45148 from rickypai/rpai/use_host_aliases
Automatic merge from submit-queue (batch tested with PRs 45110, 45148)

write HostAliases to hosts file

**What this PR does / why we need it**: using the PodSpec's `HostAliases`, we write entries into the Kubernetes-managed hosts file.

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

**Special notes for your reviewer**:
Previous PRs in this series:
- https://github.com/kubernetes/kubernetes/pull/44572 isolates the logic of creating the file and writing the file
- https://github.com/kubernetes/kubernetes/pull/44641 introduces the `HostAliases` field in PodSpec along with validations

**Release note**:
```release-note
PodSpec's `HostAliases` now write entries into the Kubernetes-managed hosts file.
```

@thockin @yujuhong 

Thanks for reviewing!
2017-05-01 05:42:16 -07:00
Kubernetes Submit Queue 6480bc70b0 Merge pull request #45110 from smarterclayton/offset_timeouts
Automatic merge from submit-queue (batch tested with PRs 45110, 45148)

Make timeouts in the Kubelet slightly offset to aid debugging

Several of these loops overlap, and when they are the reason a failure
is happening it is difficult to sort them out. Slighly misalign these
loops to make their impact obvious.

We are seeing exactly 2 minute pod worker timeouts in a wide range of test flake scenarios, and I want to be confident we know exactly which one is the culprit.
2017-05-01 05:42:14 -07:00
Klaus Ma c55f30ba70 Removed TODO that renaming ReplicationManager. 2017-04-30 19:37:47 +08:00
Jordan Liggitt 24efb3736b
Wait for controller events in resource conflict test 2017-04-29 22:23:39 -04:00
Suyog Barve f3a7ac4311 allow kubectl proxy to handle specified reject methods and default to allow all 2017-04-29 21:10:52 -05:00
Ricky Pai 407fe8b356 write HostAliases to hosts file 2017-04-29 11:31:24 -07:00
Kubernetes Submit Queue 194a06917f Merge pull request #44641 from rickypai/rpai/host_mappings_type
Automatic merge from submit-queue

Add HostAliases to PodSpec to support adding entires to a Pod's hosts file

**What this PR does / why we need it**:
Adds a new field to PodSpec `HostAliases ` to support adding entries to a Pod's hosts file. A PR to incorporate this logic into [`ensureHostsFile`](2899f47bc8/pkg/kubelet/kubelet_pods.go (L208-L227)) in kubelet will be next in order to isolate the discussion on the API.

**Which issue this PR fixes**:
A step into fixing #43632

**Special notes for your reviewer**:
- The API was suggested in https://github.com/kubernetes/kubernetes/issues/43632#issuecomment-293471293
- Concerns with compatible with `hostNetwork: true` Pods are addressed with an validation. https://github.com/kubernetes/kubernetes/issues/43632#issuecomment-293750410

**Release note**:
```release-note
A new field `hostAliases` has been added to `pod.spec` to support adding entries to a Pod's /etc/hosts file.
```

**Testing done**:
- Unit tests pass for validations
- Ran all automated updates, and compared against another PR which added a field in PodSpec to make sure the PR contains all the updated generated code
2017-04-29 10:39:32 -07:00
Kubernetes Submit Queue e2cec40641 Merge pull request #45002 from zhangxiaoyu-zidif/statefulset-format-err
Automatic merge from submit-queue

stateful_pod_control.go: format the code

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

1.Improve the quality of the code.
2.Reduce reduandant parameters
3.add one comma

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-04-29 04:38:12 -07:00
Ricky Pai a76ada8d5a generated files 2017-04-28 22:55:47 -07:00
Ricky Pai 78d66626de validate HostAliases have valid IP and hostnames 2017-04-28 21:43:54 -07:00
Ricky Pai d544561a17 validate HostAliases are not present when using hostNetwork 2017-04-28 21:43:54 -07:00
Ricky Pai 6ff5f06ec5 add HostAliases field to PodSpec to support adding entries into hosts file 2017-04-28 21:43:54 -07:00
Kubernetes Submit Queue 55f802b72a Merge pull request #44196 from xiangpengzhao/cmd-cleanup
Automatic merge from submit-queue

Delete "hard-coded" default value in flags usage.

**What this PR does / why we need it**:
Some flags of kubernetes components have "hard-coded" default values in their usage info. In fact, [pflag pkg](https://github.com/kubernetes/kubernetes/blob/master/vendor/github.com/spf13/pflag/flag.go#L602-L608) has already added a string `(default value)` automatically in the usage info if the flag is initialized. Then we don't need to hard-code the default value in usage info. After this PR, if we want to update the default value of a flag, we only need to update the flag where it is initialized. `pflag` will update the usage info for us. This will avoid inconsistency.

For example:
Before
```
kubelet -h
...
--node-status-update-frequency duration                   Specifies how often kubelet posts node status to master. Note: be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller. Default: 10s (default 10s)
...
```

After
```
kubelet -h
...
--node-status-update-frequency duration                   Specifies how often kubelet posts node status to master. Note: be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller. (default 10s)
...
```

**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**:
This PR doesn't delete some "hard-coded" default values because they are not explicitly initialized. We still need to hard-code them to give users friendly info.

```
--allow-privileged                                        If true, allow containers to request privileged mode. [default=false]
```

**Release note**:

```release-note
None
```
2017-04-28 21:28:09 -07:00
Kubernetes Submit Queue e2042bb81b Merge pull request #41583 from verb/sharedpid
Automatic merge from submit-queue (batch tested with PRs 41583, 45117, 45123)

Implement shared PID namespace in the dockershim

**What this PR does / why we need it**: Defaults the Docker CRI to using a shared PID namespace for pods. Implements proposal in https://github.com/kubernetes/community/pull/207 tracked by #1615.

//cc @dchen1107 @vishh @timstclair 

**Special notes for your reviewer**: none

**Release note**:
```release-note
Some container runtimes share a process (PID) namespace for all containers in a pod. This will become the default for Docker in a future release of Kubernetes. You can preview this functionality if running with the CRI and Docker 1.13.1 by enabling the --experimental-docker-enable-shared-pid kubelet flag.
```
2017-04-28 20:15:03 -07:00
Kubernetes Submit Queue f63270fe42 Merge pull request #45132 from saad-ali/removeRkouj
Automatic merge from submit-queue

Remove rkouj from owners files.

Remove inactive member, @rkouj, from storage owners files.

CC @rkouj
2017-04-28 19:18:35 -07:00
Kubernetes Submit Queue ce01882e32 Merge pull request #43301 from deads2k/agg-27-add-conditions
Automatic merge from submit-queue (batch tested with PRs 44044, 44766, 44930, 45109, 43301)

add APIService conditions

Adds conditions to the APIServiceStatus struct and fixes up generators that appear to have slipped.

The first condition is "ServiceAvailable" which will provide the status currently derived in the discovery handler that decides about whether to expose the version in discovery.

@kubernetes/sig-api-machinery-pr-reviews @liggitt @ncdc
2017-04-28 17:49:13 -07:00
Kubernetes Submit Queue 3a2a01bddc Merge pull request #44930 from fabianofranz/issue_44832
Automatic merge from submit-queue (batch tested with PRs 44044, 44766, 44930, 45109, 43301)

Fixes get -oname for unstructured objects

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

Make sure we display kind in `kubectl get -o name` for unknown resource types.

**Release note**:

```release-note
NONE
```
2017-04-28 17:49:10 -07:00
Kubernetes Submit Queue 10f90b66dc Merge pull request #44766 from wojtek-t/better_locking_mechanism
Automatic merge from submit-queue (batch tested with PRs 44044, 44766, 44930, 45109, 43301)

Reduce lock contention in KubeProxy
2017-04-28 17:49:08 -07:00
saadali eacc48373b Remove rkouj from owners files. 2017-04-28 17:14:38 -07:00
Jacob Simpson ac171f69f7 Restructure unit tests for more cert/keys. 2017-04-28 17:13:48 -07:00
Eric Chiang 3f888f2edf GCP credential provider: add "type" field to fake JSON key in unit test 2017-04-28 16:16:53 -07:00
Kubernetes Submit Queue 0afab578d8 Merge pull request #44952 from CaoShuFeng/proxy_reject_path
Automatic merge from submit-queue

Log warning when invalid dir passed to kubectl proxy --www

**Release note**:

```
Log warning when invalid directory is passed to `kubectl proxy --www`
```
2017-04-28 14:00:20 -07:00
Kubernetes Submit Queue e06fc087e0 Merge pull request #44938 from jayunit100/cleanup-orphan-logging
Automatic merge from submit-queue (batch tested with PRs 45033, 44961, 45021, 45097, 44938)

Cleanup orphan logging that goes on in the sync loop.

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

Fixes #44937  

**Before this PR** The older logs were like this:

```
E0426 00:06:33.763347   21247 kubelet_volumes.go:114] Orphaned pod "35c4a858-2a12-11e7-910c-42010af00003" found, but volume paths are still present on disk.
E0426 00:06:33.763400   21247 kubelet_volumes.go:114] Orphaned pod "e7676365-1580-11e7-8c27-42010af00003" found, but volume paths are still present on disk.
```

The problem being that, all the volumes were spammed w/ no summary info.   

**After this PR** the logs look like this:

```
E0426 01:32:27.295568   22261 kubelet_volumes.go:129] Orphaned pod "408b060e-2a1d-11e7-90e8-42010af00003" found, but volume paths are still present on disk. : There were a total of 2 errors similar to this.  Turn up verbosity to see them.
E0426 01:32:29.295515   22261 kubelet_volumes.go:129] Orphaned pod "408b060e-2a1d-11e7-90e8-42010af00003" found, but volume paths are still present on disk. : There were a total of 2 errors similar to this.  Turn up verbosity to see them.
E0426 01:32:31.293180   22261 kubelet_volumes.go:129] Orphaned pod "408b060e-2a1d-11e7-90e8-42010af00003" found, but volume paths are still present on disk. : There were a total of 2 errors similar to this.  Turn up verbosity to see them.
```

And with logging turned up, the extra info logs are shown with details:

```
E0426 01:34:21.933983   26010 kubelet_volumes.go:129] Orphaned pod "1c565800-2a20-11e7-bbc2-42010af00003" found, but volume paths are still present on disk. : There were a total of 3 errors similar to this.  Turn up verbosity to see them.
I0426 01:34:21.934010   26010 kubelet_volumes.go:131] Orphan pod: Orphaned pod "1c565800-2a20-11e7-bbc2-42010af00003" found, but volume paths are still present on disk.
I0426 01:34:21.934015   26010 kubelet_volumes.go:131] Orphan pod: Orphaned pod "408b060e-2a1d-11e7-90e8-42010af00003" found, but volume paths are still present on disk.
I0426 01:34:21.934019   26010 kubelet_volumes.go:131] Orphan pod: Orphaned pod "e7676365-1580-11e7-8c27-42010af00003" found, but volume paths are still present on disk.
```

**Release note**

```release-note
Roll up volume error messages in the kubelet sync loop.
```
2017-04-28 13:16:47 -07:00
Kubernetes Submit Queue d4ece0abc3 Merge pull request #37499 from fabianofranz/kubectl_plugins
Automatic merge from submit-queue

kubectl binary plugins

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

Introduces the ability to extend `kubectl` by adding third-party plugins that will be exposed through `kubectl`.

Plugins are executable commands written in any language. To be included as a plugin, a binary or script file has to

1. be located under one of the supported plugin path locations:
1.1 `~/.kubectl/plugins` dir
1.2. one or more directory set in the `KUBECTL_PLUGINS_PATH` env var
1.3. the `kubectl/plugins` dir under one or more directory set in the `XDG_DATA_DIRS` env var, which defaults to `/usr/local/share:/usr/share`
2. in any of the plugin path above, have a subfolder with the plugin file(s)
3. in the subfolder, contain at least a `plugin.yaml` file that describes the plugin

Example:

```
$ cat ~/.kube/plugins/myplugin/plugin.yaml
name: "myplugin"
shortDesc: "My plugin's short description"
command: "echo Hello plugins!"

$ kubectl myplugin
Hello plugins!
```

~~In case the plugin declares `tunnel: true`, the plugin engine will pass the `KUBECTL_PLUGIN_API_HOST` env var when calling the plugin binary. Plugins can then access the Kube REST API in "http://$KUBECTL_PLUGIN_API_HOST/api" using the same context currently in use by `kubectl`.~~

Test plugins are provided in `pkg/kubectl/plugins/examples`. Just copy (or symlink) the files to `~/.kube/plugins` to test.

**Which issue this PR fixes**:

Related to the discussions in the proposal document: https://github.com/kubernetes/kubernetes/pull/30086 and https://github.com/kubernetes/community/pull/122.

**Release note**:
```release-note
Introduces the ability to extend kubectl by adding third-party plugins. Developer preview, please refer to the documentation for instructions about how to use it.
```
2017-04-28 12:23:59 -07:00
Kubernetes Submit Queue fd19b6ce3f Merge pull request #44868 from vmware/dsclustersupport
Automatic merge from submit-queue

Adding datastore cluster support for dynamic and static pv

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

Customer reported with version 1.4.7 he could use a datastore that is in a cluster as a vsphere volume. When he upgraded to 1.6.0, this same exact path does not work and throws a datastore not found error. 

This PR is adding support to allow using datastore within cluster for volume provisioning.

**Which issue this PR fixes** : 
fixes https://github.com/kubernetes/kubernetes/issues/44007

**Special notes for your reviewer**:

**Created datastore cluster as below.**

![ds-cluster](https://cloud.githubusercontent.com/assets/22985595/25350381/d2652c24-28d9-11e7-8659-097bd9b844bb.jpg)


**Verified  dynamic PV provisioning and pod creation using datastore (sharedVmfs-0) in a cluster (DatastoreCluster).**
```
$ cat thin_sc.yaml 
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: thin
provisioner: kubernetes.io/vsphere-volume
parameters:
    diskformat: thin
    datastore: DatastoreCluster/sharedVmfs-0
```


```
$ kubectl create -f thin_sc.yaml 
storageclass "thin" created
$ kubectl describe storageclass thin
Name:		thin
IsDefaultClass:	No
Annotations:	<none>
Provisioner:	kubernetes.io/vsphere-volume
Parameters:	datastore=DatastoreCluster/sharedVmfs-0,diskformat=thin
No events.
$ 
```


```
$ kubectl create -f thin_pvc.yaml 
persistentvolumeclaim "thinclaim" created
```

```
$ kubectl get pvc
NAME        STATUS    VOLUME                                     CAPACITY   ACCESSMODES   AGE
thinclaim   Bound     pvc-581805e3-290d-11e7-9ad8-005056bd81ef   2Gi        RWO           1m
```

```
$ kubectl get pv
NAME                                       CAPACITY   ACCESSMODES   RECLAIMPOLICY   STATUS    CLAIM               REASON    AGE
pvc-581805e3-290d-11e7-9ad8-005056bd81ef   2Gi        RWO           Delete          Bound     default/thinclaim             1m

```


```
$ kubectl describe pvc thinclaim
Name:		thinclaim
Namespace:	default
StorageClass:	thin
Status:		Bound
Volume:		pvc-581805e3-290d-11e7-9ad8-005056bd81ef
Labels:		<none>
Capacity:	2Gi
Access Modes:	RWO
Events:
  FirstSeen	LastSeen	Count	From				SubObjectPath	Type		Reason			Message
  ---------	--------	-----	----				-------------	--------	------			-------
  39s		39s		1	{persistentvolume-controller }			Normal		ProvisioningSucceeded	Successfully provisioned volume pvc-581805e3-290d-11e7-9ad8-005056bd81ef using kubernetes.io/vsphere-volume
```


```
$ kubectl describe pv pvc-581805e3-290d-11e7-9ad8-005056bd81ef
Name:		pvc-581805e3-290d-11e7-9ad8-005056bd81ef
Labels:		<none>
StorageClass:	
Status:		Bound
Claim:		default/thinclaim
Reclaim Policy:	Delete
Access Modes:	RWO
Capacity:	2Gi
Message:	
Source:
    Type:	vSphereVolume (a Persistent Disk resource in vSphere)
    VolumePath:	[DatastoreCluster/sharedVmfs-0] kubevols/kubernetes-dynamic-pvc-581805e3-290d-11e7-9ad8-005056bd81ef.vmdk
    FSType:	ext4
No events.

```
```

$ kubectl create -f thin_pod.yaml 
pod "thinclaimpod" created
```
```

$ kubectl get pod
NAME           READY     STATUS    RESTARTS   AGE
thinclaimpod   1/1       Running   0          1m
```


```
$ kubectl describe pod thinclaimpod
Name:		thinclaimpod
Namespace:	default
Node:		node3/172.1.56.0
Start Time:	Mon, 24 Apr 2017 09:46:56 -0700
Labels:		<none>
Status:		Running
IP:		172.1.56.3
Controllers:	<none>
Containers:
  test-container:
    Container ID:	docker://487f77d92b92ee3d833b43967c8d42433e61cd45a58d8d6f462717301597c84f
    Image:		gcr.io/google_containers/busybox:1.24
    Image ID:		docker://sha256:0cb40641836c461bc97c793971d84d758371ed682042457523e4ae701efe7ec9
    Port:		
    Command:
      /bin/sh
      -c
      echo 'hello' > /mnt/volume1/index.html  && chmod o+rX /mnt /mnt/volume1/index.html && while true ; do sleep 2 ; done
    State:		Running
      Started:		Mon, 24 Apr 2017 09:47:16 -0700
    Ready:		True
    Restart Count:	0
    Volume Mounts:
      /mnt/volume1 from test-volume (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-cqcq1 (ro)
    Environment Variables:	<none>
Conditions:
  Type		Status
  Initialized 	True 
  Ready 	True 
  PodScheduled 	True 
Volumes:
  test-volume:
    Type:	PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:	thinclaim
    ReadOnly:	false
  default-token-cqcq1:
    Type:	Secret (a volume populated by a Secret)
    SecretName:	default-token-cqcq1
QoS Class:	BestEffort
Tolerations:	<none>
Events:
  FirstSeen	LastSeen	Count	From			SubObjectPath			Type		Reason		Message
  ---------	--------	-----	----			-------------			--------	------		-------
  40s		40s		1	{default-scheduler }					Normal		Scheduled	Successfully assigned thinclaimpod to node3
  22s		22s		1	{kubelet node3}		spec.containers{test-container}	Normal		Pulling		pulling image "gcr.io/google_containers/busybox:1.24"
  21s		21s		1	{kubelet node3}		spec.containers{test-container}	Normal		Pulled		Successfully pulled image "gcr.io/google_containers/busybox:1.24"
  21s		21s		1	{kubelet node3}		spec.containers{test-container}	Normal		Created		Created container with id 487f77d92b92ee3d833b43967c8d42433e61cd45a58d8d6f462717301597c84f
  21s		21s		1	{kubelet node3}		spec.containers{test-container}	Normal		Started		Started container with id 487f77d92b92ee3d833b43967c8d42433e61cd45a58d8d6f462717301597c84f
```


```
$ kubectl delete pod thinclaimpod
pod "thinclaimpod" deleted
```

Verified Disk is detached from the node

```
$ kubectl delete pvc thinclaim
persistentvolumeclaim "thinclaim" deleted
$ kubectl get pv
No resources found.
```
Verified Disk is deleted from the datastore.
Also verified above life cycle using non clustered datastore.

**Verified Using static PV in the datastore cluster for pod provisioning.**
```
# pwd
/vmfs/volumes/sharedVmfs-0/kubevols
# vmkfstools -c 2g test.vmdk
Create: 100% done
# ls
test-flat.vmdk  test.vmdk
```



```
$ cat pod.yaml 
apiVersion: v1
kind: Pod
metadata:
    name: inject-pod
spec:
    containers:
    - name: test-container
      image: gcr.io/google_containers/busybox:1.24
      command: ["/bin/sh", "-c", "echo 'hello' > /mnt/volume1/index.html  && chmod o+rX /mnt /mnt/volume1/index.html && while true ; do sleep 2 ; done"]
      volumeMounts:
      - name: test-volume
        mountPath: /mnt/volume1
    securityContext:
      seLinuxOptions:
        level: "s0:c0,c1"
    restartPolicy: Never
    volumes:
    - name: test-volume
      vsphereVolume:
          volumePath: "[DatastoreCluster/sharedVmfs-0] kubevols/test.vmdk"
          fsType: ext4
```

```
$ kubectl create -f pod.yaml 
pod "inject-pod" created

$ kubectl get pod
NAME         READY     STATUS    RESTARTS   AGE
inject-pod   1/1       Running   0          19s

$ kubectl describe pod inject-pod
Name:		inject-pod
Namespace:	default
Node:		node3/172.1.56.0
Start Time:	Mon, 24 Apr 2017 10:27:22 -0700
Labels:		<none>
Status:		Running
IP:		172.1.56.3
Controllers:	<none>
Containers:
  test-container:
    Container ID:	docker://ed14e058fbcc9c2d8d30ff67bd614e45cf086afbbff070744c5a461e87c45103
    Image:		gcr.io/google_containers/busybox:1.24
    Image ID:		docker://sha256:0cb40641836c461bc97c793971d84d758371ed682042457523e4ae701efe7ec9
    Port:		
    Command:
      /bin/sh
      -c
      echo 'hello' > /mnt/volume1/index.html  && chmod o+rX /mnt /mnt/volume1/index.html && while true ; do sleep 2 ; done
    State:		Running
      Started:		Mon, 24 Apr 2017 10:27:40 -0700
    Ready:		True
    Restart Count:	0
    Volume Mounts:
      /mnt/volume1 from test-volume (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-cqcq1 (ro)
    Environment Variables:	<none>
Conditions:
  Type		Status
  Initialized 	True 
  Ready 	True 
  PodScheduled 	True 
Volumes:
  test-volume:
    Type:	vSphereVolume (a Persistent Disk resource in vSphere)
    VolumePath:	[DatastoreCluster/sharedVmfs-0] kubevols/test.vmdk
    FSType:	ext4
  default-token-cqcq1:
    Type:	Secret (a volume populated by a Secret)
    SecretName:	default-token-cqcq1
QoS Class:	BestEffort
Tolerations:	<none>
Events:
  FirstSeen	LastSeen	Count	From			SubObjectPath			Type		Reason		Message
  ---------	--------	-----	----			-------------			--------	------		-------
  44s		44s		1	{default-scheduler }					Normal		Scheduled	Successfully assigned inject-pod to node3
  26s		26s		1	{kubelet node3}		spec.containers{test-container}	Normal		Pulled		Container image "gcr.io/google_containers/busybox:1.24" already present on machine
  26s		26s		1	{kubelet node3}		spec.containers{test-container}	Normal		Created		Created container with id ed14e058fbcc9c2d8d30ff67bd614e45cf086afbbff070744c5a461e87c45103
  26s		26s		1	{kubelet node3}		spec.containers{test-container}	Normal		Started		Started container with id ed14e058fbcc9c2d8d30ff67bd614e45cf086afbbff070744c5a461e87c45103
```


**Release note**:

```release-note
none
```

cc: @BaluDontu @moserke @tusharnt @pdhamdhere
2017-04-28 11:38:59 -07:00
Aaron Levy fe77957461 Skip inspecting pod network if unknown namespace 2017-04-28 11:13:26 -07:00
Fabiano Franz 1aa84d101a Fixes get -oname for unstructured objects 2017-04-28 14:12:36 -03:00
Kubernetes Submit Queue dbce213ea6 Merge pull request #45105 from sttts/sttts-taint-controller-test-timing
Automatic merge from submit-queue

taint-controller-tests: double 'a bit of time' to avoid flakes
2017-04-28 10:04:05 -07:00
Kubernetes Submit Queue d6fd997d44 Merge pull request #41530 from bruceauyeung/k8s-branch-do-not-use-underscores-in-go-variable-names
Automatic merge from submit-queue

rename variables to make sure that they conform to golang variable name conventions

rename variables to make sure that they conform to golang variable name conventions

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

there are lots of package level unexported variables in package `cmd` not conforming golang variable name conventions, such as `version_example`, in this PR i rename all of them to make sure that they conform to golang variable name conventions
2017-04-28 09:28:13 -07:00
Clayton Coleman 49209b3394
Make timeouts in the Kubelet slightly offset to aid debugging
Several of these loops overlap, and when they are the reason a failure
is happening it is difficult to sort them out. Slighly misalign these
loops to make their impact obvious.
2017-04-28 12:00:28 -04:00
Dr. Stefan Schimanski 64aec01ac9 taint-controller-tests: double 'a bit of time' to avoid flakes 2017-04-28 17:42:35 +02:00
deads2k afc5ae1539 generated 2017-04-28 11:28:37 -04:00
ravisantoshgudimetla 081ba02fa5 Changes to kubectl taint to respect selector flag 2017-04-28 10:28:26 -04:00
zhangxiaoyu-zidif 026638af51 stateful_pod_control.go: format the code 2017-04-28 18:16:19 +08:00
Kubernetes Submit Queue 9afeabb642 Merge pull request #43477 from gnufied/cloudprovider-aws-metrics
Automatic merge from submit-queue

Start recording cloud provider metrics for AWS

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

This PR implements support for emitting metrics from AWS about storage operations.

**Which issue this PR fixes** 

Fixes https://github.com/kubernetes/features/issues/182

**Release note**:
```
Add support for emitting metrics from AWS cloudprovider about storage operations.
```
2017-04-28 01:35:17 -07:00
Wojciech Tyczynski eb6949a53e Change locking mechanism in kube-proxy 2017-04-28 09:40:39 +02:00
Kubernetes Submit Queue 19795ea7c3 Merge pull request #45042 from wongma7/attaching-log
Automatic merge from submit-queue

Log node name when error attaching volume

Helps with debugging to know immediately which node the volume failed to atach to. Went through all plugins, added this to 3. @gnufied
```release-note
NONE
```
2017-04-27 23:04:05 -07:00
Haoran Wang b6aadd2b7e Handle maxUnavailable larger than spec.replicas 2017-04-28 13:32:24 +08:00
Fabiano Franz 2158473474 Plugins are loaded under the 'kubectl plugin' command 2017-04-28 01:34:07 -03:00
Fabiano Franz 2b178ad608 Basic support for kubectl plugins 2017-04-28 01:34:07 -03:00
xiangpengzhao db97cba291 Fix nil pointer issue when making mounts for container 2017-04-28 11:41:39 +08:00
Kubernetes Submit Queue acca01bcc2 Merge pull request #44939 from sjenning/adjust-logging
Automatic merge from submit-queue

don't HandleError on container start failure

Failing to start containers is a common error case if there is something wrong with the container image or environment like missing mounts/configs/permissions/etc.  Not only is it common; it is reoccurring as backoff happens and new attempts to start the container are made.  `HandleError` it too verbose for this very common situation.

Replace `HandleError` with `glog.V(3).Infof`

xref https://github.com/openshift/origin/issues/13889

@smarterclayton @derekwaynecarr @eparis
2017-04-27 19:36:23 -07:00
Kubernetes Submit Queue b2d714a7ca Merge pull request #44888 from caesarxuchao/clean-deepcopy-init
Automatic merge from submit-queue

Prepare for move zz_generated_deepcopy.go to k8s.io/api

This is in preparation to move deep copies to with the types to the types repo (see https://github.com/kubernetes/gengo/pull/47#issuecomment-296855818). The init() function is referring the `SchemeBuilder` defined in the register.go in the same packge, so we need to revert the dependency.

This PR depends on https://github.com/kubernetes/gengo/pull/49, otherwise verification will fail.
2017-04-27 18:48:28 -07:00
Kubernetes Submit Queue 8efb5c9957 Merge pull request #44983 from caesarxuchao/easy-remove-client-go-api-scheme
Automatic merge from submit-queue (batch tested with PRs 45052, 44983, 41254)

Non-controversial part of #44523

For easier review of #44523, i extracted the non-controversial part out to this PR.
2017-04-27 17:14:04 -07:00
divyenpatel 821f8cd9b9 datastore cluster support
fix verify-gofmt failure
2017-04-27 17:12:45 -07:00