Commit Graph

53984 Commits (9a21343b20ba414c72bffddfc08dc568e939c470)

Author SHA1 Message Date
Kubernetes Submit Queue cc557e61cc Merge pull request #51473 from bboreham/cadvisor-consistent-labels
Automatic merge from submit-queue (batch tested with PRs 51471, 50561, 50435, 51473, 51436)

Fix inconsistent Prometheus cAdvisor metrics

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

We need this because otherwise kubelet is exposing different sets of Prometheus metrics that randomly include or do not include containers.

See also https://github.com/google/cadvisor/issues/1704; quoting here:

Prometheus requires that all metrics in the same family have the same labels, so we arrange to supply blank strings for missing labels

The function `containerPrometheusLabels()` conditionally adds various metric labels from container labels - pod name, image, etc. However, when it receives the metrics, Prometheus [checks](https://github.com/prometheus/client_golang/blob/master/prometheus/registry.go#L665) that all metrics in the same family have the same label set, and [rejects](https://github.com/prometheus/client_golang/blob/master/prometheus/registry.go#L497) those that do not.

Since containers are collected in (somewhat) random order, depending on which kind is seen first you get one set of metrics or the other.

Changing the container labels function to always add the same set of labels, adding `""` when it doesn't have a real value, eliminates the issue in my testing.

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

Fixes #50151

**Special notes for your reviewer**:

I have made the same fix in two places.  I am 98% sure the one in `cadvisor_linux.go` isn't used and indeed cannot be used, but have not gone fully down that rabbit-hole.

**Release note**:
```release-note
Fix inconsistent Prometheus cAdvisor metrics
```
2017-08-29 02:22:16 -07:00
Kubernetes Submit Queue 9f6c61bba3 Merge pull request #50435 from NickrenREN/localstorage-downwardapi
Automatic merge from submit-queue (batch tested with PRs 51471, 50561, 50435, 51473, 51436)

Add local storage to downwards API

**Release note**:
```release-note
Add local ephemeral storage to downward API 
```


/assign @NickrenREN
2017-08-29 02:22:13 -07:00
Kubernetes Submit Queue b5c5b4a494 Merge pull request #50561 from cblecker/zsh-compinit
Automatic merge from submit-queue (batch tested with PRs 51471, 50561, 50435, 51473, 51436)

Allow zsh completion to be autoloaded by compinit

**What this PR does / why we need it**:
Allows the kubectl zsh autocompletion to be auto loaded by compinit. Had to move the the boilerplate down into the specific shell functions as the compdef needs to be the first line in the definition file.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
kubectl zsh autocompletion will work with compinit
```
2017-08-29 02:22:10 -07:00
Kubernetes Submit Queue 83bff8df0b Merge pull request #51471 from ixdy/gcloud-compute-managed-list
Automatic merge from submit-queue (batch tested with PRs 51471, 50561, 50435, 51473, 51436)

Fix `gcloud compute instance-groups managed list` call

**What this PR does / why we need it**: gcloud 168.0.0 makes the `gcloud compute instance-groups managed list --format='value(instanceGroup)'` call return a URL instead of just the name, which is causing `list-instances` to fail. Switching to `--format='value(name)'` seems to restore the old behavior.

x-ref #49673 

**Release note**:

```release-note
NONE
```

/cc @wojtek-t @mwielgus @shyamjvs @jiayingz @mindprince
2017-08-29 02:22:06 -07:00
huangjiuyuan 4ce3b6cf4f modifying the comment of BeforeDelete function to improve readibility 2017-08-29 17:03:06 +08:00
chenguoyan01 7062b977b7 add some period in cloud controller manager's options 2017-08-29 16:54:37 +08:00
fisherxu c2c0d59676 simplify Run in controllermanager 2017-08-29 16:48:11 +08:00
Kubernetes Submit Queue 04b3ab9aba Merge pull request #50705 from MrHohn/kube-proxy-ds
Automatic merge from submit-queue (batch tested with PRs 50932, 49610, 51312, 51415, 50705)

Allow running kube-proxy as a DaemonSet when using kube-up.sh on GCE

**What this PR does / why we need it**:
From #23225, this PR adds an option for user to run kube-proxy as a DaemonSet instead of static pods using GCE startup scripts. By default, kube-proxy will run as static pods.

This is the first step for moving kube-proxy into a DaemonSet in GCE, remaining tasks will be tracked on #23225.

**Special notes for your reviewer**:
The last commit are purely for testing out kube-proxy as daemonset via CIs.

cc @kubernetes/sig-network-misc @kubernetes/sig-cluster-lifecycle-misc 

**Release note**:

```release-note
When using kube-up.sh on GCE, user could set env `KUBE_PROXY_DAEMONSET=true` to run kube-proxy as a DaemonSet. kube-proxy is run as static pods by default.
```
2017-08-29 01:17:45 -07:00
Kubernetes Submit Queue 0b0b2a22c5 Merge pull request #51415 from jpbetz/timeout-param-minimal
Automatic merge from submit-queue (batch tested with PRs 50932, 49610, 51312, 51415, 50705)

Add --request-timeout to kube-apiserver to make global request timeout configurable

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

Make the currently hard coded 60 global request timeout in apiserver configurable via a --request-timeout command line flag.

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

https://github.com/kubernetes/kubernetes/issues/51355

**Special notes for your reviewer**:

We plan to backport this to 1.6 and 1.7. To ease the backport work, we've kept this change to a minimum. After this PR we will submit an additional PR to rename `--min-request-timeout` to something that more clearly describes it's purpose, such as `--long-running-request-timeout-min`.

**Release note**:

```release-note
Add --request-timeout to kube-apiserver to make global request timeout configurable.
```
2017-08-29 01:17:40 -07:00
Kubernetes Submit Queue 7c70decd27 Merge pull request #51312 from andrewsykim/50986
Automatic merge from submit-queue (batch tested with PRs 50932, 49610, 51312, 51415, 50705)

Deprecation warnings for auto detecting cloud providers

**What this PR does / why we need it**:
Adds deprecation warnings for auto detecting cloud providers. As part of the initiative for out-of-tree cloud providers, this feature is conflicting since we're shifting the dependency of kubernetes core into cAdvisor. In the future kubelets should be using `--cloud-provider=external` or no cloud provider at all. 

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

**Special notes for your reviewer**:
NOTE: I still have to coordinate with sig-node and kubernetes-dev to get approval for this deprecation, I'm only opening this PR since we're close to code freeze and it's something presentable.  

**Release note**:
```release-note
Deprecate auto detecting cloud providers in kubelet. Auto detecting cloud providers go against the initiative for out-of-tree cloud providers as we'll now depend on cAdvisor integrations with cloud providers instead of the core repo. In the near future, `--cloud-provider` for kubelet will either be an empty string or `external`. 
```
2017-08-29 01:17:37 -07:00
Kubernetes Submit Queue fe365b88e3 Merge pull request #49610 from NickrenREN/local-isolation
Automatic merge from submit-queue (batch tested with PRs 50932, 49610, 51312, 51415, 50705)

Add local storage support in Quota

Add local storage(scratch, overlay) support in quota

**Release note**:
```release-note
Add local ephemeral storage support to Quota
```

/cc @ddysher  @jingxu97
2017-08-29 01:17:34 -07:00
Kubernetes Submit Queue c27cdb11a9 Merge pull request #50932 from yguo0905/stats-cadvisor
Automatic merge from submit-queue (batch tested with PRs 50932, 49610, 51312, 51415, 50705)

Implement StatsProvider interface using cadvisor

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

- This PR changes the `StatsProvider` interface in `pkg/kubelet/server/stats` so that it can provide container stats from either cadvisor or CRI, and the summary API can consume the stats without knowing how they are provided.
- The `StatsProvider` struct in the newly added package `pkg/kubelet/stats` implements part of the `StatsProvider` interface in `pkg/kubelet/server/stats`.
- In `pkg/kubelet/stats`,
    - `stats_provider.go`: implements the node level stats and provides the entry point for this package.
    - `cadvisor_stats_provider.go`: implements the container level stats using cadvisor.
    - `cri_stats_provider.go`: implements the container level stats using CRI.
    - `helper.go`: utility functions shared by the above three components.
- There should be no user visible behaviors change in this PR.
- A follow up PR will implement the StatsProvider interface using CRI.

**Release note**:
```
None
```

/assign @yujuhong 
/assign @WIZARD-CXY
2017-08-29 01:17:29 -07:00
Jan Safranek 195d5c1546 Fix handling of APIserver errors when saving provisioned PVs.
When API server crashes *after* saving a provisioned PV and before sending
200 OK, the controller tries to save the PV again. In this case, it gets
AlreadyExists error, which should be interpreted as success and not as error.

Especially, a volume that corresponds to the PV should not be deleted in the
underlying storage.
2017-08-29 09:47:32 +02:00
Maciej Szulik 2de214b044
Enable batch/v1beta1.CronJobs by default 2017-08-29 09:31:39 +02:00
huangjiuyuan 6e832e2fe8 fixing package comment of v1 2017-08-29 15:26:27 +08:00
Saksham Sharma 3e11baf702 Add Google Cloud KMS plugin for encryption 2017-08-29 11:15:27 +05:30
Kubernetes Submit Queue c071a77156 Merge pull request #50717 from cblecker/git-util-func
Automatic merge from submit-queue

Fix rsync issue when maintaining data containers

**What this PR does / why we need it**:
When we stopped syncing the full .git dir into the container and created a dummy git tree, an issue arose if you're maintaining a data dir volume. The git tree created in the container wouldn't be updated if we make more commits and sync them in, and would cause a dirty tree.

This PR changes the rsync flags so that "H" filtered files are hidden from rsync on the source side, and if they exist on the destination side, they will be deleted.

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

**Special notes for your reviewer**:
/assign @sttts @dims @ixdy

**Release note**:

```release-note
NONE
```
2017-08-28 22:07:01 -07:00
Yu-Ju Hong f33c37e102 e2e: Add tests for network tiers in GCE 2017-08-28 18:40:20 -07:00
Yu-Ju Hong 22b2da2378 update bazel 2017-08-28 18:40:20 -07:00
Yu-Ju Hong 46eb7d8a55 GCE: Add annotations and helper functions for network tiers
These functions will be consumed in the follow-up changes.
2017-08-28 18:40:20 -07:00
Pengfei Ni fc8736fd97 Admit NoNewPrivs for remote and rkt runtimes 2017-08-29 08:48:30 +08:00
ymqytw 9b05e2644f update generated files 2017-08-28 16:37:24 -07:00
ymqytw 838c47ee10 add apply test for retainKeys 2017-08-28 16:37:23 -07:00
Serguei Bezverkhi d904e52570 Adding e2e SELinux test for local storage
Also changing provisioner bootstrapper frpm Pod to Job
2017-08-28 19:12:17 -04:00
ymqytw fd3b5bea8f add retainKeys in patchStrategy 2017-08-28 15:40:47 -07:00
Chao Xu 65308d68c5 generated 2017-08-28 15:24:50 -07:00
Chao Xu b642c9afbb remove failure policy from intializer configuration 2017-08-28 15:24:50 -07:00
Michael Taufen 503a6a8eec Add --append-hash flag to kubectl create configmap/secret
Specifying this new flag will automatically hash the configmap/secret
contents with sha256 and append the first 40 hex-encoded bits of the
hash to the name of the configmap/secret. This is especially useful for
workflows that generate configmaps/secrets from files (e.g.
--from-file).

Note that vowels and vowel-like characters in the hash are remapped to
consonants to make it more difficult to accidentally form bad words.

See this Google doc for more background:
https://docs.google.com/document/d/1x1fJ3pGRx20ujR-Y89HUAw8glUL8-ygaztLkkmQeCdU/edit
2017-08-28 14:17:47 -07:00
Yang Guo 039178b27f Use the pre-built docker binaries on Ubuntu for benchmark tests 2017-08-28 14:06:23 -07:00
Joe Betz cb764756c6 Add --request-timeout to allow the global request timeout of 60 seconds to be configured. 2017-08-28 13:42:43 -07:00
Zihong Zheng 6d35b94fc3 Add kube-proxy daemonset track to GCE startup scripts (GCI, Debian and CoreOS). 2017-08-28 13:31:07 -07:00
Zihong Zheng 1102656c88 Set up KUBE_PROXY_DAEMONSET env for GCE and common.sh. 2017-08-28 13:31:01 -07:00
Kubernetes Submit Queue a64eeb47f6 Merge pull request #51467 from liggitt/client-go-owner
Automatic merge from submit-queue

Add liggitt to client-go approvers

/assign @lavalamp
/assign @deads2k
2017-08-28 13:11:55 -07:00
Bryan Boreham c193bbc7c2 Make Prometheus cAdvisor metrics labels consistent
Prometheus requires that all metrics in the same family have the same
labels, so we arrange to supply blank strings for missing labels

See https://github.com/google/cadvisor/issues/1704
2017-08-28 19:53:18 +00:00
Jeff Grafton 0d1055213d Fix `gcloud compute instance-groups managed list` call 2017-08-28 12:24:37 -07:00
Kubernetes Submit Queue 7100d00491 Merge pull request #51342 from wongma7/flex-nil
Automatic merge from submit-queue

Set flexvolumeplugin.host so that it's not nil

@TerraTech @MikaelCluseau  @chakri-nelluri @verult

I assume this line was removed inadvertently, without plugin.host set the flexvolume silently fails at Mount/Attach* time. https://github.com/kubernetes/kubernetes/pull/50843

https://github.com/kubernetes/kubernetes/issues/51123

Please review, thanks!

```release-note
NONE
```
2017-08-28 12:07:18 -07:00
Matthew Wong 9e37133a1f Generated PV.Spec.MountOptions code 2017-08-28 14:20:48 -04:00
Matthew Wong 0855f6a089 Add MountOptions field to PV spec 2017-08-28 14:18:34 -04:00
Nick Sardo a48fe406be Consume new config value for network project id 2017-08-28 11:11:05 -07:00
Kubernetes Submit Queue b8fde17fc2 Merge pull request #48589 from yiqinguo/yiqinguo_add_event
Automatic merge from submit-queue

When faild create pod sandbox record event.

I created pods because of the failure to create a sandbox, but there was no clear message telling me what was the failure, so I wanted to record an event when the sandbox was created.

**Release note**:
```release-note
NONE
```
2017-08-28 10:59:53 -07:00
Jordan Liggitt 838d8a7274
Add liggitt to client-go approvers 2017-08-28 13:47:01 -04:00
Saksham Sharma 6a4afc897c Unify cloudprovided and normal KMS plugins 2017-08-28 22:46:42 +05:30
Kubernetes Submit Queue 403ad59557 Merge pull request #51456 from shyamjvs/glbc-allowed-memory-bump
Automatic merge from submit-queue

Make threshold for glbc mem-usage scale with nodes in density test

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

cc @wojtek-t
2017-08-28 10:09:58 -07:00
Kubernetes Submit Queue c17d70c240 Merge pull request #47044 from kubermatic/kubelet-update-default-labels
Automatic merge from submit-queue

Always check if default labels on node need to be updated in kubelet

**What this PR does / why we need it**:
Nodes join again but maybe OS/Arch/Instance-Type has changed in the meantime.
In this case the kubelet needs to check if the default labels are still correct and if not it needs to update them.

```release-note
Kubelet updates default labels if those are deprecated
```
2017-08-28 08:20:19 -07:00
Jordan Liggitt 658956f063
Feature gate initializers field 2017-08-28 11:11:48 -04:00
zhengjiajin 991238bf6f add long description for --list aware user 2017-08-28 21:56:30 +08:00
Kubernetes Submit Queue 9ccb55e012 Merge pull request #51460 from bskiba/cp
Automatic merge from submit-queue (batch tested with PRs 51441, 51356, 51460)

Autodetect kubemark Cloud Provider

**What this PR does / why we need it**:
This is needed for CloudProviderId to be properly
filled for Hollow Nodes.

**Release note**:
```
NONE
```
2017-08-28 06:41:27 -07:00
Kubernetes Submit Queue 520eab779e Merge pull request #51356 from wongma7/pv-cap-resize
Automatic merge from submit-queue (batch tested with PRs 51441, 51356, 51460)

Don't update pvc.status.capacity if pvc is already Bound

As discussed here https://github.com/kubernetes/community/pull/657#discussion_r128008128, in order for `pvc.status.Capacity < pv.Spec.Capcity` to be the mechanism for volume filesystem* resize, the pv controller should stop updating pvc.status.Capacity every resync period.

/assign @jsafrane
/sig storage
```release-note
NONE
```
2017-08-28 06:41:25 -07:00
Kubernetes Submit Queue 169de991c9 Merge pull request #51441 from wackxu/fixbadcomt
Automatic merge from submit-queue (batch tested with PRs 51441, 51356, 51460)

fix the bad position of code comment

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

The position of code comment is wrong and move it to the right position

**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**:

```
NONE
```
2017-08-28 06:41:22 -07:00
Kubernetes Submit Queue 4ba2b625c5 Merge pull request #50805 from bsalamat/preemption_metacompute
Automatic merge from submit-queue

Add support to modify precomputed predicate metadata upon adding/removal of a pod

**What this PR does / why we need it**: This PR adds capability to change precomputed predicate metadata and let's us add/remove pods to the precomputed metadata efficiently without the need ot recomputing everything upon addition/removal of pods. This PR is needed as a part of adding preemption logic to the scheduler.

**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**:
To make the review process a bit easier, there are three commits. The cleanup commit is only moving code and renaming some functions, without logic changes.

**Release note**:

```release-note
NONE
```
ref/ #47604
ref/ #48646

/assign @wojtek-t 

@kubernetes/sig-scheduling-pr-reviews @davidopp
2017-08-28 05:11:19 -07:00