Commit Graph

64850 Commits (85099ba4c2eeb125da03bdce6217b28aaf6a0abb)

Author SHA1 Message Date
Clayton Coleman aa9fd2bf11
client-go should not take a dependency on the v1 api lightly
These constants will never change, and tools/ should not be depending on
core/api/v1 (there is nothing v1 specific about them).
2018-04-25 18:52:16 -04:00
Kubernetes Submit Queue 029c1d8b23
Merge pull request #63159 from ii/kubeadm--config+verbose
Automatic merge from submit-queue (batch tested with PRs 61601, 62881, 63159). 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>.

support simultaneous kubeadm --v and --config

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

Providing -v and --config parameters to increase verbosity while providing a kubeadm.config results in an error rather than providing the requested verbosity.

**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 https://github.com/kubernetes/kubeadm/issues/765

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-04-25 14:03:24 -07:00
Kubernetes Submit Queue 08d358e3d1
Merge pull request #62881 from juanvallejo/jvallejo/wire-print-flags-get-cmd
Automatic merge from submit-queue (batch tested with PRs 61601, 62881, 63159). 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 print flags through get.go

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

Adds the PrintFlags pattern to `get.go`.
Prerequisite to ongoing server-side printing work.

cc @soltysh @deads2k
2018-04-25 14:03:21 -07:00
Kubernetes Submit Queue 30101be0dc
Merge pull request #61601 from neolit123/test-join
Automatic merge from submit-queue (batch tested with PRs 61601, 62881, 63159). 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: add test coverage to join.go

**What this PR does / why we need it**:
Add test coverage to `join.go`.

A separate commit exports the function `ValidateJoinCommandLine()` from `join.go` so that testing this file is more flexible.

Test coverage is at 76%. One untested part is successfully running `Join.Run()` without errors, but that requires a valid HTTPS API server running and a valid config. i got this partially working but gave up because i faced some cert / config blockers. suggestions on how to get that to work easily are welcome.

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

NONE

**Special notes for your reviewer**:

NONE

**Release note**:

```release-note
NONE
```
2018-04-25 14:03:18 -07:00
juanvallejo ac6ca38dd7 report outputFormat in PrintFlags err 2018-04-25 16:35:56 -04:00
Alexander Brand 8ea5be8d89
kubeadm: accept 'Y' and 'y' as reset confirmation
Signed-off-by: Alexander Brand <alexbrand09@gmail.com>
2018-04-25 16:21:16 -04:00
juanvallejo 27bd4ded04 wire printflags through additional cmds 2018-04-25 16:07:32 -04:00
Kubernetes Submit Queue 6251402266
Merge pull request #63040 from misterikkit/ecache-race
Automatic merge from submit-queue (batch tested with PRs 62432, 62868, 63040). 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>.

scheduler: fix race condition in equivalence cache

**What this PR does / why we need it**:
This adds an equivalence cache test to exercise the race condition observed in https://github.com/kubernetes/kubernetes/issues/62921 and then fixes the race.

The `Cache` interface needed a new method to check whether a `NodeInfo` is stale, and `genericScheduler` needed some plumbing to make the `Cache` object available to `podFitsOnNode()`.

The solution is, right before writing to the eCache, check the scheduler cache to see if the current `NodeInfo` object is out of date. If the node is out of date, then don't write to the eCache. If the `NodeInfo` is stale, it is because of a cache update that should also invalidate the eCache entry. That invalidation either happens before `podFitsOnNode()` acquires the eCache lock (original bug, so we don't do the write) or blocks until we release that lock (removing the potentially bad entry).

Fixes #62921 

**Special notes for your reviewer**:

**Release note**:

equivalence cache is still alpha, so no release note.
```release-note
NONE
```
/sig scheduling
/assign bsalalamat
/assign resouer
2018-04-25 12:56:14 -07:00
Kubernetes Submit Queue b942c53546
Merge pull request #62868 from lavalamp/refactor-patch
Automatic merge from submit-queue (batch tested with PRs 62432, 62868, 63040). 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>.

Refactor patch

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

Continue making patch handler readable.

**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-25 12:56:10 -07:00
Kubernetes Submit Queue e63cf9a4d0
Merge pull request #62432 from ixdy/pkg-generated-bindata
Automatic merge from submit-queue (batch tested with PRs 62432, 62868, 63040). 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>.

bazel: generate pkg/generated/bindata.go at build time and remove from repo

**What this PR does / why we need it**: `pkg/generated/bindata.go` is a generated file, and it's one that's easy for us to handle in bazel (we already handle `test/e2e/generated/bindata.go`, for example).

The translations also have an additional generation step (`hack/update-translations.sh`) which I'm not handling here, but this enables us to remove the `bindata.go` files from the tree (when combined with #62151).

**Release note**:

```release-note
NONE
```

/assign @rmmh @cblecker @thockin @fejta
2018-04-25 12:56:08 -07:00
juanvallejo 191a48f4c3 wire PrintFlags through get cmd 2018-04-25 15:02:48 -04:00
juanvallejo df6a7ea654 move "get" cmd pieces to cmd/get 2018-04-25 14:58:12 -04:00
Kubernetes Submit Queue 29630b5124
Merge pull request #63141 from deads2k/cli-36-io-2
Automatic merge from submit-queue (batch tested with PRs 62982, 63075, 63067, 62877, 63141). 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>.

update all set and get  commands for iostreams

Sweeping more commands for the iostream pattern.   Trying to keep things about 300 lines each.  Delete is going to be big


/assign @juanvallejo 

```release-note
NONE
```
2018-04-25 11:53:24 -07:00
Kubernetes Submit Queue df489968b7
Merge pull request #62877 from deads2k/cli-34-describer
Automatic merge from submit-queue (batch tested with PRs 62982, 63075, 63067, 62877, 63141). 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>.

make describers more generic from the CLI

I've made this change very small so the intent and explanation make sense to people.

Clients are not generic.  Client**Configs** are generic.  We faced this distinction in the apiserver and it took us a little to hurdle it.  When you try to provide a generic example or function, you need to provide Client**Config**, not a kube clientset.  The reason is that the code you're calling may have generated their own clientset, may want to use a dynamic one, or may want to a simple restclient.  As we seek to make `kubectl` primitives more generally applicable, this is an example we'll want to follow.  I suspect we'll be making more changes along these veins as we tease out the generic pieces of `kubectl ` to make a friendly CLI library.


@kubernetes/sig-cli-maintainers 

/hold

Holding for a few days to make sure that people have time to read and digest.

```release-note
NONE
```
2018-04-25 11:53:21 -07:00
Kubernetes Submit Queue e270b8aace
Merge pull request #63067 from k82cn/k8s_63027
Automatic merge from submit-queue (batch tested with PRs 62982, 63075, 63067, 62877, 63141). 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>.

Removed e2e test on empty NodeAffinity.

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)*:
Fixes #63027 

**Special notes for your reviewer**:
In #62448, we removed the validation on empty `nodeAffinity` which is already handled in scheduler: select no objects.

**Release note**:
```release-note
None
```
2018-04-25 11:53:17 -07:00
Kubernetes Submit Queue 97287177ee
Merge pull request #63075 from deads2k/api-05-eliminate-indirection
Automatic merge from submit-queue (batch tested with PRs 62982, 63075, 63067, 62877, 63141). 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 indirection from type registration

Some years back there was a partial attempt to revamp api type registration, but the effort was never completed and this was before we started splitting schemes. With separate schemes, the idea of partial registration no longer makes sense.  This pull starts removing cruft from the registration process and pulls out a layer of indirection that isn't needed.

@kubernetes/sig-api-machinery-pr-reviews 
@lavalamp @cheftako @sttts @smarterclayton 

Rebase cost is fairly high, so I'd like to avoid this lingering.

/assign @sttts 
/assign @cheftako 

```release-note
NONE
```
2018-04-25 11:53:14 -07:00
Kubernetes Submit Queue af5f9bc9bb
Merge pull request #62982 from dixudx/warning_kubelet_remote_sandbox
Automatic merge from submit-queue (batch tested with PRs 62982, 63075, 63067, 62877, 63141). 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 warnings on using pod-infra-container-image for remote container runtime

**What this PR does / why we need it**:
We should warn on using `--pod-infra-container-image` to avoid confusions, when users are using remote container runtime.

**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 #55676,#62388,#62732

**Special notes for your reviewer**:
/cc @kubernetes/sig-node-pr-reviews 

**Release note**:

```release-note
add warnings on using pod-infra-container-image for remote container runtime
```
2018-04-25 11:53:11 -07:00
Chris McClimans b8128bda79 support simultaneous kubadm --v and --config 2018-04-26 05:53:43 +12:00
Kubernetes Submit Queue 667dd711e7
Merge pull request #61926 from filbranden/cgroupdriver10
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>.

Update libcontainer to include PRs with fixes to systemd cgroup driver

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

PR opencontainers/runc#1754 works around an issue in manager.Apply(-1) that makes Kubelet startup hang when using systemd cgroup driver (by adding a timeout) and further PR opencontainers/runc#1772 fixes that bug by checking the proper error status before waiting on the channel.
    
PR opencontainers/runc#1776 checks whether Delegate works in slices, which keeps libcontainer systemd cgroup driver working on systemd v237+.

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

**Special notes for your reviewer**:
/assign @derekwaynecarr
cc @vikaschoudhary16 @sjenning @adelton @mrunalp 

**Release note**:

```release-note
NONE
```
2018-04-25 10:46:28 -07:00
Jonathan Basseri dacc1a8d52 Check for old NodeInfo when updating equiv. cache.
Because the scheduler takes a snapshot of cache data at the start of
each scheduling cycle, updates to the equivalence cache should be
skipped if there was a cache update during the cycle.

If the current NodeInfo becomes stale while we evaluate predicates, we
will not write any results into the equivalence cache. We will still use
the results for the current scheduling cycle, though.
2018-04-25 10:18:40 -07:00
Jonathan Basseri ca7bfc02ee Add IsUpTodate() to Cache interface.
This allows scheduler implementations to check if a NodeInfo object
matches the current state of the cache. Useful if the NodeInfo in
question came from a Snapshot() for example.
2018-04-25 10:18:40 -07:00
Jonathan Basseri 02d657827c Test race condition in equivalence cache.
Add a unit test that invalidates equivalence cache during a scheduling
cycle. This exercises the bug described in
https://github.com/kubernetes/kubernetes/issues/62921
2018-04-25 10:18:40 -07:00
Kubernetes Submit Queue 5e08ae0bf2
Merge pull request #61285 from soltysh/issue23276
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>.

Deprecate kubectl rolling-update

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

/assign @juanvallejo @tnozicka 

**Release note**:
```release-note
Deprecate kubectl rolling-update 
```
2018-04-25 09:47:27 -07:00
Jeff Grafton 8bdb67639f Add pointer comments 2018-04-25 09:47:14 -07:00
Jeff Grafton b2f8cf1bce Create a go_bindata bazel macro 2018-04-25 09:45:10 -07:00
Jeff Grafton 75efdf2974 Remove pkg/generated/bindata.go from the repo 2018-04-25 09:44:22 -07:00
Jeff Grafton b9a029db6d bazel: generate pkg/generated/bindata.go at build time 2018-04-25 09:44:22 -07:00
Luis Pabón f416871e57
Update provisioner to v0.2.1 container
Update the csi-provisioner to [v0.2.1](https://github.com/kubernetes-csi/external-provisioner/releases/tag/v0.2.1)
2018-04-25 12:16:25 -04:00
ceshihao 3fde7d6844 runhack/update-staging-godeps.sh 2018-04-25 16:11:21 +00:00
Daniel Smith 349a99b80e Refactor the patch handler for readability
This is the combination of a series of changes which individually don't
make any behavioral changes. The original commits are preserved in my
own fork in the refactor-patch-complete branch, as when squashed this is
impossible to review.

This turned a big function with lots of parameters and closures into an
object with multiple functions, fewer closures and more well documented
state transitions.
2018-04-25 09:11:20 -07:00
Kubernetes Submit Queue aab5cb4c34
Merge pull request #63142 from serathius/prometheus-readme
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>.

[prometheus addon] Add readme

This PR adds README file that warns users about it's intended use, and redirects to more mature projects.

```release-note
NONE
```
/cc @brancz
2018-04-25 08:50:47 -07:00
Kubernetes Submit Queue 5d7569d664
Merge pull request #62913 from deads2k/client-04-dynamic
Automatic merge from submit-queue (batch tested with PRs 63137, 62913). 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>.

make a simple dynamic client that is easy to use

The dynamic client has annoyed me for the last time!  The existing one takes arguments at odd levels, requires lots of information to instantiate, does some weird pool thing, and uses unusual types.  This creates an interface like this:

```go

type DynamicInterface interface {
	ClusterResource(resource schema.GroupVersionResource) DynamicResourceInterface
	NamespacedResource(resource schema.GroupVersionResource, namespace string) DynamicResourceInterface
}

type DynamicResourceInterface interface {
	Create(obj *unstructured.Unstructured) (*unstructured.Unstructured, error)
	Update(obj *unstructured.Unstructured) (*unstructured.Unstructured, error)
	UpdateStatus(obj *unstructured.Unstructured) (*unstructured.Unstructured, error)
	Delete(name string, options *metav1.DeleteOptions) error
	DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
	Get(name string, options metav1.GetOptions) (*unstructured.Unstructured, error)
	List(opts metav1.ListOptions) (*unstructured.UnstructuredList, error)
	Watch(opts metav1.ListOptions) (watch.Interface, error)
	Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*unstructured.Unstructured, error)
}
```

You create it from just a `rest.Config`, no mapper, no path resolving func, no trying to set up codecs ahead of time, no unnecessary pool.  It just works.

I updated the namespace controller to use it and I updated the existing dynamic client to leverage it so that I get all their tests for "free".

@kubernetes/sig-api-machinery-pr-reviews 
@liggitt @smarterclayton @bparees @sttts @ironcladlou I know each of us has struggled with the dynamic client in our time.
@lavalamp @caesarxuchao This is vastly simplifying.  I'm eager to drop the old `ClientPool`.  client-go will technically have another incompatible semver this release.  I'm up for changing it in tree.


```release-note
client-go developers: the new dynamic client is easier to use and the old is deprecated, you must switch.
```
2018-04-25 08:50:09 -07:00
Kubernetes Submit Queue e1e050a094
Merge pull request #63137 from krzysied/etcd_version_typo_fix
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>.

etcd version typo fix

**What this PR does / why we need it**:
Allows BUNDLED_VERSIONS string to be parsed correctly.

```release-note
NONE
```
2018-04-25 08:09:28 -07:00
ceshihao 5528a4d298 upgrade dep json-iterator/go to fix #62742 2018-04-25 13:59:01 +00:00
Kubernetes Submit Queue a53df4d905
Merge pull request #63086 from soltysh/discovery_timeout
Automatic merge from submit-queue (batch tested with PRs 63129, 63066, 60009, 63136, 63086). 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 discovery default timeout test

/assign @sttts 

**Release note**:
```release-note
NONE
```
2018-04-25 06:29:29 -07:00
Kubernetes Submit Queue 81c00aa60b
Merge pull request #63136 from shyamjvs/revert-etcd-cleanup-dir-manifest-change
Automatic merge from submit-queue (batch tested with PRs 63129, 63066, 60009, 63136, 63086). 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 "gce: move etcd dir cleanup to manifests"

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

This reverts commit ae73bed1d0.

```release-note
NONE
```

/cc @wojtek-t
2018-04-25 06:29:25 -07:00
Kubernetes Submit Queue 02e3577ab1
Merge pull request #60009 from zetaab/nodetaint
Automatic merge from submit-queue (batch tested with PRs 63129, 63066, 60009, 63136, 63086). 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 node shutdown taint

**What this PR does / why we need it**: we need node stopped taint in order to detach volumes immediately without waiting timeout. More info in issue ticket #58635 

**Which issue(s) this PR fixes** 
Fixes #58635

**Special notes for your reviewer**: this was reverted, original PR https://github.com/kubernetes/kubernetes/pull/59323 Hopefully now bugs are fixed. However, I will execute more tests manually today.

**Release note**:
```release-note
NONE
```
2018-04-25 06:29:22 -07:00
Kubernetes Submit Queue 9a841b3efd
Merge pull request #63066 from Lion-Wei/ipvs-dummy
Automatic merge from submit-queue (batch tested with PRs 63129, 63066, 60009, 63136, 63086). 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>.

ipvs proxy bind externalIP and lb ingress.IP to dummy interface

**What this PR does / why we need it**:
IPVS proxy bind externalIP and lb ingress.IP to dummy interface.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2018-04-25 06:29:19 -07:00
Kubernetes Submit Queue c944882174
Merge pull request #63129 from cblecker/clean-unneeded-deps-apr24
Automatic merge from submit-queue (batch tested with PRs 63129, 63066, 60009, 63136, 63086). 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 and remove unused deps

**What this PR does / why we need it**:
The `examples/` directory was removed in #61246, but it's deps weren't cleaned up.

**Release note**:
```release-note
NONE
```
2018-04-25 06:29:16 -07:00
Marek Siarkowicz e2c5bd3711 [prometheus addon] Add readme 2018-04-25 15:06:25 +02:00
David Eads e931158128 generated 2018-04-25 09:02:32 -04:00
David Eads 1a753659cf core v1 API requires autoscaling/v1 to serve the Scale endpoint 2018-04-25 09:02:31 -04:00
David Eads df50da3adc update code generator 2018-04-25 09:02:31 -04:00
David Eads e7fbbe0e3c eliminate indirection from type registration 2018-04-25 09:02:31 -04:00
David Eads 3632037e60 add easy to use dynamic client 2018-04-25 08:55:26 -04:00
David Eads 8c1b687356 update more commands for iostreams 2018-04-25 08:45:15 -04:00
Lubomir I. Ivanov 9e3f4e21fd kubeadm: add test coverage to join.go
Included tests:
- TestNewValidJoin
2018-04-25 15:36:25 +03:00
Lubomir I. Ivanov 01377eeaf6 kubeadm: use the helper NewValidJoin() in join.go
Instead of using kubeadmutil.CheckErr() in every single
phase of cmd.Run(), use a new helper function
NewValidJoin() that returns a single error.

This would improve the unit testing options for this file.
Otherwise any error in cmd.Run() will trigger an os.Exit()
as kubeadmutil.CheckErr() does that.
2018-04-25 15:14:13 +03:00
Alexander Brand b25738b860
kubeadm: prompt for confirmation when resetting a master
Signed-off-by: Alexander Brand <alexbrand09@gmail.com>
2018-04-25 08:00:42 -04:00
Kubernetes Submit Queue 3fb88a23d9
Merge pull request #62292 from dims/skipped-test-should-not-be-marked-conformance
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>.

A test we always skip should not be a conformance test

**What this PR does / why we need it**:
We should not have a test marked Conformance when it is always skipped

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-04-25 04:17:12 -07:00