Commit Graph

4939 Commits (d7b3c62c563beae64cc9d9bf60fea73b1784b877)

Author SHA1 Message Date
Kubernetes Submit Queue b2765427a2 Merge pull request #41897 from luxas/kubeadm_secure_controlplane
Automatic merge from submit-queue (batch tested with PRs 41701, 41818, 41897, 41119, 41562)

kubeadm: Secure the control plane communication and add the kubeconfig phase command

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

This generates kubeconfig files for the controller-manager and the scheduler, ref: https://github.com/kubernetes/kubeadm/issues/172

The second commit adds the `kubeadm alpha phase kubeconfig` command as described in the design doc: https://github.com/kubernetes/kubeadm/pull/156

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

@dmmcquay What kind of tests would you like for the kubeconfig phase command?

**Release note**:

```release-note
```
@jbeda @mikedanese @dmmcquay @pires @liggitt @deads2k @errordeveloper
2017-02-26 14:02:52 -08:00
Kubernetes Submit Queue 0bc16d8966 Merge pull request #40576 from nikhiljindal/kubectlcascDel
Automatic merge from submit-queue (batch tested with PRs 41994, 41969, 41997, 40952, 40576)

Updating kubectl to send delete requests with orphanDependents=false if --cascade is true

Ref https://github.com/kubernetes/kubernetes/issues/40568 #38897

Updating kubectl to always set `DeleteOptions.orphanDependents=false` when deleting a resource with `--cascade=true`.
This is primarily for federation where we want to use server side cascading deletion.

Impact on kubernetes: kubectl will do another GET after sending a DELETE and wait till the resource is actually deleted. This can have an impact if the resource has a finalizer. kubectl will wait till the finalizer is removed and then the resource is deleted, which is the right thing to do but a notable change in behavior.

cc @caesarxuchao @lavalamp @smarterclayton @kubernetes/sig-federation-pr-reviews @kubernetes/sig-cli-pr-reviews
2017-02-26 12:58:01 -08:00
Kubernetes Submit Queue de4217164b Merge pull request #41994 from spiffxp/no-ls-etcd
Automatic merge from submit-queue

allow `hack/lib/etcd.sh` to print version mismatch error message

**What this PR does / why we need it**:  `third_party/etcd` isn't guaranteed to be present, this was causing the `hack/lib/etcd.sh` script to fail on `ls` prior to printing out the error message about
etcd version mismatch

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

**Release note**:
```release-note
NONE
```
2017-02-26 12:56:36 -08:00
Kubernetes Submit Queue a1490926d6 Merge pull request #41077 from deads2k/cli-01-cani
Automatic merge from submit-queue (batch tested with PRs 41814, 41922, 41957, 41406, 41077)

add kubectl can-i to see if you can perform an action

Adds `kubectl auth can-i <verb> <resource> [<name>]` so that a user can see if they are allowed to perform an action.

@kubernetes/sig-cli-pr-reviews @fabianofranz 

This particular command satisfies the immediate need of knowing if you can perform an action without trying that action.  When using RBAC in a script that is adding permissions, there is a lag between adding the permission and the permission being realized in the RBAC cache.  As a user on the CLI, you almost never see it, but as a script adding a binding and then using that new power, you hit it quite often.

There are natural follow-ons to the same area (hence the `auth` subcommand) to figure out if someone else can perform an action, what actions you can perform in total, and who can perform a given action.  Someone else is an API we have already, what-can-i-do was a proposed API a while back and a very useful one for interfaces, and who-can is common question if someone is administering a namespace.
2017-02-26 10:22:54 -08:00
Kubernetes Submit Queue 77ba346f55 Merge pull request #41815 from kevin-wangzefeng/enable-defaulttolerationseconds-admission-controller
Automatic merge from submit-queue (batch tested with PRs 40932, 41896, 41815, 41309, 41628)

enable DefaultTolerationSeconds admission controller by default

**What this PR does / why we need it**:
Continuation of PR #41414, enable DefaultTolerationSeconds admission controller by default.


**Which issue this PR fixes**: 
fixes: #41860
related Issue: #1574, #25320
related PRs: #34825, #41133, #41414 

**Special notes for your reviewer**:

**Release note**:

```release-note
enable DefaultTolerationSeconds admission controller by default
```
2017-02-26 08:09:58 -08:00
Kubernetes Submit Queue 5c3791b9e0 Merge pull request #41729 from smarterclayton/refactor_printers
Automatic merge from submit-queue (batch tested with PRs 41621, 41946, 41941, 41250, 41729)

Refactor printers and describers into their own package.

This sets the stage for using printer code from the server side (decoupled from kubectl) and loosens the coupling between kubectl and the printers. `pkg/printers` contains interfaces and has an import restriction against pulling in API specific code, while `pkg/printers/internalversion` can be used for internal types.

Add a method on `Factory` for retrieving PrinterForCommand which uses the Scheme and RESTMapper from the Factory, not the hardcoded ones.  This further separates kubectl from the core API scheme and allows better composition.

Change NamePrinter to use RESTMapper (previously it was hardcoding those conversions). This means that we now return plural resource names (`pods/foo`) but is correct once aliases and shortnames start being returned by the mapper.

This is a prerequisite for server side get, but is pure refactor (contains no new features).

@deads2k @liggitt
2017-02-26 06:47:03 -08:00
Kubernetes Submit Queue f2c2791e87 Merge pull request #41852 from mml/etcd-upgrade-test
Automatic merge from submit-queue (batch tested with PRs 42106, 42094, 42069, 42098, 41852)

Write etcd_upgrade test.

Part of the fix for #40636
2017-02-26 04:34:02 -08:00
Jordan Liggitt 41c88e0455
Revert "Merge pull request #40088 from jsafrane/storage-ga-v1"
This reverts commit 5984607cb9, reversing
changes made to 067f92e789.
2017-02-25 22:35:15 -05:00
Kubernetes Submit Queue 197bd532a2 Merge pull request #41700 from vishh/kube-proxy-oom-score
Automatic merge from submit-queue

Protect kubeproxy deployed via kube-up from system OOMs

This change is necessary until it can be moved to Guaranteed QoS Class.

For #40573
2017-02-25 07:07:01 -08:00
Kubernetes Submit Queue 5984607cb9 Merge pull request #40088 from jsafrane/storage-ga-v1
Automatic merge from submit-queue (batch tested with PRs 41854, 41801, 40088, 41590, 41911)

Add storage.k8s.io/v1 API

v1 API is direct copy of v1beta1 API. This v1 API gets installed and exposed in this PR, I tested that kubectl can create both v1beta1 and v1 StorageClass.

~~Rest of Kubernetes (controllers, examples,. tests, ...) still use v1beta1 API, I will update it when this PR gets merged as these changes would get lost among generated code.~~ Most parts use v1 API now, it would not compile / run tests without it.

**Release note**:
```
Kubernetes API storage.k8s.io for storage objects is now fully supported and is available as storage.k8s.io/v1. Beta version of the API storage.k8s.io/v1beta1 is still available in this release, however it will be removed in a future Kubernetes release.

Together with the API endpoint, StorageClass annotation "storageclass.beta.kubernetes.io/is-default-class" is deprecated and  "storageclass.kubernetes.io/is-default-class" should be used instead to mark a default storage class. The beta annotation is still working in this release, however it won't be supported in the next one.
```

@kubernetes/sig-storage-misc
2017-02-25 05:02:55 -08:00
Kubernetes Submit Queue e40b55f8b4 Merge pull request #41843 from yujuhong/do-not-run-kubelet
Automatic merge from submit-queue (batch tested with PRs 40665, 41094, 41351, 41721, 41843)

Do not run kubelet in test-cmd.sh

The tests are intended to test only `kubectl` commands and do not
require kubelet.

This fixes #41834

/cc @Random-Liu @dchen1107 @nikhiljindal
2017-02-25 03:56:59 -08:00
Kubernetes Submit Queue 04c75b68d5 Merge pull request #41721 from luxas/kubeadm_node_cacert_arg
Automatic merge from submit-queue (batch tested with PRs 40665, 41094, 41351, 41721, 41843)

kubeadm: Add a --ca-cert-path flag to kubeadm join

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

This PR makes it possible to customize where the CA file is written

**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
```
@pires @mikedanese @dmmcquay @jbeda @errordeveloper
2017-02-25 03:56:57 -08:00
Kubernetes Submit Queue 258a5cb3f1 Merge pull request #40665 from brendandburns/i18n
Automatic merge from submit-queue (batch tested with PRs 40665, 41094, 41351, 41721, 41843)

Update i18n tools and process.

@fabianofranz @zen @kubernetes/sig-cli-pr-reviews 

This is an update to the translation process based on feedback from folks.

The main changes are:
   * `msgctx` is being removed from the files.
   * String wrapping and string extraction have been separated.
   * More tools from the `gettext` family of tools are being used
   * Extracted strings are being sorted for canonical ordering
   * A `.pot` template has been added.
2017-02-25 03:56:51 -08:00
Madhusudan.C.S edef3af34f Split federation-{up,down} from e2e-{up,down}. 2017-02-24 14:27:31 -08:00
Matt Liggett 01dc76a657 update known-flags.txt 2017-02-24 10:40:04 -08:00
Jan Safranek c56074da7a Update golint 2017-02-24 13:52:16 +01:00
Jan Safranek 3f6caca97a Add storage.k8s.io/v1 2017-02-24 13:34:18 +01:00
Kubernetes Submit Queue 2bb97435eb Merge pull request #41133 from gmarek/nc-taints
Automatic merge from submit-queue

NodeController sets NodeTaints instead of deleting Pods

```release-note
Add an alpha feature that makes NodeController set Taints instead of deleting Pods from not Ready Nodes.
```

cc @timothysc @wojtek-t @davidopp 
@aveshagarwal - this PR just uses library functions from previous one.
 @kevin-wangzefeng - the only thing that's left is to write an admission controller. I don't remember what was the agreements. Are you going to write it, or should I?
2017-02-24 03:23:43 -08:00
Kubernetes Submit Queue 5ccc4f2175 Merge pull request #42043 from sttts/sttts-verify-staging-client-go-fail-dirty
Automatic merge from submit-queue

hack/verify-staging-client-go.sh: fail verbosely if working dir is dirty

Fail early and show verbose error message if repository is dirty.
2017-02-24 02:34:48 -08:00
Lucas Käldström bf382e45c6
kubeadm: Add a CACertPath property to NodeConfiguration that makes it possible to customize where the CA cert is written on join 2017-02-24 11:14:50 +02:00
Dr. Stefan Schimanski 27b77b48bb hack/verify-staging-client-go.sh: fail verbosely if working dir is dirty 2017-02-24 10:03:58 +01:00
gmarek d88af7806c NodeController sets NodeTaints instead of deleting Pods 2017-02-24 09:24:33 +01:00
Kubernetes Submit Queue e473cee7a1 Merge pull request #41820 from kad/kv
Automatic merge from submit-queue (batch tested with PRs 41667, 41820, 40910, 41645, 41361)

Changing --use-kubernetes-version to --kubernetes-version for kubeadm beta

**What this PR does / why we need it**: to follow-up agreement on SIG-Cluster-Lifecycle on 2017-02-21, flag for `kubeadm init` should be renamed.

**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**: Meeting minutes for SIG-Cluster-Lifecycle 2017-02-21

**Release note**:
```release-note
Flag --use-kubernetes-version for kubeadm init renamed to --kubernetes-version
```
2017-02-23 20:57:28 -08:00
Kubernetes Submit Queue c8a87d3a62 Merge pull request #41986 from sttts/sttts-verify-staging-client-go-dirty-tree
Automatic merge from submit-queue

hack/verify-staging-client-go.sh: use git-archive to survive dirty working tree

We used rsync before and copied over the checkout. If some other script, created or changed files, godep refused to run.

Now the script uses git-archive against HEAD instead.
2017-02-23 12:06:21 -08:00
Kubernetes Submit Queue b799bbf0a8 Merge pull request #38816 from deads2k/rbac-23-switch-kubedns-sa
Automatic merge from submit-queue

move kube-dns to a separate service account

Switches the kubedns addon to run as a separate service account so that we can subdivide RBAC permission for it.  The RBAC permissions will need a little more refinement which I'm expecting to find in https://github.com/kubernetes/kubernetes/pull/38626 .

@cjcullen @kubernetes/sig-auth since this is directly related to enabling RBAC with subdivided permissions
 @thockin @kubernetes/sig-network since this directly affects now kubedns is added.  


```release-note
`kube-dns` now runs using a separate `system:serviceaccount:kube-system:kube-dns` service account which is automatically bound to the correct RBAC permissions.
```
2017-02-23 12:06:13 -08:00
nikhiljindal b6e2a09c2b Add cascading deletion test cases to kubectl tests 2017-02-23 12:04:13 -08:00
Lucas Käldström 69c24afc20
kubeadm: Add a 'kubeadm alpha phase kubeconfig command' 2017-02-23 21:28:18 +02:00
Aaron Crickenberger 57170100a0 avoid ls'ing third_party/etcd
third_party/etcd isn't guaranteed to be present, this was causing
the script to fail prior to printing out the error message about
version mismatch

fixes #41989
2017-02-23 11:11:31 -08:00
Alexander Kanevskiy 1bd8bf6c5b Changing --use-kubernetes-version to --kubernetes-version as it was
agreed on SIG-Cluster-Lifecycle meeting.
2017-02-23 20:56:37 +02:00
Brendan Burns be26836f64 Update extraction script, sort messages, add .pot file. 2017-02-23 18:53:00 +00:00
Dr. Stefan Schimanski e8a67bcd4f hack/verify-staging-client-go.sh: use git-archive to survive dirty checkouts 2017-02-23 18:33:11 +01:00
deads2k 5b4a611fd7 add kubectl can-i to see if you can perform an action 2017-02-23 09:12:35 -05:00
Wojciech Tyczynski b70e392161 Update clusters to use 3.0.17 etcd 2017-02-23 10:08:50 +01:00
Wojciech Tyczynski a7d2136ce1 Update etcd to 3.0.17 in integration tests 2017-02-23 10:08:50 +01:00
Kubernetes Submit Queue 787b1a2388 Merge pull request #41281 from ericchiang/bootstrap-token-authenticator
Automatic merge from submit-queue (batch tested with PRs 41812, 41665, 40007, 41281, 41771)

kube-apiserver: add a bootstrap token authenticator for TLS bootstrapping

Follows up on https://github.com/kubernetes/kubernetes/pull/36101

Still needs:

* More tests.
* To be hooked up to the API server.
  - Do I have to do that in a separate PR after k8s.io/apiserver is synced?
* Docs (kubernetes.io PR).
* Figure out caching strategy.
* Release notes.

cc @kubernetes/sig-auth-api-reviews @liggitt @luxas @jbeda

```release-notes
Added a new secret type "bootstrap.kubernetes.io/token" for dynamically creating TLS bootstrapping bearer tokens.
```
2017-02-23 00:11:40 -08:00
Wojciech Tyczynski 59cec9c1a6 Merge pull request #41886 from wojtek-t/allow_for_disabling_log_dump
Add ability to disable dumping logs
2017-02-23 08:08:25 +01:00
Clayton Coleman 651188d687
generated: bazel 2017-02-23 00:28:32 -05:00
Kubernetes Submit Queue c99ae4b436 Merge pull request #41538 from xingzhou/clusterrole
Automatic merge from submit-queue (batch tested with PRs 41146, 41486, 41482, 41538, 41784)

Added `kubectl create clusterrole` command.

Added `kubectl create clusterrole` command.

Fixed part of #39596 

**Special notes for your reviewer**:
@deads2k, please help to review this patch, thanks

**Release note**:
```
   Added one new command `kubectl create clusterrole` to help user create a single ClusterRole from command line.
```
2017-02-22 21:09:36 -08:00
Kubernetes Submit Queue e43e663a53 Merge pull request #41650 from deads2k/api-02-godep
Automatic merge from submit-queue

add godep manifest files to staging repos

The staging repos should have manifests that match the godeps of kube so we know what they build against.  We don't need the actual vendored code, since a sync script on the other side needs to find the correct level of other staging directories and thus requires its own `godep restore && go get && godep save` cycle.

@sttts ptal
@lavalamp @caesarxuchao client-go needs a lot of unwinding to do something similar, but the idea is that you can run an acyclic path to get this updated by copying the types and dependencies with `go list`, then generate the clients, then generate this manifest.  Then in your sync script you can pull the proper levels and finish the actual vendoring.
2017-02-22 08:56:27 -08:00
Kubernetes Submit Queue b29bdee735 Merge pull request #41256 from mbruzek/mbruzek-juju-lint-fixes
Automatic merge from submit-queue (batch tested with PRs 41349, 41532, 41256, 41587, 41657)

Lint fixes for the master and worker Python code.

**What this PR does / why we need it**: lint fixes for the python code.

**Which issue this PR fixes** none

**Special notes for your reviewer**: This is lint fixes for the Juju python code.

**Release note**:

```release-note
NONE
```

Please consider these changes so we can pass flake8 lint tests in our build process.
2017-02-22 08:12:43 -08:00
Wojciech Tyczynski 0d8a492fbf Add ability to disable dumping logs 2017-02-22 15:26:29 +01:00
Xing Zhou 433941f1fd Added `kubectl create clusterrole` command.
Added `kubectl create clusterrole` command.
2017-02-22 10:30:41 +08:00
Yu-Ju Hong 84d46cc477 Do not run kubelet in test-cmd.sh
The tests are intended to test only `kubectl` commands and do not
require kubelet.
2017-02-21 14:53:44 -08:00
Derek Carr 43ae6f49ad Enable per pod cgroups, fix defaulting of cgroup-root when not specified 2017-02-21 16:34:22 -05:00
Kevin cd427fa4be enable DefaultTolerationSeconds admission controller by default 2017-02-22 00:45:56 +08:00
Eric Chiang a0df658b20 kube-apiserver: add a bootstrap token authenticator for TLS bootstrapping 2017-02-21 08:43:55 -08:00
deads2k 7153c91617 pin godep version 2017-02-21 09:38:56 -05:00
deads2k a53611ab3e add godep.json to staging repos 2017-02-21 09:38:55 -05:00
Fabiano Franz c5830295f3 Adds owners for hack/verify-flags 2017-02-21 11:34:05 -03:00
deads2k 22e10bbc29 remove cycle that snuck into tests 2017-02-21 08:03:48 -05:00