Commit Graph

64852 Commits (2af0bdb00f61619b0ae697efe0716196bb1a6bda)

Author SHA1 Message Date
Pengfei Ni f753c916cd Simplify vmset acquirement logic 2018-04-27 11:05:45 +08:00
Jordan Liggitt 2c1a689952
Collapse onto request scope convertor 2018-04-26 22:28:26 -04:00
Jordan Liggitt f6b08d6d76
Fix govet error 2018-04-26 22:16:27 -04:00
Kubernetes Submit Queue fd6b01f4bf
Merge pull request #62929 from hanxiaoshuai/fixtodo0421
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fixtodo:validate events on PVCs in integration volume binding test

**What this PR does / why we need it**:
fixtodo:validate events on PVCs in integration volume binding test
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-04-26 18:35:49 -07:00
Kubernetes Submit Queue 6abbab4b08
Merge pull request #62870 from pospispa/Bring-StorageObjectInUseProtection-feature-to-GA-2nd-attempt
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Bring StorageObjectInUseProtection feature to GA

**What this PR does / why we need it**:
It brings `StorageObjectInUseProtection` feature to GA.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes N/A

**Special notes for your reviewer**:
Related features: https://github.com/kubernetes/features/issues/498 and https://github.com/kubernetes/features/issues/499
Related PR: https://github.com/kubernetes/kubernetes/pull/61324

**Release note**:

```release-note
StorageObjectInUseProtection feature is GA.
```
2018-04-26 17:25:04 -07:00
Kubernetes Submit Queue 0cf3788419
Merge pull request #63174 from misterikkit/equivHash
Automatic merge from submit-queue (batch tested with PRs 62937, 63105, 63031, 63174). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Revert "Revert "Revert revert of equivalence class hash calculation i…

…n scheduler""

This reverts commit 4386751b5d.



**What this PR does / why we need it**:
This re-introduces the change from https://github.com/kubernetes/kubernetes/pull/58555 which changes how the scheduler computes equivalence classes of pods. I believe we have fixed the flakiness observed previously (https://github.com/kubernetes/kubernetes/issues/61512, https://github.com/kubernetes/kubernetes/issues/62921). I have run the test in question a few dozen times without a failure.

```bash
make test-integration WHAT="./test/integration/scheduler" KUBE_TEST_ARGS="-run TestPreemptionStarvation" GOFLAGS="-v"
```

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

**Special notes for your reviewer**:
I had to resolve several merge conflicts. I think I resolved them correctly, but keep an eye out for anything silly.

**Release note**:

```release-note
NONE
```
/sig scheduling
2018-04-26 16:40:19 -07:00
Kubernetes Submit Queue 8d1b6fa917
Merge pull request #63031 from jennybuckley/dedup-update-typer
Automatic merge from submit-queue (batch tested with PRs 62937, 63105, 63031, 63174). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove unnecessary typer from create/update handlers

**What this PR does / why we need it**:
Refactoring to remove unnecessarily duplicated definition of an ObjectTyper for some of the handlers.
The patch handler also has an extra ObjectConvertor, but it is defined differently in both places so removing one would possibly have side effects.

```release-note
NONE
```

/sig api-machinery
2018-04-26 16:40:15 -07:00
Kubernetes Submit Queue 6625d353c7
Merge pull request #63105 from deads2k/api-06-mapper
Automatic merge from submit-queue (batch tested with PRs 62937, 63105, 63031, 63174). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

rest mappings cannot logically be object converters

A `RESTMapping` in the general sense cannot be a `ObjectConverter` since the conversions are compiled, but the RESTMappings are discovered.   This starts isolating the bad assumptions into `kubectl` where they are used and removes the other bad `RESTMapping` use I found in the REST API installer that uses a mapping to determine scopes instead of using the metadata provided during API registration.

intersection of @kubernetes/sig-api-machinery-bugs and @kubernetes/sig-cli-maintainers 
@sttts @pwittrock @soltysh 

```release-note
NONE
```
2018-04-26 16:40:12 -07:00
Kubernetes Submit Queue 7ff38a23f0
Merge pull request #62937 from vikaschoudhary16/fix-dockershim-e2e
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix dockershim e2e

**What this PR does / why we need it**:
Delete checkpoint file when GetCheckpoint fails due to corrupt checkpoint. Earlier, before checkpointmanager, [`GetCheckpoint` in dockershim was deleting corrupt checkpoint file implicitly](https://github.com/kubernetes/kubernetes/pull/56040/files#diff-9a174fa21408b7faeed35309742cc631L116). In checkpointmanager's `GetCheckpoint` this implicit deletion of corrupt checkpoint is not happening. Because of this few e2e tests are failing because these tests are testing this deletion.
Changes are being added to delete checkpoint file if found corrupted. 

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


**Special notes for your reviewer**:
No new behavior is being introduced. Implicit deletion of corrupt checkpoint is being done explicitly.

**Release note**:

```release-note
None
```
/cc @dashpole @sjenning @derekwaynecarr
2018-04-26 16:26:14 -07:00
Seth Jennings 5da3a1d514 kubelet: logs: do not wait on following terminated container 2018-04-26 16:53:54 -05:00
Kubernetes Submit Queue a38a02792b
Merge pull request #62662 from wangzhen127/runtime-default
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Change seccomp annotation from "docker/default" to "runtime/default"

**What this PR does / why we need it**:
This PR changes seccomp annotation from "docker/default" to "runtime/default", so that it is can be applied to all kinds of container runtimes. This PR is a followup of [#1963](https://github.com/kubernetes/community/pull/1963).

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-04-26 14:33:53 -07:00
Avesh Agarwal b408209ac0 Add myself to sig-scheduling maintainers/approvers list. 2018-04-26 14:15:14 -04:00
Kubernetes Submit Queue 6aad80cce3
Merge pull request #63146 from liggitt/remove-patch-retry
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

collapse patch conflict retry onto GuaranteedUpdate

xref https://github.com/kubernetes/kubernetes/issues/63104

This PR builds on https://github.com/kubernetes/kubernetes/pull/62868

1. When the incoming patch specified a resourceVersion that failed as a precondition, the patch handler would retry uselessly 5 times. This PR collapses onto GuaranteedUpdate, which immediately stops retrying in that case.

2. When the incoming patch did not specify a resourceVersion, and persisting to etcd contended with other etcd updates, the retry would try to detect patch conflicts with deltas from the first 'current object' retrieved from etcd and fail with a conflict error in that case. Given that the user did not provide any information about the starting version they expected their patch to apply to, this does not make sense, and results in arbitrary conflict errors, depending on when the patch was submitted relative to other changes made to the resource. This PR changes the patch application to be performed on the object retrieved from etcd identically on every attempt.

fixes #58017
SMP is no longer computed for CRD objects

fixes #42644
No special state is retained on the first attempt, so the patch handler correctly handles the cached storage optimistically trying with a cached object first

/assign @lavalamp

```release-note
fixed spurious "unable to find api field" errors patching custom resources
```
2018-04-26 10:55:27 -07:00
Mayank Kumar c3ba4f1d3d remove unnecessary else clauses 2018-04-26 10:52:08 -07:00
David Eads b8177bb9af tighten .Info for kubectl to avoid unpredictable conversion 2018-04-26 12:47:25 -04:00
David Eads 6900f8856f rest mappings cannot logically be object converters 2018-04-26 12:47:25 -04:00
Kubernetes Submit Queue d4b678036f
Merge pull request #63200 from deads2k/api-09-duplicate
Automatic merge from submit-queue (batch tested with PRs 62911, 63200). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

stop duplicating preferred version order 

`GroupMeta` includes two fields for a preferred groupVersion, `.GroupVersion` and `.GroupVersion[0]`.  This collapses onto the latter.

@kubernetes/sig-api-machinery-pr-reviews 

lots of ripples, but eliminate of duplication is good.
/assign @sttts 
/assign @cheftako 


```release-note
NONE
```
2018-04-26 09:43:06 -07:00
Kubernetes Submit Queue 8122aa41b5
Merge pull request #62911 from juanvallejo/jvallejo/remove-hardcoded-list-of-resources
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove hardcoded list of resources

**Release note**:

```release-note
NONE
```

Removes the hardcoded list of resources in cmdutil.ValidResourceTypeList (which was not being kept up to date) and instead suggests using the `kubectl api-resources` command in order to retrieve a discovery-based list of supported resources.

I prefer this approach over updating `cmdutil.ValidResourceTypeList` to be based on discovery in order to avoid potential calls to the server while building the help output of commands.

cc @soltysh
2018-04-26 09:17:46 -07:00
Kubernetes Submit Queue dd5f030b02
Merge pull request #63165 from deads2k/api-08-kubeapiversion
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove KUBE_API_VERSIONS

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

KUBE_API_VERSIONS is an attempt to control the available serialization of types. It pre-dates the idea that we'll have separate schemes, so it's not a thing that makes sense anymore.

Server-side we've had a very clear message about breaks in the logs for a year "KUBE_API_VERSIONS is only for testing. Things will break.".

Client-side it became progressively more broken as we moved to generic types for CRUD more than a year ago. What is registered doesn't matter when everything is unstructured.

We should remove this piece of legacy since it doesn't behave predictable server-side or client-side.

@smarterclayton @lavalamp
@kubernetes/sig-api-machinery-bugs 

```release-note
KUBE_API_VERSIONS is no longer respected.  It was used for testing, but runtime-config is the proper flag to set.
```
2018-04-26 08:22:36 -07:00
Marek Siarkowicz b691f2ab1d Add other prometheus monitoring components 2018-04-26 17:14:49 +02:00
David Eads a9518acacd generated 2018-04-26 10:03:37 -04:00
David Eads a89291a5de stop duplicating preferred version order 2018-04-26 10:03:36 -04:00
juanvallejo e11b66a732 update describe command opts struct 2018-04-26 09:42:26 -04:00
juanvallejo 6d3652eded remove hardcoded list of resources 2018-04-26 09:31:58 -04:00
Kubernetes Submit Queue b8ab2891b3
Merge pull request #63062 from hanxiaoshuai/cleanup0424
Automatic merge from submit-queue (batch tested with PRs 63009, 63062). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

clean up unused code fakeRL in requestinfo_test.go

**What this PR does / why we need it**:
clean up unused code fakeRL in requestinfo_test.go
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-04-26 05:53:12 -07:00
Kubernetes Submit Queue b181af1c68
Merge pull request #63009 from mvladev/etcd-disable-automatic-metric-registration
Automatic merge from submit-queue (batch tested with PRs 63009, 63062). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Register Prometheus etcdmetrics only for apiserver

Removed automatic registration with `init` funciton and use `Register` function to register metrics for etcd storage only when requested.



**What this PR does / why we need it**: Prevents leaking etcd metrics to other k8s components

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-04-26 05:53:09 -07:00
David Eads a68c57155e remove KUBE_API_VERSIONS 2018-04-26 08:27:49 -04:00
Kubernetes Submit Queue 5fa25a9508
Merge pull request #63133 from hzxuzhonghu/remove-always-admit
Automatic merge from submit-queue (batch tested with PRs 63186, 63133). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

eliminate alwaysAdmit admission in apiserver test

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

alwaysAdmit is of no meaning, previously if not specify an admission plugin, it will panic, but now since we add protection `if admit != nil`. So can safely remove it.

**Release note**:

```release-note
NONE
```
2018-04-26 04:50:13 -07:00
Kubernetes Submit Queue c89174e566
Merge pull request #63186 from Random-Liu/fix-remote-client-log
Automatic merge from submit-queue (batch tested with PRs 63186, 63133). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add level to remote client glog.

Set log level for remote client glog.

There is no way to disable `glog.Infof()` when `logtostderr` is specified. Because of this, `crictl logs` will always output an annoying line now:
```
# crictl logs 8a7d0379367b7
I0426 08:34:13.679995    6949 remote_runtime.go:43] Connecting to runtime service unix:///run/containerd/containerd.sock
I0426 02:20:19.389765       1 main.go:76] opts: {{/usr/sbin/dnsmasq [-k --cache-size=1000 --no-negcache --log-facility=- --server=/cluster.local/127.0.0.1#10053 --server=/in-addr.arpa/127.0.0.1#10053 --server=/ip6.arpa/127.0.0.1#10053] true} /etc/k8s/dns/dnsmasq-nanny 10000000000}
I0426 02:20:19.390103       1 nanny.go:94] Starting dnsmasq [-k --cache-size=1000 --no-negcache --log-facility=- --server=/cluster.local/127.0.0.1#10053 --server=/in-addr.arpa/127.0.0.1#10053 --server=/ip6.arpa/127.0.0.1#10053]
```

This PR sets a level for the log, so that it won't show up in `crictl logs`.

Signed-off-by: Lantao Liu <lantaol@google.com>

**Release note**:

```release-note
none
```
2018-04-26 04:50:10 -07:00
Kubernetes Submit Queue acbccfba84
Merge pull request #62820 from juanvallejo/jvallejo/wire-more-print-flags
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

wire printflags through additional cmds

**Release note**:
```release-note
NONE
```

Adds PrintFlag pattern to more commands.

cc @deads2k @soltysh
2018-04-26 02:20:34 -07:00
Lantao Liu a321646e74 Add level to remote client glog.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-04-26 01:21:20 -07:00
Kubernetes Submit Queue 30e811c97c
Merge pull request #60007 from k82cn/k8s_54313_1
Automatic merge from submit-queue (batch tested with PRs 59367, 60007). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Do not schedule pod to the node under PID pressure.

Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>

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

**Release note**:
```release-note
Added CheckNodePIDPressurePredicate to checks if a pod can be scheduled on
a node reporting pid pressure condition.
```
2018-04-26 00:43:11 -07:00
Kubernetes Submit Queue becee4c12e
Merge pull request #59367 from colemickens/ptr-flake
Automatic merge from submit-queue (batch tested with PRs 59367, 60007). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

podtolerationrestriction: fix informer race in test

**What this PR does / why we need it**: This fixes test flakes in the PodTolerationRestriction admission controller unit tests. They seem to pass most of the time currently, but modifications I was making for #58818 changed timing and caused it to constantly break.

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

**Special notes for your reviewer**: n/a

Sending this as a one-off because the changes for both of the admin controllers in #58818 require additional discussion. Thanks to @ericchiang for finding it and authoring the commit; I just rebased and sent the PR.

```release-note
NONE
```
2018-04-26 00:43:07 -07:00
Pengfei Ni a54cb15d7b Improve Azure disk operations for vmas and vmss 2018-04-26 14:23:09 +08:00
Kubernetes Submit Queue cc845246e4
Merge pull request #63063 from feiskyer/azure-new-sdk
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Upgrade Azure Go SDK to stable version

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

Kubernetes is using a beta version of Azure Go SDK now. If there are bugs in them, it's hard to upgrade because Azure Go SDK won't release new patches for pre-released SDK versions. We should upgrade Go SDK to stable version (e.g. v14.6.0)

Refer #62249

Refer Azure/azure-sdk-for-go#1586

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

**Special notes for your reviewer**:

This PR includes changes in #61972, but with a newer go-autorest version.

**Release note**:

```release-note
Upgrade Azure Go SDK to stable version (v14.6.0)
```
2018-04-25 22:20:50 -07:00
Kubernetes Submit Queue 9e52d14eb9
Merge pull request #62805 from awly/take-reviews
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add awly as reviewer in several subtrees

```release-note
NONE
```
2018-04-25 21:24:31 -07:00
Jordan Liggitt b526532c8a
Add tests for resourceVersion precondition failures on patch 2018-04-25 22:44:46 -04:00
Da K. Ma 2c10d15ae5 Do not schedule pod to the node under PID pressure.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
2018-04-26 10:07:42 +08:00
Jordan Liggitt fbd6f38084
collapse patch conflict retry onto GuaranteedUpdate
builds on #62868

1. When the incoming patch specified a resourceVersion that failed as a precondition,
the patch handler would retry uselessly 5 times. This PR collapses onto GuaranteedUpdate,
which immediately stops retrying in that case.

2. When the incoming patch did not specify a resourceVersion, and persisting to etcd
contended with other etcd updates, the retry would try to detect patch conflicts with
deltas from the first 'current object' retrieved from etcd and fail with a conflict error
in that case. Given that the user did not provide any information about the starting version
they expected their patch to apply to, this does not make sense, and results in arbitrary
conflict errors, depending on when the patch was submitted relative to other changes made
to the resource. This PR changes the patch application to be performed on the object retrieved
from etcd identically on every attempt.

fixes #58017
SMP is no longer computed for CRD objects

fixes #42644
No special state is retained on the first attempt, so the patch handler correctly handles
the cached storage optimistically trying with a cached object first
2018-04-25 21:55:13 -04:00
Pengfei Ni 058b619040 Update vendors for client-go 2018-04-26 09:38:48 +08:00
Pengfei Ni ce325f9afe Use new clients in Azure Disk volume 2018-04-26 09:38:48 +08:00
Pengfei Ni 471d00c929 Use new clients in Azure credential provider 2018-04-26 09:38:48 +08:00
Pengfei Ni 079f9b85f8 Use new clients in azure cloud provider 2018-04-26 09:38:48 +08:00
Pengfei Ni 8a0cae8647 Upgrade virtualmachin/disk/storageaccount client to use new SDK 2018-04-26 09:38:48 +08:00
Pengfei Ni b1b930a39b Upgrade Azure Go SDK to v14.6.0 2018-04-26 09:38:48 +08:00
Kubernetes Submit Queue 3dbcd1ddce
Merge pull request #63059 from ceshihao/upgrade_json_package_fix_base64_newline
Automatic merge from submit-queue (batch tested with PRs 59965, 59115, 63076, 63059). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Upgrade dep json-iterator/go to fix base64 decode bug

**What this PR does / why we need it**:
upgrade dep `json-iterator/go` to fix base64 decode bug #62742

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

**Special notes for your reviewer**:
Just upgrade `json-iterator/go` to latest which includes base64 decode fix https://github.com/json-iterator/go/pull/266
No other code changes

**Release note**:

```release-note
None
```
2018-04-25 17:07:18 -07:00
Kubernetes Submit Queue 2a10c309aa
Merge pull request #63076 from chuckha/etcdprepull
Automatic merge from submit-queue (batch tested with PRs 59965, 59115, 63076, 63059). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Prepull etcd before an upgrade

If kubeadm ever has to upgrade etcd it should prepull the image so
there is less downtime during the upgrade when etcd versions change.

Fixes kubernetes/kubeadm#669

Signed-off-by: Chuck Ha <ha.chuck@gmail.com>

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

This PR Prepulls the etcd image during a `kubeadm upgrade apply`.

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

Fixes kubernetes/kubeadm#669

**Special notes for your reviewer**:

constants.MasterComponents was not changed because it is used in many places where etcd does not need to be nor should it be a part of this slice.

**Release note**:
```release-note
NONE
```

/cc @kubernetes/sig-cluster-lifecycle-pr-reviews
2018-04-25 17:07:14 -07:00
Kubernetes Submit Queue 163b848abe
Merge pull request #59115 from alexbrand/kubeadm-confirm-reset-2
Automatic merge from submit-queue (batch tested with PRs 59965, 59115, 63076, 63059). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubeadm: prompt for confirmation when resetting a master

Signed-off-by: Alexander Brand <alexbrand09@gmail.com>



**What this PR does / why we need it**:
This PR implements a confirmation prompt when running `kubeadm reset` on a master node. This is to prevent users from mistakenly resetting a master node.

**Which issue(s) this PR fixes**:
Fixes https://github.com/kubernetes/kubeadm/issues/673

**Special notes for your reviewer**:
I am somewhat torn on the approach on how to detect that kubeadm is running on a master node. I went with checking for the apiserver manfiest file on the local filesystem, as it seems like a simpler approach when compared to getting a k8s client, getting a list of nodes, finding the current node, and checking if it has the master taint. I am happy to rework if the latter is more desirable.

Sample runs:
```
# ./kubeadm reset
[Warning] Are you sure you want to reset this master node? Type the word "confirm" to continue: no
Aborted reset operation on master node

# ./kubeadm reset
[Warning] Are you sure you want to reset this master node? Type the word "confirm" to continue: confirm
[preflight] Running pre-flight checks.
[reset] Stopping the kubelet service.
[reset] WARNING: The kubelet service could not be stopped by kubeadm: [exit status 1]
[reset] WARNING: Please ensure kubelet is stopped manually.
[reset] Unmounting mounted directories in "/var/lib/kubelet"
........

# ./kubeadm reset
[Warning] Are you sure you want to reset this master node? Type the word "confirm" to continue:
Aborted reset operation on master node
# ./kubeadm reset --confirm
[preflight] Running pre-flight checks.
[reset] Stopping the kubelet service.
[reset] WARNING: The kubelet service could not be stopped by kubeadm: [exit status 1]
[reset] WARNING: Please ensure kubelet is stopped manually.
[reset] Unmounting mounted directories in "/var/lib/kubelet"
........
```

**Release note**:

```release-note
kubeadm: prompt the user for confirmation when resetting a master node
```
2018-04-25 17:07:12 -07:00
Kubernetes Submit Queue 37a798deea
Merge pull request #59965 from shun-miyoshi-com/fix-wrong-msg
Automatic merge from submit-queue (batch tested with PRs 59965, 59115, 63076, 63059). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix help message of kubeconfig-dir option(kubeadm alpha phase kubeconfig all)

**What this PR does / why we need it**:
This patch will fix wrong help message.

The command is kubeadm alpha phase kubeconfig [command]
The help message is for --kubeconfig-dir option.

kubeconfig-dir is not port.(It is directory)
So, I fixed the message.

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

/sig cluster-lifecycle
2018-04-25 17:07:08 -07:00
Jonathan Basseri eace2d08d0 Revert "Revert "Revert revert of equivalence class hash calculation in scheduler""
This reverts commit 4386751b5d.
2018-04-25 16:11:59 -07:00