Commit Graph

47331 Commits (0b549190b44efd3de2c47c55c33eeea259ebfc69)

Author SHA1 Message Date
Eric Chiang 0b549190b4 vendor: re-run bazel build 2017-04-28 13:19:26 -07:00
Eric Chiang 6bcecdc33c bump(golang.org/x/oauth2): a6bd8cefa1811bd24b86f8902872e4e8225f74c4 2017-04-28 13:19:21 -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 9fbefe3b97 Merge pull request #44350 from deads2k/server-17-watch
Automatic merge from submit-queue (batch tested with PRs 44868, 44350)

build external watch event so simple encoders can encode

`kube-apiserver` clients require a specific serialization of `watch.Event` to function properly.  There is no reason to allow flexibility of serialization at this point since no client would able to understand a different encoding.

I found this which trying to use a simple, unstructured json encoder and the clients kept choking on watches because it serialized without the proper json tags.

@kubernetes/sig-api-machinery-pr-reviews
2017-04-28 11:41:34 -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
Kubernetes Submit Queue 2315008ea6 Merge pull request #44489 from CaoShuFeng/SelfLinkPathPrefix
Automatic merge from submit-queue

Fix PathPrefix for subresources

before this change:
$ curl -s http://172.16.116.128:8080/api/v1/nodes/kubenet-02/status | grep selfLink
    "selfLink": "/api/v1/nodes/{name}/status/kubenet-02/status",
after this change:
$ curl -s http://172.16.116.128:8080/api/v1/nodes/kubenet-02/status | grep selfLink
    "selfLink": "/api/v1/nodes/kubenet-02/status",

related to:
#44462

**Release note**:

```NONE
```
2017-04-28 10:50:09 -07: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 88ad8b9cb9 Merge pull request #41985 from ericchiang/bootstrap-token-auth-logging
Automatic merge from submit-queue (batch tested with PRs 41530, 44814, 43620, 41985)

kube-apiserver: improve bootstrap token authentication error messages

This was requested by @jbeda as a follow up to https://github.com/kubernetes/kubernetes/pull/41281.

cc @jbeda @luxas @kubernetes/sig-auth-pr-reviews
2017-04-28 10:03:41 -07:00
Kubernetes Submit Queue 929bb8b5d0 Merge pull request #43620 from ktsakalozos/bug/juju-master
Automatic merge from submit-queue (batch tested with PRs 41530, 44814, 43620, 41985)

Fixes juju kubernetes master: 1. Get certs from a dead leader. 2. Append tokens.

**What this PR does / why we need it**:
Fixes two issues with the Juju kubernetes master.

1. Grab certificates from a leader that is already removed.
2. Append (not truncate) auth tokens 

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

**Special notes for your reviewer**:

**Release note**:

```
Recover certificates from leadership context in case all masters die in a Juju deployment
```
2017-04-28 10:03:39 -07:00
Kubernetes Submit Queue 58aebcd61b Merge pull request #44814 from weizhanxu/controllerRef_no_Need_Check_nil_again
Automatic merge from submit-queue (batch tested with PRs 41530, 44814, 43620, 41985)

no need check is nil, because has checked before

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-04-28 10:03:35 -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
Dr. Stefan Schimanski 64aec01ac9 taint-controller-tests: double 'a bit of time' to avoid flakes 2017-04-28 17:42:35 +02:00
Kubernetes Submit Queue 94567f64e1 Merge pull request #45096 from crassirostris/fluentd-metrics-exporter
Automatic merge from submit-queue

Add metrics exporter to the fluentd-gcp deployment

Metrics exporter container reads metrics from the `/metrics` endpoint in fluentd and exports them directly to the Stackdriver. It assumes that Stackdriver Monitoring API is enabled.

/cc @fgrzadkowski
2017-04-28 08:42:06 -07:00
Kubernetes Submit Queue bec2c604ac Merge pull request #44921 from jacekn/registry-fix
Automatic merge from submit-queue (batch tested with PRs 42432, 44628, 45101, 44921)

Use correct option name in the kubernetes-worker layer registry action

**What this PR does / why we need it**: It fixes #44920 

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

**Special notes for your reviewer**:

**Release note**:

```
Ensure kubernetes-worker juju layer registry action uses correct ingress controller option name
```
2017-04-28 08:41:39 -07:00
Kubernetes Submit Queue 774bb58e02 Merge pull request #45101 from dims/mark-test-with-feature-volumes
Automatic merge from submit-queue (batch tested with PRs 42432, 44628, 45101, 44921)

Mark PersistentVolumes as [Feature:Volumes]

**What this PR does / why we need it**:
Just so that we know that we need a cloud provider that
supports volumes to run this test. This is similar to
the change in 63bc42c872.

Ran into this when i was trying to run e2e tests with
local-up-cluster locally and figured out this test will
not work since we don't support local storage persistent
volumes.

**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-28 08:41:37 -07:00
Kubernetes Submit Queue 228219b0ce Merge pull request #44628 from dmmcquay/kubeadm_join_tests
Automatic merge from submit-queue (batch tested with PRs 42432, 44628, 45101, 44921)

kubeadm: join test cmds for new flags

**What this PR does / why we need it**: Adding test-cmds for new kubeadm join flags. 

Adding tests is a WIP from #34136

This is a continuation from https://github.com/kubernetes/kubernetes/pull/42812 since it had to be closed.

**Special notes for your reviewer**: /cc @luxas 

**Release note**:
```release-note
NONE
```
2017-04-28 08:41:36 -07:00
Kubernetes Submit Queue 021f542f24 Merge pull request #42432 from shaynewang/test_types
Automatic merge from submit-queue

Improved code coverage for plugin/pkg/scheduler/algorithm

**What this PR does / why we need it**:
Part of #39559 , code coverage improved from 0% to 100%
**Special notes for your reviewer**:
Improved coverage for scheduler/algorithm to 100%
Test cover output:
```
make test WHAT=./plugin/pkg/scheduler/algorithm KUBE_COVER=y
Running tests for APIVersion: v1,apps/v1beta1,authentication.k8s.io/v1,authentication.k8s.io/v1beta1,authorization.k8s.io/v1,authorization.k8s.io/v1beta1,autoscaling/v1,autoscaling/v2alpha1,batch/v1,batch/v2alpha1,certificates.k8s.io/v1beta1,extensions/v1beta1,imagepolicy.k8s.io/v1alpha1,policy/v1beta1,rbac.authorization.k8s.io/v1beta1,rbac.authorization.k8s.io/v1alpha1,storage.k8s.io/v1beta1,federation/v1beta1
+++ [0302 10:43:05] Saving coverage output in '/tmp/k8s_coverage/v1,apps/v1beta1,authentication.k8s.io/v1,authentication.k8s.io/v1beta1,authorization.k8s.io/v1,authorization.k8s.io/v1beta1,autoscaling/v1,autoscaling/v2alpha1,batch/v1,batch/v2alpha1,certificates.k8s.io/v1beta1,extensions/v1beta1,imagepolicy.k8s.io/v1alpha1,policy/v1beta1,rbac.authorization.k8s.io/v1beta1,rbac.authorization.k8s.io/v1alpha1,storage.k8s.io/v1beta1,federation/v1beta1/20170302-104305'
skipped	k8s.io/kubernetes/cmd/libs/go2idl/generator
skipped	k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/rest
ok  	k8s.io/kubernetes/plugin/pkg/scheduler/algorithm	0.061s	coverage: 100.0% of statements
+++ [0302 10:43:07] Combined coverage report: /tmp/k8s_coverage/v1,apps/v1beta1,authentication.k8s.io/v1,authentication.k8s.io/v1beta1,authorization.k8s.io/v1,authorization.k8s.io/v1beta1,autoscaling/v1,autoscaling/v2alpha1,batch/v1,batch/v2alpha1,certificates.k8s.io/v1beta1,extensions/v1beta1,imagepolicy.k8s.io/v1alpha1,policy/v1beta1,rbac.authorization.k8s.io/v1beta1,rbac.authorization.k8s.io/v1alpha1,storage.k8s.io/v1beta1,federation/v1beta1/20170302-104305/combined-coverage.html
```
2017-04-28 08:21:32 -07:00
Konstantinos Tsakalozos e99d606277 Merge branch 'master' into bug/juju-master 2017-04-28 18:19:55 +03:00
Kubernetes Submit Queue 8787b13d75 Merge pull request #43922 from cezarsa/spdy-fix
Automatic merge from submit-queue

prevent corrupted spdy stream after hijacking connection

This PR fixes corner case in spdy stream code where some bytes would never arrive at the server.

Reading directly from a hijacked connection isn't safe because some data may have already been read by the server before `Hijack` was called. To ensure all data will be received it's safer to read from the returned `bufio.Reader`. This problem seem to happen more frequently when using Go 1.8.
This is described in https://golang.org/pkg/net/http/#Hijacker:

> // The returned bufio.Reader may contain unprocessed buffered
   // data from the client.

I came across this while debugging a flaky test that used code from the `k8s.io/apimachinery/pkg/util/httpstream/spdy` package. After filling the code with debug logs and long hours running the tests in loop in the hope of catching the error I finally caught something weird.

The first word on the first spdy frame [read by the server here](b625085230/vendor/github.com/docker/spdystream/spdy/read.go (L148)) had the value `0x03000100`. See, the first frame to arrive on the server was supposed to be a control frame indicating the creation of a new stream, but all control frames need the high-order bit set to 1, which was not the case here, so the saver mistakenly assumed this was a data frame and the stream would never be created. The correct value for the first word of a SYN_STREAM frame was supposed to be `0x80030001` and this lead me on the path of finding who had consumed the first 1 byte prior to the frame reader being called and finally finding the problem with the Hijack call.

I added a new test to try stressing this condition and ensuring that this bug doesn't happen anymore. However, it's quite ugly as it loops 1000 times creating streams on servers to increase the chances of this bug happening. So, I'm not sure whether it's worth it to keep this test or if I should remove it from the PR. Please let me know what you guys think and I'll be happy to update this.

Fixes #45093 #45089 #45078 #45075 #45072 #45066 #45023
2017-04-28 07:40:03 -07:00
Davanum Srinivas f4f95be4e7 Mark PersistentVolumes as [Feature:Volumes]
Just so that we know that we need a cloud provider that
supports volumes to run this test. This is similar to
the change in 63bc42c872.

Ran into this when i was trying to run e2e tests with
local-up-cluster locally and figured out this test will
not work since we don't support local storage persistent
volumes.
2017-04-28 08:19:49 -04:00
Mik Vyatskov fb3e30729e Add metrics exporter to the fluentd-gcp deployment 2017-04-28 13:27:19 +02: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
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
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
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 5097971d1d Merge pull request #45055 from nicksardo/glbc-v0.9.3-bump
Automatic merge from submit-queue

Bump GLBC version to 0.9.3

**What this PR does / why we need it**:
Bumps version of GLBC shipped with K8s
https://github.com/kubernetes/ingress/releases/tag/0.9.3
```
Major Changelog:

Bug fix: adding backends to existing backend-services #652
Bug fix: handling of secret-based SSL Certs #639
Add second LB healthcheck/proxy traffic source CIDR #574 #479
Support backside re-encryption (HTTPS) #519
```
The two noted bugs are common occurrences for GKE users

**Release note**:
```release-note
Bump GLBC version to 0.9.3
```
2017-04-27 18:03:33 -07:00
Kubernetes Submit Queue 600ab29e52 Merge pull request #41254 from shashidharatd/federation-service-e2e-1
Automatic merge from submit-queue (batch tested with PRs 45052, 44983, 41254)

[Federation][e2e] Add 2 new testcases to federation service e2e

**What this PR does / why we need it**:
Add 2 new test cases for federation services
- Federation service updation should update clustered service
- Federation service controller should recreate service shard in cluster, if it gets deleted.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #27623, #35827
Handles one of the tasks discussed in #41253

**Special notes for your reviewer**:

**Release note**:
`NONE`

cc @kubernetes/sig-federation-bugs, @nikhiljindal @madhusudancs
2017-04-27 17:14:06 -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
Kubernetes Submit Queue 4c7edeb9d4 Merge pull request #45052 from ixdy/update-gazel
Automatic merge from submit-queue (batch tested with PRs 45052, 44983, 41254)

Update gazel to v17

**What this PR does / why we need it**: gazel v17 has a bugfix for creating the `vendor/BUILD` file from scratch. there should be no other changes.

**Release note**:

```release-note
NONE
```

/assign @mikedanese @spxtr
2017-04-27 17:14:02 -07:00
divyenpatel 821f8cd9b9 datastore cluster support
fix verify-gofmt failure
2017-04-27 17:12:45 -07:00
Chao Xu d0b94538b9 make it possible to move SchemeBuilder with zz_generated.deepcopy.go 2017-04-27 16:57:29 -07:00
Kubernetes Submit Queue 09747e6bee Merge pull request #44510 from bowei/gce-metrics
Automatic merge from submit-queue (batch tested with PRs 44124, 44510)

Add metrics to all major gce operations (latency, errors)

```release-note
Add metrics to all major gce operations {latency, errors}

The new metrics are:

  cloudprovider_gce_api_request_duration_seconds{request, region, zone}
  cloudprovider_gce_api_request_errors{request, region, zone}
 
`request` is the specific function that is used.
`region` is the target region (Will be "<n/a>" if not applicable)
`zone` is the target zone (Will be "<n/a>" if not applicable)

Note: this fixes some issues with the previous implementation of
metrics for disks:
- Time duration tracked was of the initial API call, not the entire
  operation.
- Metrics label tuple would have resulted in many independent
  histograms stored, one for each disk. (Did not aggregate well).
```
2017-04-27 16:14:58 -07:00
Kubernetes Submit Queue 684df6e421 Merge pull request #44124 from vmware/VSANPolicySupportPVCScaleCreationFix
Automatic merge from submit-queue (batch tested with PRs 44124, 44510)

Optimize the time taken to create Persistent volumes with VSAN storage capabilities at scale and handle VPXD crashes

Currently creating persistent volumes with VSAN storage capabilities at scale is taking very large amount of time. We have tested at the scale of 500-600 PVC's and its more time for all the PVC requests to go from Pending state to Bound state. 

- In our current design we use a single systemVM - "kubernetes-helper-vm" as a means to create a persistent volume with the VSAN policy configured. 

- Since all the operations are on a single system VM, all requests on scale get queued and executed serially on this system VM. Because of this creating a high number of PVC's is taking very large time.

- Since its a single system VM, all parallel PVC requests most of the time tend to take the same SCSI adapter on the system VM and also same unit number on the SCSI adapter. Therefore the error rate is high.

Inorder to overcome these issues and to optimize the time taken to create persistent volumes with VSAN storage capabilities at scale we have slightly modified the design which is described below:

- In this model, we create a VM on the fly for every persistent volume that is being created. Since all the reconfigure operations to create a disk with the VSAN policy configured are on their individual VM's, all of these PVC's request execute in parallel independent one other.

- With this new design, there will no error rate at all.

Also, we have overcome the problem of vpxd crashes and any other intermediate problems by checking type of the errors.

Fixes https://github.com/vmware/kubernetes/issues/122, https://github.com/vmware/kubernetes/issues/124

@kerneltime  @tusharnt @divyenpatel @pdhamdhere

**Release note**:

```release-note
None
```
2017-04-27 16:14:56 -07:00
Nick Sardo 71ca925b05 Bump GLBC version to 0.9.3 2017-04-27 15:49:01 -07:00
Jeff Grafton ed7c75e324 Update gazel to v17 2017-04-27 15:01:34 -07:00
Kubernetes Submit Queue c2595909e9 Merge pull request #44966 from a-robinson/insecure
Automatic merge from submit-queue

Fix cockroachdb statefulset test read/write commands

Explicitly specifying `--insecure` is required on insecure clusters,
which started being enforced in a very recent release. In 2 weeks
we'll have a stable image version that we can reliably pin the
relevant statefulset yaml file to in order to avoid stupid failures
like this. I'm really sorry for the flakes!

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

It fixes the currently broken statefulset test suite - https://storage.googleapis.com/k8s-gubernator/triage/index.html?job=gci-gce-statefulset&test=CockroachDB

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

N/A

**Special notes for your reviewer**:

N/A

**Release note**:

```release-note
NONE
```

@kow3ns
2017-04-27 14:56:35 -07:00
Kubernetes Submit Queue 963e056515 Merge pull request #45044 from juju-solutions/gkk/e2e-snap
Automatic merge from submit-queue (batch tested with PRs 42740, 44980, 45039, 41627, 45044)

Update kubernetes-e2e charm to use snaps

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

This updates the kubernetes-e2e charm to use snaps instead of Juju resources for payload delivery.

The main advantage of this is that it decouples the charm from the e2e payload, allowing us to support multiple versions of Kubernetes with a single release of the charm.

**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
Update kubernetes-e2e charm to use snaps
```
2017-04-27 13:27:09 -07:00
Kubernetes Submit Queue 8b9625d2ea Merge pull request #41627 from gyliu513/kubelet-types
Automatic merge from submit-queue (batch tested with PRs 42740, 44980, 45039, 41627, 45044)

Improved code coverage for /pkg/kubelet/types

**What this PR does / why we need it**:
The test coverage for /pkg/kubelet/types was increased from 50% to 87.5%

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-04-27 13:27:06 -07:00
Kubernetes Submit Queue a3c4d9d603 Merge pull request #45039 from shyamjvs/report-metrics-grabber-error
Automatic merge from submit-queue (batch tested with PRs 42740, 44980, 45039, 41627, 45044)

Log the error (if any) in e2e metrics gathering step

Because why not.

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

cc @wojtek-t @gmarek
2017-04-27 13:27:04 -07:00
Kubernetes Submit Queue a984a7ed09 Merge pull request #44980 from csbell/sync-daemonset
Automatic merge from submit-queue (batch tested with PRs 42740, 44980, 45039, 41627, 45044)

[Federation] Convert Daemonset to use the generic sync controller

To be rebased on master when @perotinus's configmaps PR merges.

Tested integration and e2e.
2017-04-27 13:27:02 -07:00
Kubernetes Submit Queue 8ab63dd9ea Merge pull request #42740 from mtaufen/tarball-cleanup
Automatic merge from submit-queue (batch tested with PRs 42740, 44980, 45039, 41627, 45044)

Cleanup some of the tarball producing code for e2e node tests

This is some e2e node cleanup work I found sitting in a local branch while deleting old local git branches. It looks like it's still useful.
2017-04-27 13:27:00 -07:00
Bowei Du ee847ebf8a Add metrics to all major gce operations {latency, errors}
The new metrics is:

  cloudprovider_gce_api_request_duration_seconds{request, region, zone}
  cloudprovider_gce_api_request_errors{request, region, zone}

`request` is the specific function that is used.
`region` is the target region (Will be "<n/a>" if not applicable)
`zone` is the target zone (Will be "<n/a>" if not applicable)

Note: this fixes some issues with the previous implementation of
metrics for disks:
- Time duration tracked was of the initial API call, not the entire
  operation.
- Metrics label tuple would have resulted in many independent
  histograms stored, one for each disk. (Did not aggregate well).
2017-04-27 12:49:30 -07:00
Hemant Kumar f2aa330a38 Start recording cloud provider metrics for AWS
Lets start recording storage metrics for AWS.
2017-04-27 15:26:32 -04:00
Mike Danese 310c914a6d Merge pull request #45046 from mikedanese/fix-build
update libc to pick up some fixes
2017-04-27 12:20:49 -07:00
Kubernetes Submit Queue 33f51926f6 Merge pull request #45027 from MaciekPytel/ca_test_gcloud_log
Automatic merge from submit-queue (batch tested with PRs 41106, 44346, 44929, 44979, 45027)

Log error before failing in autoscaling e2e

The gcloud alpha command in e2e fails, but no useful information (error message) is logged.
2017-04-27 12:11:08 -07:00
Kubernetes Submit Queue 6b38c11dbe Merge pull request #44979 from shyamjvs/fix-metrics-json-filename
Automatic merge from submit-queue (batch tested with PRs 41106, 44346, 44929, 44979, 45027)

Make metrics filenames for e2e tests indicate the test better

Currently the names of the json files with metrics for e2e tests are named by appending the `SummaryKind` with a timestamp of the test. It took me some time to figure out which file corresponds to which e2e test due to this. Changing it to have the testname instead of the timestamp.

cc @wojtek-t @gmarek
2017-04-27 12:11:06 -07:00
Kubernetes Submit Queue 6251ff47c3 Merge pull request #44929 from liggitt/proxy-subresource-patch
Automatic merge from submit-queue (batch tested with PRs 41106, 44346, 44929, 44979, 45027)

Add PATCH to supported list of proxy subresource verbs

Follow up to #41421 for the proxy subresources

```release-note
The proxy subresource APIs for nodes, services, and pods now support the HTTP PATCH method.
```
2017-04-27 12:11:03 -07:00
Kubernetes Submit Queue 14a557b1a2 Merge pull request #44346 from mikedanese/build-static
Automatic merge from submit-queue (batch tested with PRs 41106, 44346, 44929, 44979, 45027)

bazel: statically link dockerized components
2017-04-27 12:11:00 -07:00