Commit Graph

19431 Commits (d33f6b8a1705de39711b507d44f4fbc0752e1491)

Author SHA1 Message Date
Kubernetes Submit Queue d33f6b8a17 Merge pull request #41837 from liggitt/storageclass-param-validation
Automatic merge from submit-queue

Reserve kubernetes.io and k8s.io namespace for flex volume options

Split from https://github.com/kubernetes/kubernetes/pull/39488.

Flex volume already stuffs system information into the options map, and assumes it is free to do so:
```
	optionFSType    = "kubernetes.io/fsType"
	optionReadWrite = "kubernetes.io/readwrite"
	optionKeySecret = "kubernetes.io/secret"
```

this formalizes that by reserving the `kubernetes.io` and `k8s.io` namespaces so that user-specified options are never stomped by the system, and flex plugins can know that options with those namespaces came from the system, not user-options.

```release-note
Parameter keys in a StorageClass `parameters` map may not use the `kubernetes.io` or `k8s.io` namespaces.
```
2017-02-28 02:41:03 -08:00
Kubernetes Submit Queue 8ceb0c4025 Merge pull request #41151 from ahakanbaba/tpr-unit-tests
Automatic merge from submit-queue (batch tested with PRs 41937, 41151, 42092, 40269, 42135)

Add a unit test for idempotent applys to the TPR entries.

The test in apply_test follows the general pattern of other tests.
We load from a file in test/fixtures and mock the API server in the
function closure in the HttpClient call.
The apply operation expects a last-modified-configuration annotation.
That is written verbatim in the test/fixture file.

References #40841



**What this PR does / why we need it**:
Adds one unit test for TPR's using applies. 

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
References: 
https://github.com/kubernetes/features/issues/95
https://github.com/kubernetes/kubernetes/issues/40841#issue-204769102


**Special notes for your reviewer**:

I am not super proud of the tpr-entry name. 
But I feel like we need to call the two objects differently. 
The one which has Kind:ThirdPartyResource 
and the one has Kind:Foo. 

Is the name "ThirdPartyResource" used interchangeably for both ? I used tpr-entry for the Kind:Foo object.

Also I !assume! this is testing an idempotent apply because the last-applied-configuration annotation is the same as the object itself. 

This is the state I see in the logs of kubectl if I do a proper idempotent apply of a third party resource entry. 

I guess I will know more once I start playing around with apply command that change TPR objects. 

**Release note**:

```release-note
```
2017-02-28 01:24:06 -08:00
Kubernetes Submit Queue 9690771227 Merge pull request #41788 from sttts/sttts-scheme-registration-idem-potent
Automatic merge from submit-queue (batch tested with PRs 41234, 42186, 41615, 42028, 41788)

apimachinery: handle duplicated and conflicting type registration

Double registrations were leading to duplications in  `KnownKinds()`. Conflicting registrations with same gvk, but different types were not detected.
2017-02-28 00:34:11 -08:00
Kubernetes Submit Queue 2b2c04e685 Merge pull request #42028 from janetkuo/ds-critical-pods
Automatic merge from submit-queue (batch tested with PRs 41234, 42186, 41615, 42028, 41788)

Make DaemonSet respect critical pods annotation when scheduling

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Make DaemonSet respect critical pods annotation when scheduling. 
```

cc @kubernetes/sig-apps-feature-requests @erictune @vishh @liggitt @kargakis @lukaszo @piosz @davidopp
2017-02-28 00:34:08 -08:00
Kubernetes Submit Queue c743897f1f Merge pull request #42186 from liggitt/wait-for-etcd
Automatic merge from submit-queue (batch tested with PRs 41234, 42186, 41615, 42028, 41788)

Restore wait for etcd in rbac initialization

Wait for etcd was accidentally removed in 26b42d350d (diff-efb2aa0040291a41fcf922efc886ea13L136)

Related to https://github.com/kubernetes/kubernetes/issues/37704 and https://github.com/kubernetes/kubernetes/pull/39821
2017-02-28 00:34:03 -08:00
Kubernetes Submit Queue fbe2d15f8c Merge pull request #41234 from vishh/nodeaphase2
Automatic merge from submit-queue

Enforce Node Allocatable via cgroups

This PR enforces node allocatable across all pods using a top level cgroup as described in https://github.com/kubernetes/community/pull/348

This PR also provides an option to enforce `kubeReserved` and `systemReserved` on user specified cgroups. 

This PR will by default make kubelet create top level cgroups even if `kubeReserved` and `systemReserved` is not specified and hence `Allocatable = Capacity`.

```release-note
New Kubelet flag `--enforce-node-allocatable` with a default value of `pods` is added which will make kubelet create a top level cgroup for all pods to enforce Node Allocatable. Optionally, `system-reserved` & `kube-reserved` values can also be specified separated by comma to enforce node allocatable on cgroups specified via `--system-reserved-cgroup` & `--kube-reserved-cgroup` respectively. Note the default value of the latter flags are "".
This feature requires a **Node Drain** prior to upgrade failing which pods will be restarted if possible or terminated if they have a `RestartNever` policy.
```

cc @kubernetes/sig-node-pr-reviews @kubernetes/sig-node-feature-requests 

TODO:

- [x] Adjust effective Node Allocatable to subtract hard eviction thresholds
- [x] Add unit tests
- [x] Complete pending e2e tests
- [x] Manual testing
- [x] Get the proposal merged

@dashpole is working on adding support for evictions for enforcing Node allocatable more gracefully. That work will show up in a subsequent PR for v1.6
2017-02-27 23:55:46 -08:00
Kubernetes Submit Queue 2681e38d3a Merge pull request #42097 from kargakis/address-mismatched-available-replicas
Automatic merge from submit-queue

Enqueue controllers after minreadyseconds when all pods are ready

@janetkuo this should address https://github.com/kubernetes/kubernetes/issues/41697#issuecomment-281851377. Impossible to unit test this but it should stabilize some of our deployment e2e tests that occasionally fail because of availableReplicas not being updated.

It should also fix https://github.com/kubernetes/kubernetes/issues/41641

Eventually I would like AddAfter to be able to cancel previous invocations of the same key so I opened https://github.com/kubernetes/client-go/issues/131

@kubernetes/sig-apps-bugs
2017-02-27 22:09:46 -08:00
Vishnu kannan 9b4a8f7464 fix eviction helper function description
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-02-27 21:24:45 -08:00
Derek Carr a7684569fb Fix get all pods from cgroups logic 2017-02-27 21:24:45 -08:00
Vishnu kannan 9a65640789 fix go vet issues
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-02-27 21:24:45 -08:00
Vishnu Kannan cc5f5474d5 add support for node allocatable phase 2 to kubelet
Signed-off-by: Vishnu Kannan <vishnuk@google.com>
2017-02-27 21:24:44 -08:00
Vishnu Kannan 70e340b045 adding kubelet flags for node allocatable phase 2
Signed-off-by: Vishnu Kannan <vishnuk@google.com>
2017-02-27 21:24:44 -08:00
Kubernetes Submit Queue 9f9f570984 Merge pull request #41588 from freehan/cri-traffic-shaping
Automatic merge from submit-queue (batch tested with PRs 41205, 42196, 42068, 41588, 41271)

[CRI] enable kubenet traffic shaping

ref: https://github.com/kubernetes/kubernetes/issues/37316

Another way to do this is to expose another interface in network host to allow network plugins to retrieve annotation. But that seems unnecessary and more complicated.
2017-02-27 21:09:52 -08:00
mbohlool 5d989ccd09 Update generated files for openapi-gen 2017-02-27 14:10:35 -08:00
Dr. Stefan Schimanski 395be3b401 apimachinery: handle duplicated and conflicting type registration 2017-02-27 21:58:21 +01:00
Kubernetes Submit Queue 6d9e2afeda Merge pull request #40927 from soltysh/deployment_logs
Automatic merge from submit-queue (batch tested with PRs 42053, 41282, 42056, 41663, 40927)

Allow getting logs directly from deployment, job and statefulset

**Special notes for your reviewer**:
@smarterclayton you asked for it in OpenShift


```release-note
kubectl logs allows getting logs directly from deployment, job and statefulset
```
2017-02-27 12:45:36 -08:00
Kubernetes Submit Queue 0abcd5d51b Merge pull request #41663 from luxas/kubeadm_new_token_cmd
Automatic merge from submit-queue (batch tested with PRs 42053, 41282, 42056, 41663, 40927)

Update kubeadm token to work as expected

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

Follows up: https://github.com/kubernetes/kubernetes/pull/41509

Updates `kubeadm token` to work as discussed in https://docs.google.com/document/d/1deJYPIF4LmhGjDVaqrswErIrV7mtwJgovtLnPCDxP7U/edit#
Promotes the command from the `ex` subcommand which now is named `alpha` for clarity. (This will later become `kubeadm alpha phase`)

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

Example UX:
```console
sudo ./kubeadm token --help
This command will manage Bootstrap Token for you.
  Please note this usage of this command is optional, and mostly for advanced users.

In short, Bootstrap Tokens are used for establishing bidirectional trust between a client and a server.
A Bootstrap Token can be used when a client (for example a node that's about to join the cluster) needs
to trust the server it is talking to. Then a Bootstrap Token with the "signing" usage can be used.
Bootstrap Tokens can also function as a way to allow short-lived authentication to the API Server
(the token serves as a way for the API Server to trust the client), for example for doing the TLS Bootstrap.

What is a Bootstrap Token more exactly?
 - It is a Secret in the kube-system namespace of type "bootstrap.kubernetes.io/token".
 - A Bootstrap Token must be of the form "[a-z0-9]{6}.[a-z0-9]{16}"; the former part is the public Token ID,
   and the latter is the Token Secret, which must be kept private at all circumstances.
 - The name of the Secret must be named "bootstrap-token-(token-id)".

You can read more about Bootstrap Tokens in this proposal:

  https://github.com/kubernetes/community/blob/master/contributors/design-proposals/bootstrap-discovery.md

Usage:
  kubeadm token [flags]
  kubeadm token [command]

Available Commands:
  create      Create bootstrap tokens on the server.
  delete      Delete bootstrap tokens on the server.
  generate    Generate and print a bootstrap token, but do not create it on the server.
  list        List bootstrap tokens on the server.

Flags:
      --kubeconfig string   The KubeConfig file to use for talking to the cluster (default "/etc/kubernetes/admin.conf")

Use "kubeadm token [command] --help" for more information about a command.
lucas@THENINJA:~/luxas/kubernetes$ sudo ./kubeadm token list
TOKEN                     TTL         EXPIRES   USAGES                   DESCRIPTION
70c388.41a07b703aa4bedf   <forever>   <never>   authentication,signing   The default bootstrap token generated by 'kubeadm init'.
lucas@THENINJA:~/luxas/kubernetes$ sudo ./kubeadm token create
c57e6a.abb75fa1debe555f
lucas@THENINJA:~/luxas/kubernetes$ sudo ./kubeadm token list
TOKEN                     TTL         EXPIRES   USAGES                   DESCRIPTION
70c388.41a07b703aa4bedf   <forever>   <never>   authentication,signing   The default bootstrap token generated by 'kubeadm init'.
c57e6a.abb75fa1debe555f   <forever>   <never>   authentication,signing   <none>
lucas@THENINJA:~/luxas/kubernetes$ sudo ./kubeadm token create s
token ["s"] was not of form ["^([a-z0-9]{6})\\.([a-z0-9]{16})$"]
lucas@THENINJA:~/luxas/kubernetes$ sudo ./kubeadm token create c57e6a.abb75fa1debe555f
a token with id "c57e6a" already exists
lucas@THENINJA:~/luxas/kubernetes$ sudo ./kubeadm token delete c57e6a.abb75fa1debe555f
bootstrap token with id "c57e6a" deleted
```

**Release note**:

```release-note
NONE
```
@dmmcquay @jbeda @mikedanese @errordeveloper @pires
2017-02-27 12:45:34 -08:00
Kubernetes Submit Queue c274e9d715 Merge pull request #42056 from ncdc/shared-informers-16-remove-legacy-code
Automatic merge from submit-queue (batch tested with PRs 42053, 41282, 42056, 41663, 40927)

Fully remove hand-written listers and informers

Note: the first commit is from #41927. Adding do-not-merge for now as we'll want that to go in first, and then I'll rebase this on top.

Update statefulset controller to use a lister for PVCs instead of a client request. Also replace a unit test's dependency on legacylisters with the generated ones. cc @kargakis @kow3ns @foxish @kubernetes/sig-apps-pr-reviews 

Remove all references to pkg/controller/informers and pkg/client/legacylisters, and remove those packages.

@smarterclayton @deads2k this should be it!

cc @gmarek @wojtek-t @derekwaynecarr @kubernetes/sig-scalability-pr-reviews
2017-02-27 12:45:31 -08:00
Kubernetes Submit Queue b796732ae7 Merge pull request #41282 from krmayankk/garbage
Automatic merge from submit-queue (batch tested with PRs 42053, 41282, 42056, 41663, 40927)

Enable Garbage collection by default for RS and RC

Fixes https://github.com/kubernetes/kubernetes/issues/40898
2017-02-27 12:45:29 -08:00
Jordan Liggitt 4127322f23
Restore wait for etcd in rbac initialization 2017-02-27 15:09:47 -05:00
Michail Kargakis 9eab226947 Enqueue controllers after minreadyseconds when all pods are ready 2017-02-27 19:28:15 +01:00
Hakan Baba 1cc30bdfb2 Add a unit test for applies and idempotent applys to the TPR entries.
The tests in apply_test follows the general pattern of other tests.
We load from a file in test/fixtures and mock the API server in the
function closure in the HttpClient call.
In PATCH request rount-tripper we check that the kubectl apply
implementation worked as expected.

References #40841
2017-02-27 10:22:12 -08:00
Minhan Xia f006c8bcd3 teach kubenet to use annotation instead of pod object for traffic shaper 2017-02-27 10:11:09 -08:00
Minhan Xia 947e0e1bf5 pass pod annotation to SetUpPod 2017-02-27 10:09:45 -08:00
Janet Kuo 4c882477e9 Make DaemonSet respect critical pods annotation when scheduling 2017-02-27 09:59:45 -08:00
Kubernetes Submit Queue 7f626cf836 Merge pull request #42132 from timchenxiaoyu/fixtypo
Automatic merge from submit-queue

fix typo:evaluator
2017-02-27 05:13:14 -08:00
Maciej Szulik 5472a5e0a5 Allow getting logs directly from deployment, job and statefulset 2017-02-27 13:13:09 +01:00
Maciej Szulik 27259358cb Switch ClientAccessFactory to use clientset.Interface rather than actual type 2017-02-27 13:13:06 +01:00
Kubernetes Submit Queue bf984aa328 Merge pull request #42120 from kevin-wangzefeng/kubectl-taint-respect-noexecute
Automatic merge from submit-queue (batch tested with PRs 41116, 41804, 42104, 42111, 42120)

make kubectl taint command respect effect NoExecute

**What this PR does / why we need it**:
Part of feature forgiveness implementation, make kubectl taint command respect effect NoExecute.

**Which issue this PR fixes**: 
Related Issue: #1574
Related PR: #39469

**Special notes for your reviewer**:

**Release note**:

```release-note
make kubectl taint command respect effect NoExecute
```
2017-02-27 04:10:30 -08:00
Kubernetes Submit Queue be724ba3c1 Merge pull request #42111 from feiskyer/sandbox
Automatic merge from submit-queue (batch tested with PRs 41116, 41804, 42104, 42111, 42120)

Remove SandboxReceived event

This PR removes SandboxReceived event in sync pod.

> This event seems somewhat meaningless, and clouds the event records for a pod. Do we actually need it? Pulling and pod received on the node are very relevant, this seems much less so. Would suggest we either remove it, or turn it into a message that clearly indicates why it has value.

Refer d65309399a (commitcomment-21052453).

cc @smarterclayton @yujuhong
2017-02-27 04:10:28 -08:00
Kubernetes Submit Queue d1f5331102 Merge pull request #41804 from chakri-nelluri/flex
Automatic merge from submit-queue (batch tested with PRs 41116, 41804, 42104, 42111, 42120)

Add support for attacher/detacher interface in Flex volume

Add support for attacher/detacher interface in Flex volume
This change breaks backward compatibility and requires to be release noted.

```release-note
Flex volume plugin is updated to support attach/detach interfaces. It broke backward compatibility. Please update your drivers and implement the new callouts. 
```
2017-02-27 04:10:25 -08:00
Kubernetes Submit Queue 73c9fd8cec Merge pull request #41116 from lukaszo/ds-updates
Automatic merge from submit-queue (batch tested with PRs 41116, 41804, 42104, 42111, 42120)

DaemonSet updates - take 2

It implements https://github.com/kubernetes/community/blob/master/contributors/design-proposals/daemonset-update.md
Feature kubernetes/features#124

```release-note
Implement the update feature for DaemonSet.
```

cc @kargakis @janetkuo @mikedanese
2017-02-27 04:10:23 -08:00
Andy Goldstein 171e458bab Update bazel 2017-02-27 06:48:13 -05:00
Andy Goldstein d798c65fb6 Remove legacy listers and informers 2017-02-27 06:48:13 -05:00
Andy Goldstein bd912f50ba statefulset: use pvc lister, replace legacylisters
Use a PVC lister instead of a client when retrieving PVCs.

Replace unit test's use of legacylisters with the generated listers.
2017-02-27 06:38:11 -05:00
Lucas Käldström 796c3f9773
kubeadm: Implement the kubeadm token command fully and move it out of the experimental subsection 2017-02-27 12:56:03 +02:00
Kubernetes Submit Queue 077e67eb77 Merge pull request #42076 from freehan/network-owner
Automatic merge from submit-queue (batch tested with PRs 42058, 41160, 42065, 42076, 39338)

add OWNER file to kubelet/network
2017-02-27 01:30:05 -08:00
Łukasz Oleś 7d9c817db0 Generated part for DaemonSet updates 2017-02-27 09:17:34 +01:00
Kubernetes Submit Queue bc650d7ec7 Merge pull request #42055 from derekwaynecarr/sandbox-cgroup-parent
Automatic merge from submit-queue (batch tested with PRs 41962, 42055, 42062, 42019, 42054)

dockershim puts pause container in pod cgroup

**What this PR does / why we need it**:
The CRI was not launching the pause container in the pod level cgroup.  The non-CRI code path was.
2017-02-27 00:16:55 -08:00
Łukasz Oleś b2d9f99f0c Moved tests and fixed typs 2017-02-27 09:15:56 +01:00
Łukasz Oleś 620310c12f Move TemplateGeneration to the Spec 2017-02-27 09:15:56 +01:00
Łukasz Oleś b59ecde587 Implement kubectl rollout status for daemon sets 2017-02-27 09:15:56 +01:00
Łukasz Oleś b27308c317 DaemonSet updates
It implements https://github.com/kubernetes/community/blob/master/contributors/design-proposals/daemonset-update.md
Feature https://github.com/kubernetes/features/issues/124
2017-02-27 09:15:56 +01:00
Kubernetes Submit Queue e6ecfd2e37 Merge pull request #41694 from shiywang/apply-set1
Automatic merge from submit-queue (batch tested with PRs 42044, 41694, 41927, 42050, 41987)

Add apply set-last-applied subcommand 

implement part of https://github.com/kubernetes/community/pull/287, will rebase after https://github.com/kubernetes/kubernetes/pull/41699 got merged, EDIT: since bug output format has been confirmed, will update the behavior of output format soon  
cc @kubernetes/sig-cli-pr-reviews @AdoHe @pwittrock 

```release-note
Support kubectl apply set-last-applied command to update the applied-applied-configuration annotation
```
2017-02-26 23:16:51 -08:00
Kubernetes Submit Queue 7224805c55 Merge pull request #41992 from colemickens/cmpr-azure-config-doc
Automatic merge from submit-queue (batch tested with PRs 35408, 41915, 41992, 41964, 41925)

azure: document config file (+ remove unused field)

**What this PR does / why we need it**:
* documents the config file used by the Azure cloudprovider
* removes an unused field that shouldn't have been added

```release-note
NONE
```
2017-02-26 18:07:57 -08:00
Kubernetes Submit Queue 082cfac707 Merge pull request #35408 from xilabao/add-secret-to-pflag
Automatic merge from submit-queue (batch tested with PRs 35408, 41915, 41992, 41964, 41925)

add secret option to flag

To resolve the issue of security(pr #35030 ),

> @smarterclayton commented 5 days ago
> This is unfortunately not all flags that could be secrets. The best option would be to add support in spf13/pflag to tag a flag as a secret, and then use that bit to determine the list.
> 
> Also, Command() could be used in contexts that need exact parameters (for subshell execution), so we would need to add a new method or extend the signature here to allow exact flags to be retrieved.

we could add a secret option to the flags.
2017-02-26 18:07:53 -08:00
timchenxiaoyu e3b25ed4af fix typo:evaluator 2017-02-27 09:28:40 +08:00
Kubernetes Submit Queue d7b3c62c56 Merge pull request #41479 from rootfs/iscsi-fix
Automatic merge from submit-queue

make iscsi portals optional

**What this PR does / why we need it**: Make iSCSI portals optional

**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-02-26 16:31:31 -08:00
Kubernetes Submit Queue 945b041fab Merge pull request #41165 from nikhiljindal/del202
Automatic merge from submit-queue (batch tested with PRs 41954, 40528, 41875, 41165, 41877)

Updating apiserver to return 202 when resource is being deleted asynchronously via cascading deletion

As per https://github.com/kubernetes/kubernetes/issues/33196#issuecomment-278440622.

cc @kubernetes/sig-api-machinery-pr-reviews @smarterclayton @caesarxuchao @bgrant0607 @kubernetes/api-reviewers 

```release-note
Updating apiserver to return http status code 202 for a delete request when the resource is not immediately deleted because of user requesting cascading deletion using DeleteOptions.OrphanDependents=false.
```
2017-02-26 14:54:54 -08:00
Kubernetes Submit Queue 1359ffc502 Merge pull request #41818 from aveshagarwal/master-taints-tolerations-api-fields-pod-spec-updates
Automatic merge from submit-queue (batch tested with PRs 41701, 41818, 41897, 41119, 41562)

Allow updates to pod tolerations.

Opening this PR to continue discussion for pod spec tolerations updates when a pod has been scheduled already. This PR is built on top of https://github.com/kubernetes/kubernetes/pull/38957.

@kubernetes/sig-scheduling-pr-reviews @liggitt @davidopp @derekwaynecarr @kubernetes/rh-cluster-infra
2017-02-26 14:02:51 -08:00