Commit Graph

49850 Commits (590ea991a5b5d8b6a948b89a0f8387de47ea9141)

Author SHA1 Message Date
Kubernetes Submit Queue 21b6a336f5 Merge pull request #46907 from zhangxiaoyu-zidif/add-comment-for-genutils
Automatic merge from submit-queue (batch tested with PRs 46787, 46876, 46621, 46907, 46819)

Add fatal message

**What this PR does / why we need it**:
Add fatal message

**Release note**:

```release-note
NONE
```
2017-06-06 02:21:57 -07:00
Kubernetes Submit Queue 3fe8df763a Merge pull request #46621 from gyliu513/NodeSelectorMatches
Automatic merge from submit-queue (batch tested with PRs 46787, 46876, 46621, 46907, 46819)

Highlight nodeSelector when checking nodeSelector for Pod.

**What this PR does / why we need it**:
Currently, we are using function name as `PodSelectorMatches` to check if `nodeSelector` matches for a Pod, it is better update the function name a bit to reflect it is checking `nodeSelector` for a Pod.

The proposal is rename `PodSelectorMatches` as `PodMatchNodeSelector`.

**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-06-06 02:21:44 -07:00
Kubernetes Submit Queue f68575f3f5 Merge pull request #46876 from mtaufen/fix-cadvisorport
Automatic merge from submit-queue (batch tested with PRs 46787, 46876, 46621, 46907, 46819)

Fix cAdvisorPort, 0 is a valid option

wrt #11710, this maintains the current default if nobody provides the flag, but allows explicitly passing 0.

/cc @farcaller @vishh @liggitt @antoineco @philips 
/assign @liggitt @vishh 

```release-note
Fixes a bug with cAdvisorPort in the KubeletConfiguration that prevented setting it to 0, which is in fact a valid option, as noted in issue #11710.
```
2017-06-06 02:21:41 -07:00
Kubernetes Submit Queue a03bb6fc5f Merge pull request #46787 from crassirostris/fluentd-gcp-update
Automatic merge from submit-queue

Update the fluentd-gcp image

Rolled back fluentd version to 0.12 to avoid performance problems and unnecessary noise in logs: https://github.com/kubernetes/contrib/pull/2625

Fixes https://github.com/kubernetes/kubernetes/issues/46990
2017-06-06 01:53:40 -07:00
Jacob Beacham 7ffd870c1e kubeadm: Idempotent service account creation.
Ignore errors for duplicates when creating service accounts.

https://github.com/kubernetes/kubeadm/issues/278
2017-06-06 01:43:55 -07:00
Kubernetes Submit Queue 8df56da448 Merge pull request #46700 from crassirostris/add-event-exporter-deployment
Automatic merge from submit-queue

Add event exporter deployment to the fluentd-gcp addon

Introduce event exporter deployment to the fluentd-gcp addon so that by default if logging to Stackdriver is enabled, events will be available there also.

In this release, event exporter is a non-critical pod in BestEffort QoS class to avoid preempting actual workload in tightly loaded clusters. It will become critical in one of the future releases.


```release-note
Stackdriver cluster logging now deploys a new component to export Kubernetes events.
```
2017-06-06 00:00:49 -07:00
Kubernetes Submit Queue cb681321c7 Merge pull request #45686 from jingxu97/May/emptyDir
Automatic merge from submit-queue

Add EmptyDir volume capacity isolation

This PR adds the support for isolating the emptyDir volume use. If user
sets a size limit for emptyDir volume, kubelet's eviction manager monitors its usage
and evict the pod if the usage exceeds the limit.

This feature is part of local storage capacity isolation and described in the proposal kubernetes/community#306

**Release note**:

```release-note
Alpha feature: allows users to set storage limit to isolate EmptyDir volumes. It enforces the limit by evicting pods that exceed their storage limits  
```
2017-06-05 23:08:58 -07:00
Christoph Blecker 1049ec8594
Fix link tests in mungedocs 2017-06-05 22:37:20 -07:00
Kubernetes Submit Queue d4e8a6cb4c Merge pull request #46745 from pipejakob/kubeadm-upgrades
Automatic merge from submit-queue

kubeadm: don't duplicate master taint if it already exists.

**What this PR does / why we need it**:
This helps enable a graceful upgrade/downgrade process between 1.6.x and 1.7.x kubeadm clusters (although no guarantees outside of that range) by doing:

    $ kubeadm init --kubernetes-version <version> --skip-preflight-checks

Without this change, the command fails with an error that the node taint is duplicated.

This is part of https://github.com/kubernetes/kubeadm/issues/278

**Release note**:

```release-note
NONE
```
Fixes: https://github.com/kubernetes/kubeadm/issues/288
2017-06-05 22:21:35 -07:00
Christoph Blecker 1bdc7a29ae
Update docs/ URLs to point to proper locations 2017-06-05 22:13:54 -07:00
Lucas Käldström de2ef8f0c7
kubeadm: Make kubeadm use the right CSR approver for the right version 2017-06-06 07:47:18 +03:00
Jordan Liggitt 3fd4e16eb0
Block on projected volume data fetch failure 2017-06-06 00:34:24 -04:00
Kubernetes Submit Queue a552ee61a0 Merge pull request #46672 from smarterclayton/initializer_with_config
Automatic merge from submit-queue (batch tested with PRs 46967, 46992, 43338, 46717, 46672)

Select initializers from the dynamic configuration

Continues #36721

kubernetes/features#209
2017-06-05 20:27:50 -07:00
Kubernetes Submit Queue 5ece6470b3 Merge pull request #46717 from timstclair/audit-proto
Automatic merge from submit-queue (batch tested with PRs 46967, 46992, 43338, 46717, 46672)

Generate protobuf for the audit API

Add protobuf generation & annotations for the advanced auditing API. We're not using them directly now, but settling on the field numbering will help with some 3rd party integrations.

For kubernetes/features#22

/cc @ihmccreery
2017-06-05 20:27:48 -07:00
Kubernetes Submit Queue 6b50a5cb39 Merge pull request #43338 from fabianofranz/group_aliases_in_api
Automatic merge from submit-queue (batch tested with PRs 46967, 46992, 43338, 46717, 46672)

Add group alias names to API resources to allow discovery

**What this PR does / why we need it**: 
Adds `GroupNames []string` to API resources, which represents the list of group aliases that every resource belongs to. 

Partially fixes https://github.com/kubernetes/kubernetes/issues/41353

This moves the logic of "all" (which currently [translates](fbc94c0896/pkg/kubectl/cmd/util/shortcut_restmapper.go (L106)) to "pods,replicationcontrollers,services,...") to the server-side. Will allow clients like `kubectl` to discover group aliases instead of having it hardcoded and the API server to better handle consistency across multiple clients, version skew, etc; and will make "all" un-special and allow other groups to be created.

As a follow-up we'll patch `kubectl` to make groups aliases discoverable and the hardcoded list a fallback while we still have to support it.

Related to https://github.com/kubernetes/kubernetes/pull/42595#issuecomment-286839885.

**Release note**:
```release-note
Adds the `Categories []string` field to API resources, which represents the list of group aliases (e.g. "all") that every resource belongs to. 
```
@kubernetes/sig-api-machinery-misc @deads2k @bgrant0607
2017-06-05 20:27:46 -07:00
Kubernetes Submit Queue 11aa1de0e0 Merge pull request #46992 from mikedanese/restart-fix
Automatic merge from submit-queue (batch tested with PRs 46967, 46992, 43338, 46717, 46672)

save kubelet bootstrap certs on GCI

Fix https://github.com/kubernetes/kubernetes/issues/46982
2017-06-05 20:27:44 -07:00
Kubernetes Submit Queue f1dfda1fe6 Merge pull request #46967 from deads2k/crd-11-ns-wait
Automatic merge from submit-queue (batch tested with PRs 46967, 46992, 43338, 46717, 46672)

deflake CRD watch tests

Fixes https://github.com/kubernetes/kubernetes/issues/46446. Again...

This flake window is caused by the watch cache starting late.  This pull updates the test to do fancy list/create/watch/delete semantics to catch the problem.  In the field, this should be treated the same as any other "resourceVersion tool old" error and handled with a list/watch.  The test cannot be level driven, it is actually testing the edge behavior, so we have to do something weird like this.

@sttts @liggitt let's try this again...
2017-06-05 20:27:42 -07:00
Yu-Ju Hong d152e20f41 Address the comments 2017-06-05 19:51:55 -07:00
Clayton Coleman b1abedbc64
Wrap HumanReadablePrinter in tab output unless explicitly asked not to
Fixes an accidental regression. In general, we should not accept an
incoming tabwriter and instead manage at a higher level. Fix the bug and
add a comment re: future refactoring.
2017-06-05 22:06:38 -04:00
Kubernetes Submit Queue de19cbe752 Merge pull request #46050 from mml/log-disruption
Automatic merge from submit-queue (batch tested with PRs 44883, 46836, 46765, 46683, 46050)

Log more verbose when DisruptionController doesn't start.
2017-06-05 18:43:16 -07:00
Kubernetes Submit Queue 61cd3fca01 Merge pull request #46683 from atlassian/fix-untructured-owner-references
Automatic merge from submit-queue (batch tested with PRs 44883, 46836, 46765, 46683, 46050)

Fix round-trip of Unstructured.OwnerReferences

**What this PR does / why we need it**:
Previously `setOwnerReference()` was storing pointers but `extractOwnerReference()` is expecting pointer fields as plain values so it cannot read those pointers. And hence you cannot read what you've just stored.

**Which issue this PR fixes**
#46817

**Special notes for your reviewer**:
This is similar to #43346.

**Release note**:
```release-note
NONE
```
2017-06-05 18:43:13 -07:00
Kubernetes Submit Queue 59af8cb506 Merge pull request #46765 from xingzhou/kube-46736
Automatic merge from submit-queue (batch tested with PRs 44883, 46836, 46765, 46683, 46050)

While deleting a namespace, the TPR instances under this ns should be…

… deleted.

While deleting a namespace, the TPR instances under this ns should be deleted.

Fixed #46736 

**Release note**:
```
None
```
2017-06-05 18:43:10 -07:00
Kubernetes Submit Queue 0589c55e7c Merge pull request #46836 from CaoShuFeng/legacy_audit
Automatic merge from submit-queue (batch tested with PRs 44883, 46836, 46765, 46683, 46050)

update copyed doc for advanced audit

doc for WithAudit is copyed from WithLegacyAudit, it's out of date.
This change update doc for these two functions.

**Release note**:

```
NONE
```
2017-06-05 18:43:08 -07:00
Kubernetes Submit Queue 356d4e8ce2 Merge pull request #44883 from ravigadde/bind-1.7
Automatic merge from submit-queue (batch tested with PRs 44883, 46836, 46765, 46683, 46050)

Added Bind method to Scheduler Extender

- only one extender can support the bind method
- if an extender supports bind, scheduler delegates the pod binding to the extender



**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 #41235

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-06-05 18:43:06 -07:00
Chao Xu a0a2e95fc5 GC should retry on patch error 2017-06-05 18:28:46 -07:00
Yu-Ju Hong 07a67c252c kuberuntime: check the value of RunAsNonRoot when verifying
The verification function is fixed to check the value of RunAsNonRoot,
not just the existence of it. Also adds unit tests to verify the correct
behavior.
2017-06-05 18:03:32 -07:00
Kubernetes Submit Queue 56da71bb34 Merge pull request #46844 from sttts/sttts-invalid-query-params
Automatic merge from submit-queue (batch tested with PRs 46972, 42829, 46799, 46802, 46844)

apiserver: return BadRequest 400 for invalid query params

Fixes https://github.com/kubernetes/kubernetes/issues/39730
Replaces #40773.
2017-06-05 17:46:57 -07:00
Kubernetes Submit Queue f842bb9987 Merge pull request #46802 from shyamjvs/npd-kernel-config
Automatic merge from submit-queue (batch tested with PRs 46972, 42829, 46799, 46802, 46844)

Add KernelDeadlock condition to hollow NPD

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

/cc @wojtek-t @gmarek
2017-06-05 17:46:55 -07:00
Kubernetes Submit Queue 8280bd5e1a Merge pull request #46799 from mikedanese/gce-3
Automatic merge from submit-queue (batch tested with PRs 46972, 42829, 46799, 46802, 46844)

promote tls-bootstrap to beta

last commit of this PR.

Towards https://github.com/kubernetes/kubernetes/issues/46999

```release-note
Promote kubelet tls bootstrap to beta. Add a non-experimental flag to use it and deprecate the old flag.
```
2017-06-05 17:46:52 -07:00
Kubernetes Submit Queue 1c64f31fdb Merge pull request #42829 from msau42/multizone_pv_tests
Automatic merge from submit-queue (batch tested with PRs 46972, 42829, 46799, 46802, 46844)

Multizone static pv test

**What this PR does / why we need it**:
Adds an e2e test for checking that pods get scheduled to the same zone as statically created PVs.  This tests the PersistentVolumeLabel admission controller, which adds zone and region labels when PVs are created.  As part of this, I also had to make changes to volume test utility code to pass in a zone parameter for creating PDs, and also had to add an argument to the e2e test program to accept a list of zones.

Fixes #46995

**Special notes for your reviewer**:
It's probably easier to review each commit separately.

**Release note**:

NONE
2017-06-05 17:46:49 -07:00
Kubernetes Submit Queue c8c4fff8be Merge pull request #46972 from liggitt/node-pod-delete-cache-miss
Automatic merge from submit-queue

Check live pod on cache miss before forbidding node deletion

Fixes #46971 flake
2017-06-05 17:43:04 -07:00
Maciej Pytel ecc33fd8c2 Wait for instances boot in cluster-autoscaler e2e 2017-06-06 01:46:57 +02:00
Kubernetes Submit Queue f893cddfba Merge pull request #46460 from sakshamsharma/location_transformer
Automatic merge from submit-queue (batch tested with PRs 46550, 46663, 46816, 46820, 46460)

Add configuration for encryption providers

## Additions

Allows providing a configuration file (using flag `--experimental-encryption-provider-config`) to use the existing AEAD transformer (with multiple keys) by composing mutable transformer, prefix transformer (for parsing providerId), another prefix transformer (for parsing keyId), and AES-GCM transformers (one for each key). Multiple providers can be configured using the configuration file.

Example configuration:
```
kind: EncryptionConfig
apiVersion: v1
resources:
  - resources:
    - namespaces
    providers:
    - aes:
        keys:
        - name: key1
          secret: c2vjcmv0iglzihnly3vyzq==
        - name: key2
          secret: dghpcybpcybwyxnzd29yza==
    - identity: {}
```

Need for configuration discussed in:
#41939
[Encryption](3418b4e4c6/contributors/design-proposals/encryption.md)

**Pathway of a read/write request**:
1. MutableTransformer
2. PrefixTransformer reads the provider-id, and passes the request further if that matches.
3. PrefixTransformer reads the key-id, and passes the request further if that matches.
4. GCMTransformer tries decrypting and authenticating the cipher text in case of reads. Similarly for writes.

## Caveats
1. To keep the command line parameter parsing independent of the individual transformer's configuration, we need to convert the configuration to an `interface{}` and manually parse it in the transformer. Suggestions on better ways to do this are welcome.

2. Flags `--encryption-provider` and `--encrypt-resource` (both mentioned in [this document](3418b4e4c6/contributors/design-proposals/encryption.md) ) are not supported in this because they do not allow more than one provider, and the current format for the configuration file possibly supersedes their functionality.

3. Currently, it can be tested by adding `--experimental-encryption-provider-config=config.yml` to `hack/local-up-cluster.sh` on line 511, and placing the above configuration in `config.yml` in the root project directory.

Previous discussion on these changes:
https://github.com/sakshamsharma/kubernetes/pull/1

@jcbsmpsn @destijl @smarterclayton

## TODO
1. Investigate if we need to store keys on disk (per [encryption.md](3418b4e4c6/contributors/design-proposals/encryption.md (option-1-simple-list-of-keys-on-disk)))
2. Look at [alpha flag conventions](https://github.com/kubernetes/kubernetes/blob/master/pkg/features/kube_features.go)
3. Need to reserve `k8s:enc` prefix formally for encrypted data. Else find a better way to detect transformed data.
2017-06-05 16:43:48 -07:00
Kubernetes Submit Queue 7fb75873ea Merge pull request #46820 from ixdy/bazel-kubeproxy-debian-iptables
Automatic merge from submit-queue (batch tested with PRs 46550, 46663, 46816, 46820, 46460)

bazel: base kube-proxy image on debian-iptables instead of busybox + iptables

**What this PR does / why we need it**: the bazel-built kube-proxy image currently uses a custom base image made up of scratch + busybox + iptables + a few dependencies, while the official kube-proxy image is based off of the debian-iptables image.

This difference seems to cause some weird issues such as #46103, since the container layout doesn't look the same.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/assign @mikedanese @spxtr @pipejakob 
/cc @Q-Lee @thockin @cblecker
2017-06-05 16:43:46 -07:00
Kubernetes Submit Queue 39d548f40c Merge pull request #46816 from dashpole/update_godep
Automatic merge from submit-queue (batch tested with PRs 46550, 46663, 46816, 46820, 46460)

Update cAdvisor version to v0.26.0

issue: #46658

I have requested a 1 day exception for code freeze.

/assign @dchen1107 

```release-note
Fix disk partition discovery for brtfs
Add ZFS support
Add overlay2 storage driver support
```
2017-06-05 16:43:43 -07:00
Kubernetes Submit Queue 4faf7f1f4c Merge pull request #46663 from nicksardo/gce-internallb
Automatic merge from submit-queue (batch tested with PRs 46550, 46663, 46816, 46820, 46460)

[GCE] Support internal load balancers

**What this PR does / why we need it**:
Allows users to expose K8s services externally of the K8s cluster but within their GCP network. 

Fixes #33483

**Important User Notes:**
- This is a beta feature. ILB could be enabled differently in the future. 
- Requires nodes having version 1.7.0+ (ILB requires health checking and a health check endpoint on kube-proxy has just been exposed)
- This cannot be used for intra-cluster communication. Do not call the load balancer IP from a K8s node/pod.  
- There is no reservation system for private IPs. You can specify a RFC 1918 address in `loadBalancerIP` field, but it could be lost to another VM or LB if service settings are modified.
- If you're running an ingress, your existing loadbalancer backend service must be using BalancingMode type `RATE` - not `UTILIZATION`. 
  - Option 1: With a 1.5.8+ or 1.6.4+ version master, delete all your ingresses, and re-create them.
  - Option 2: Migrate to a new cluster running 1.7.0. Considering ILB requires nodes with 1.7.0, this isn't a bad idea.
  - Option 3: Possible migration opportunity, but use at your own risk. More to come later.


**Reviewer Notes**:
Several files were renamed, so github thinks ~2k lines have changed. Review commits one-by-one to see the actual changes.

**Release note**:
```release-note
Support creation of GCP Internal Load Balancers from Service objects
```
2017-06-05 16:43:41 -07:00
Fabiano Franz 39e5812848 Update generated 2017-06-05 20:32:30 -03:00
Fabiano Franz 058f9b4f32 Add group alias names to discovery in registry 2017-06-05 20:18:12 -03:00
Fabiano Franz f07bf05f02 Add group alias names to discovery in API resources 2017-06-05 20:18:12 -03:00
Jeff Lowdermilk ac1ce7f1cd Don't parse human-readable output from gcloud in tests 2017-06-05 16:15:57 -07:00
Tim St. Clair d7d5435720
Generate protobuf for the audit API 2017-06-05 16:13:41 -07:00
Clayton Coleman 772ab8e1b4
Load initializers from dynamic config
Handle failure cases on startup gracefully to avoid causing cascading
errors and poor initialization in other components. Initial errors from
config load cause the initializer to pause and hold requests. Return
typed errors to better communicate failures to clients.

Add code to handle two specific cases - admin wants to bypass
initialization defaulting, and mirror pods (which want to bypass
initialization because the kubelet owns their lifecycle).
2017-06-05 19:12:41 -04:00
Clayton Coleman 034f06d7e4
Remove Initializers from federation 2017-06-05 19:12:36 -04:00
Jack Francis 3f3aa279b9 configurable backoff
- leveraging Config struct (—cloud-config) to store backoff and rate limit on/off and performance configuration
- added add’l error logging
- enabled backoff for vm GET requests
2017-06-05 16:06:50 -07:00
Guangya Liu 2b311fefba Do not fire InsufficientResourceError when there are intentional reasons. 2017-06-06 06:46:14 +08:00
Kubernetes Submit Queue 7bbc615b97 Merge pull request #46550 from DirectXMan12/feature/hpa-status-conditions
Automatic merge from submit-queue

HPA Status Conditions

This PR introduces conditions to the status of the HorizontalPodAutoscaler (in autoscaling/v2alpha1).  
The conditions whether or not the autoscaler is actively scaling, and why.  This gives greater visibility
into the *current* status of the autoscaler, similarly to how conditions work for pods, nodes, etc.

`kubectl describe` has been updated to the display the conditions affecting a given HPA.

Implements kubernetes/features#264 (alpha in 1.7)

**Release note**:
```release-note
Introduces status conditions to the HorizontalPodAutoscaler in autoscaling/v2alpha1, indicating the current status of a given HorizontalPodAutoscaler, and why it is or is not scaling.
```
2017-06-05 15:42:58 -07:00
Mike Danese ab63017b39 save kubelet bootstrap certs on GCI 2017-06-05 15:31:02 -07:00
Jacob Beacham 20c45d08fb kubeadm: don't duplicate master taint if it already exists.
This helps enable a graceful upgrade/downgrade process between 1.6.x and
1.7.x kubeadm clusters (although no guarantees outside of that range) by
doing:

  $ kubeadm init --kubernetes-version <version> --skip-preflight-checks

Without this change, the command fails with an error that the node taint
is duplicated.

This is part of https://github.com/kubernetes/kubeadm/issues/278
2017-06-05 14:47:50 -07:00
Anirudh Ramanathan cc294cfb7e Merge pull request #46985 from deads2k/controller-09-agg-health
make the health check wait for ready apiservices
2017-06-05 14:33:23 -07:00
Zihong Zheng d455fad134 Defer DeleteGCEStaticIP before asserting error 2017-06-05 14:24:32 -07:00