Commit Graph

50805 Commits (2f1ea7efcf315100ddd94d59b0d76278fee28f0e)

Author SHA1 Message Date
Kubernetes Submit Queue 2f1ea7efcf Merge pull request #47515 from zhangxiaoyu-zidif/replace-scheduler-havesame
Automatic merge from submit-queue (batch tested with PRs 47043, 48448, 47515, 48446)

Refactor slice intersection

**What this PR does / why we need it**:
In worst case, the original method is O(N^2), while current method is 3 * O(N).
I think it is better.

**Release note**:

```release-note
NONE
```
2017-07-04 09:12:26 -07:00
Kubernetes Submit Queue 9a82cb2059 Merge pull request #48448 from shyamjvs/fix-configmap-test
Automatic merge from submit-queue (batch tested with PRs 47043, 48448, 47515, 48446)

Fix secret/configmap/projected volume update tests to work for large clusters

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

/cc @kubernetes/sig-node-pr-reviews @wojtek-t @gmarek
2017-07-04 09:12:23 -07:00
Kubernetes Submit Queue 0ec36bdc8f Merge pull request #47043 from CaoShuFeng/validate_audit
Automatic merge from submit-queue

Add Validate() function for audit options

**Release note**:

```
NONE
```
Fixes: #47114
2017-07-04 08:48:20 -07:00
Kubernetes Submit Queue 3f6124f185 Merge pull request #48468 from aleksandra-malinowska/autoscaling-volumes-test-fix
Automatic merge from submit-queue (batch tested with PRs 46926, 48468)

Fix typo in cluster size autoscaling tests selector

This caused tests not to be run automatically
2017-07-04 06:56:24 -07:00
Kubernetes Submit Queue 3bfcd74ace Merge pull request #46926 from k82cn/k8s_46924
Automatic merge from submit-queue (batch tested with PRs 46926, 48468)

Added helper funcs to schedulercache.Resource.

**What this PR does / why we need it**:
Avoid duplicated code slice by helper funcs.

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

**Release note**:

```release-note-none
```
2017-07-04 06:56:22 -07:00
Shyam Jeedigunta b5b4ba8fec Fix secret/configmap/projected update tests to work for large clusters 2017-07-04 14:14:15 +02:00
Aleksandra Malinowska 933b2efdcf fix test selector 2017-07-04 14:01:07 +02:00
Kubernetes Submit Queue 9385d50100 Merge pull request #47345 from luxas/kubeadm_move_controlplane_phase
Automatic merge from submit-queue (batch tested with PRs 46928, 47345)

kubeadm: Move directory ./master to ./phases/controlplane

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

 - Moves app/master into phases/controlplane. It should be in the phases directory, was just overlooked earlier
 - Harmonizes the import names in phases/controlplane with the similar import names in cmd/kubeadm

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

Please review only second and third commit, based on https://github.com/kubernetes/kubernetes/pull/47339

Targets v1.8

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews @timothysc @pipejakob
2017-07-04 04:37:31 -07:00
Kubernetes Submit Queue 1033dae18e Merge pull request #46928 from CaoShuFeng/audit_unused_function
Automatic merge from submit-queue

remove unused function and variable from audit backend

auditStringSlice is not used here anymore.
sink variable is also not used.
**Release note**:

```
NONE
```
Fixes: #47114
2017-07-04 04:21:15 -07:00
Lucas Käldström 4bab0e9b54
kubeadm: Harmonize import names in the controlplane phase with all the other code 2017-07-04 12:31:46 +03:00
Lucas Käldström 8046bafca5
kubeadm: Move app/master into a separate phase directory 2017-07-04 12:30:42 +03:00
Cao Shufeng 00e871a846 remove unused function and variable from audit backend 2017-07-04 16:14:10 +08:00
Kubernetes Submit Queue ea6e84365e Merge pull request #47206 from gyliu513/typo
Automatic merge from submit-queue

Follow up for https://github.com/kubernetes/kubernetes/pull/47003

**What this PR does / why we need it**:
This is addressing left comments for https://github.com/kubernetes/kubernetes/pull/47003#discussion_r120888982

/cc @aveshagarwal 

**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-07-04 00:25:22 -07:00
Kubernetes Submit Queue 4ae3b032f4 Merge pull request #48394 from smarterclayton/must_serialize_if_data_differs
Automatic merge from submit-queue (batch tested with PRs 48439, 48440, 48394)

GuaranteedUpdate must write if stored data is not canonical

An optimization added to the GuaranteedUpdate loop changed the
comparison of the current objects serialization against the stored data,
instead comparing to the in memory object, which defeated the mechanism
we use to migrate stored data (GET then PUT should update the version stored in etcd if the canonical serialization has changed)

This commit preserves that optimization but correctly verifies the in
memory serialization against the on disk serialization by fetching the
latest serialized data. Since most updates are not no-ops, this should
not regress the performance of the normal path.

Fixes #48393

```release-note
When performing a GET then PUT, the kube-apiserver must write the canonical representation of the object to etcd if the current value does not match. That allows external agents to migrate content in etcd from one API version to another, across different storage types, or across varying encryption levels. This fixes a bug introduced in 1.5 where we unintentionally stopped writing the newest data.
```
2017-07-03 13:05:30 -07:00
Kubernetes Submit Queue e1d9ab205a Merge pull request #48440 from Cynerva/gkk/snap-upgrades-restart-services
Automatic merge from submit-queue (batch tested with PRs 48439, 48440, 48394)

Fix kubernetes charms not restarting services after snap upgrades

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

This fixes a problem where the Kubernetes charms don't restart services after upgrading snaps. This can cause certain fixes not to be picked up (for example https://github.com/juju-solutions/release/pull/10)

**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
Fixed kubernetes charms not restarting services after snap upgrades
```
2017-07-03 13:05:28 -07:00
Kubernetes Submit Queue 937369bc21 Merge pull request #48439 from juju-solutions/bug/namespaces-path
Automatic merge from submit-queue (batch tested with PRs 48439, 48440, 48394)

Fix: namespace-create have kubectl in path

**What this PR does / why we need it**: In juju deployed clusters namespace-create action is failing

**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/juju-solutions/bundle-canonical-kubernetes/issues/326

**Special notes for your reviewer**:

**Release note**:

```Fix: namespace-create action on Juju deployed clusters
```
2017-07-03 13:05:27 -07:00
Kubernetes Submit Queue c662e1d7d8 Merge pull request #46949 from xingzhou/typo
Automatic merge from submit-queue

Fixed a comment typo

Typo fix

Fixed #48414 

**Release note**:
```
None
```
2017-07-03 11:33:36 -07:00
Kubernetes Submit Queue 74bde7f7ff Merge pull request #48354 from deads2k/gc-01-deletenever
Automatic merge from submit-queue (batch tested with PRs 47784, 47793, 48334, 48435, 48354)

allow a deletestrategy to opt-out of GC

Not all resources should be GC-able and we implemented an ignore list to handle this, but at the storage layer they could still set finalizers, they just hung in a stuck state forever.  This updates the strategy to allow a resource to indicate that they shouldn't be GCed.

@kubernetes/sig-api-machinery-misc
2017-07-03 10:41:56 -07:00
Kubernetes Submit Queue 470746f264 Merge pull request #48435 from juju-solutions/bug/non-leaders-keys
Automatic merge from submit-queue (batch tested with PRs 47784, 47793, 48334, 48435, 48354)

Non-leaders overwrite local keys with what the leader has

**What this PR does / why we need it**: Non-leaders juju master units do not update their auth keys.

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

**Special notes for your reviewer**:

**Release note**:

```NONE
```
2017-07-03 10:41:53 -07:00
Kubernetes Submit Queue cf9f110387 Merge pull request #48334 from CaoShuFeng/LevelMetadata
Automatic merge from submit-queue (batch tested with PRs 47784, 47793, 48334, 48435, 48354)

update events' ResponseStatus at Metadata level

ResponseStatus is populated in MetadataLevel, so we also update it in
MetadataLevel.

**Release note**:

```
NONE
```
2017-07-03 10:41:51 -07:00
Kubernetes Submit Queue e06b53d8a6 Merge pull request #47793 from crassirostris/sd-logging-e2e-convert-to-soak
Automatic merge from submit-queue (batch tested with PRs 47784, 47793, 48334, 48435, 48354)

Convert Stackdriver Logging load e2e tests to soak tests

Instead of loading logging mechanism for 10 minutes, load for 21 hours to detect regressions that require some time to build up.

Made possible by switching to pub/sub. Only merge after corresponding test suites have appropriate timeouts: https://github.com/kubernetes/test-infra/pull/3119

/cc @piosz @fgrzadkowski
2017-07-03 10:41:49 -07:00
Kubernetes Submit Queue 55261d7955 Merge pull request #47784 from CaoShuFeng/rule_validate
Automatic merge from submit-queue (batch tested with PRs 47784, 47793, 48334, 48435, 48354)

add validate for advanced audit policy

This change checks group name and non-resrouce URLs format for audit
policy.

**Release note**:

```
add validate for advanced audit policy, kube-apiserver will do a stricter validation and will break existing users with invalid configs.
```
2017-07-03 10:41:47 -07:00
Kubernetes Submit Queue 8f9c57ca53 Merge pull request #47919 from rrati/aws-handle-logs-with-return-keys
Automatic merge from submit-queue

Use %q formatter for error messages from the AWS SDK. #47789

Error messages from the AWS SDK can have return keys in them, so use %q formatter for those messages.
2017-07-03 09:41:50 -07:00
Kubernetes Submit Queue eb2a560679 Merge pull request #48189 from mikedanese/fixds
Automatic merge from submit-queue

support NoSchedule taints correctly in DaemonSet controller

Fixes https://github.com/kubernetes/kubernetes/issues/48190
```release-note
Support NoSchedule taints correctly in DaemonSet controller.
```
cc @kubernetes/sig-apps-pr-reviews
2017-07-03 08:46:32 -07:00
deads2k 312fb1e1fa allow a deletestrategy to opt-out of GC 2017-07-03 11:27:45 -04:00
Konstantinos Tsakalozos cea934bcbc Fix: namespace-create have kubectl in path 2017-07-03 18:22:20 +03:00
George Kraft c21b305fe9 Fix kubernetes charms not restarting services after snap upgrades 2017-07-03 09:47:08 -05:00
Konstantinos Tsakalozos e2571a853a Non leaders should overwrite any local copies of keys they have with what the leader has. 2017-07-03 17:45:43 +03:00
Kubernetes Submit Queue f38adf37de Merge pull request #47429 from timothysc/kubeadm
Automatic merge from submit-queue

Add timothysc to kubeadm reviewers

**What this PR does / why we need it**:
Adds timothysc to kubeadm reviewers b/c I'm working on it this cycle. 

**Release note**:
```
NONE
```
2017-07-03 07:38:03 -07:00
Mik Vyatskov 625192b3a2 Covert Stackdriver Logging load tests to soak tests 2017-07-03 15:11:22 +02:00
Cao Shufeng b6abcacb38 update events' ResponseStatus at Metadata level
ResponseStatus is populated in MetadataLevel, so we also update it in
MetadataLevel.
2017-07-03 20:43:48 +08:00
Cao Shufeng 7437b88386 add validate for advanced audit policy
This change checks group name and non-resrouce URLs format for audit
policy.
2017-07-03 20:35:35 +08:00
Kubernetes Submit Queue 13e142fb18 Merge pull request #48389 from nikhita/apiextensions-client-go-cleanup
Automatic merge from submit-queue

apiextensions: add cleanup section to client-go

Adds a `Cleanup` section to be consistent with other client-go tutorials.

Fixes https://github.com/kubernetes/apiextensions-apiserver/issues/1

**Release note**:

```release-note
NONE
```
2017-07-03 03:07:04 -07:00
Clayton Coleman b851614adf
GuaranteedUpdate must write if stored data is not canonical
An optimization added to the GuaranteedUpdate loop changed the
comparison of the current objects serialization against the stored data,
instead comparing to the in memory object, which defeated the mechanism
we use to migrate stored data.

This commit preserves that optimization but correctly verifies the in
memory serialization against the on disk serialization by fetching the
latest serialized data. Since most updates are not no-ops, this should
not regress the performance of the normal path.
2017-07-02 23:13:15 -04:00
Kubernetes Submit Queue d026286d39 Merge pull request #48055 from yiqinguo/yiqinguo_remove_err_ignored
Automatic merge from submit-queue

Add err judgment

I do not think that the error can be ignored here.

**Release note**:
```release-note
NONE
```
2017-07-02 20:05:39 -07:00
Kubernetes Submit Queue 9848cdb3ac Merge pull request #48281 from hogepodge/configure-swift-store
Automatic merge from submit-queue

Add configuration for swift container name

**What this PR does / why we need it:**
This review updates the OpenStack Heat provider to allow for configuring the name of the Swift object store.

**Which issue this PR fixes:**
fixes #47966

**Special notes for your reviewer**:
Note that the terminology for OpenStack Swift conflicts with K8S terminology. In this instance, container is referring to the organization structure of Swift storage objects.

**Release note**:
```release-note
Adds configuration option for Swift object store container name to OpenStack Heat provider.
```
2017-07-02 08:02:42 -07:00
Kubernetes Submit Queue 950a09d982 Merge pull request #48304 from mengqiy/kubectl_slice
Automatic merge from submit-queue

split util/slice for kubectl

Split util/slice to remove the dependency of kubectl on `k8s.io/kubernetes/pkg/util/slice`.

```release-note
NONE
```
/assign @apelisse @monopole 

cc: @pwittrock 

ref #48209
2017-07-01 21:18:56 -07:00
Nikhita Raghunath 36271f985d
Add Cleanup section to apiextensions client-go 2017-07-02 03:53:35 +05:30
ymqytw 8dac9639e4 split util/slice 2017-06-30 23:04:18 -07:00
Kubernetes Submit Queue 5eccc7ae80 Merge pull request #48056 from luxas/kubeadm_remove_old_label
Automatic merge from submit-queue

Remove old node role label that is not used by kubeadm

**What this PR does / why we need it**:
This label hasn't been used by kubeadm since v1.5.
v1.5 support was dropped when v1.6 arrived due to a potential security flaw and the earlier alpha status.
So this label hasn't been used for around three months.
It makes sense to remove it in time for v1.8, could already have been done for v1.7

**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
```
@kubernetes/sig-cluster-lifecycle-pr-reviews
2017-06-30 22:06:23 -07:00
Kubernetes Submit Queue f663c4c83e Merge pull request #47489 from Mashimiao/cm-remove-unneeded
Automatic merge from submit-queue (batch tested with PRs 48264, 48324, 48125, 47944, 47489)

remove unneeded variable

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>



**What this PR does / why we need it**:
small fix, remove unneeded variable

**Release note**:

```release-note
NONE
```
2017-06-30 20:58:35 -07:00
Kubernetes Submit Queue ed8993e3df Merge pull request #47944 from allencloud/fix-CopyStrings-and-ShuffleStrings-when-slice-is-nil
Automatic merge from submit-queue (batch tested with PRs 48264, 48324, 48125, 47944, 47489)

fix CopyStrings and ShuffleStrings for slice when slice is nil

Signed-off-by: allencloud <allen.sun@daocloud.io>



**What this PR does / why we need it**:
This PR fixes two functions in util/slice.go, in which I think `CopyStrings` and `ShuffleStrings` miss one case. The case is input data is nil, in this case I think the data returned should be nil as well rather than a non-nil slice with 0 element.
In addition, I added some test code for this.
 
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
NONE, I did not raise a issue for this code. I ran into this when code learning.

**Special notes for your reviewer**:
NONE

**Release note**:

```release-note
NONE
```
2017-06-30 20:58:33 -07:00
Kubernetes Submit Queue faf4e57f1b Merge pull request #48125 from xiangpengzhao/downwardapi-poduid
Automatic merge from submit-queue (batch tested with PRs 48264, 48324, 48125, 47944, 47489)

Add Pod UID (metadata.uid) to downward API env var

**What this PR does / why we need it**:
Exposing Pod UID by downward API.

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

**Special notes for your reviewer**:
Generated files aren't committed. I'd like CI to tell me what scripts should I run to generate these files.

/cc @smarterclayton @vishh @dubstack

**Release note**:

```release-note
NONE
```
2017-06-30 20:58:31 -07:00
Kubernetes Submit Queue 9cde4bd6fd Merge pull request #48324 from jamie-liu/master
Automatic merge from submit-queue (batch tested with PRs 48264, 48324, 48125, 47944, 47489)

Remove duplicated line from ceph-secret-admin.yaml

**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-06-30 20:58:28 -07:00
Kubernetes Submit Queue 4fe05d8191 Merge pull request #48264 from johscheuer/set-quota-for-volumes
Automatic merge from submit-queue (batch tested with PRs 48264, 48324, 48125, 47944, 47489)

Set quota for volumes

**What this PR does / why we need it**:
This PR allows users of the Quobyte Storage class to specify if automatically a Quota for the volume should be created. With a Quota a Quobyte volume can only grow in the specified size.

**Special notes for your reviewer**:
Update the Quobyte API version for the needed functionality.
2017-06-30 20:58:24 -07:00
Kubernetes Submit Queue 754ed20839 Merge pull request #48115 from shikhi7/master
Automatic merge from submit-queue (batch tested with PRs 48317, 48313, 48351, 48357, 48115)

Formatted Dockerfile to be cleaner and precise

**What this PR does / why we need it**:
This PR includes good practices which should be followed while writing Dockerfiles as it involves cleaner and clearer syntax.

**Special notes for your reviewer**:
Includes good practices of writing Dockerfile. Maybe we may allow these types of changes to all old Dockerfiles.
2017-06-30 19:54:31 -07:00
Kubernetes Submit Queue 3634262954 Merge pull request #48357 from faraazkhan/master
Automatic merge from submit-queue (batch tested with PRs 48317, 48313, 48351, 48357, 48115)

allow heapster clusterrole to see deployments

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

Currently the default `system:heapster` ClusterRole does not allow access to the `deployment.extensions`. This limits metric collection and results in `DENY` messages in the kube-api logs like these:

```
[kube-apiserver-ip-10-0-10-12.us-west-2.compute.internal] I0630 19:22:16.088301       1 rbac.go:87] RBAC DENY: user "system:serviceaccount:kube-system:heapster" groups [system:serviceaccounts system:serviceaccounts:kube-system system:authenticated] cannot "get" resource "deployments.extensions" named "heapster-v1.4.0" in namespace "kube-system"
```

**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/heapster/issues/1710

**Special notes for your reviewer**: NONE

**Release note**:

```release-note
Allow the system:heapster ClusterRole read access to deployments
```
2017-06-30 19:54:29 -07:00
Kubernetes Submit Queue dc597291c1 Merge pull request #48351 from juju-solutions/bug/get-pass
Automatic merge from submit-queue (batch tested with PRs 48317, 48313, 48351, 48357, 48115)

Ensure get_password is accessing a file that exists.

**What this PR does / why we need it**: get_password will throw an exception instead of returning None in case the basic_auth.csv file is missing but /root/cdk/ is there in a juju deployment.

**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/juju-solutions/bundle-canonical-kubernetes/issues/324

**Special notes for your reviewer**:

**Release note**:

```
Fix race condition where /root/cdk is not yet initialised in kubernetes-master setup by Juju  
```
2017-06-30 19:54:27 -07:00
Kubernetes Submit Queue 21038e362c Merge pull request #48313 from timstclair/lint
Automatic merge from submit-queue (batch tested with PRs 48317, 48313, 48351, 48357, 48115)

Cleanup lint errors in the pkg/kubelet/server/... directory

Cleanup some issues that were found while experimenting with https://github.com/alecthomas/gometalinter on the `pkg/kubelet/server/...` directories.
2017-06-30 19:54:26 -07:00
Kubernetes Submit Queue fbba67098b Merge pull request #48317 from CaoShuFeng/impersonation_group
Automatic merge from submit-queue

remove useless check from impersonation filter

When groupsSpecified is false, that means no other groups are added
rather than the service account groups. So this check doesn't make
any sense.

**Release note**:

```
NONE
```
2017-06-30 19:47:38 -07:00