Commit Graph

64822 Commits (284e8182a402cfd545fc000fedaea071fed873b0)

Author SHA1 Message Date
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
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
Maciej Szulik 8237e1a034
Generated changes 2018-04-25 13:09:12 +02:00
Shyam Jeedigunta 2d6b4d0fa0 Revert "gce: move etcd dir cleanup to manifests"
This reverts commit ae73bed1d0.
2018-04-25 12:54:12 +02:00
Krzysztof Siedlecki e6f14191ce version typo fix 2018-04-25 12:46:33 +02:00
Kubernetes Submit Queue c1a6d5544c
Merge pull request #61882 from xiangpengzhao/fix-changelog
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 note on upgrading cluster by kubeadm.

**What this PR does / why we need it**:
Upgrading cluster from 1.9.x to 1.10.0 by kubeadm fails due to type change of `featureGates` in `KubeProxyConfiguration` done in #57962. This PR add a note on what should be done before upgrading.

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

**Special notes for your reviewer**:
cc @kubernetes/sig-cluster-lifecycle-bugs @liggitt @fgbreel
Thanks @berlinsaint for the workaround!

We may need a patch (if possible) for kubeadm to do this automatically as suggested by @danderson .

**Release note**:

```release-note
NONE
```
2018-04-25 02:15:22 -07:00
Kubernetes Submit Queue 046baee847
Merge pull request #63118 from vikaschoudhary16/start-stop-race
Automatic merge from submit-queue (batch tested with PRs 62951, 57460, 63118). 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 device plugin re-registration

**What this PR does / why we need it**:
While registering a new endpoint, device manager copies all the devices from the old endpoint for the same resource and then it stops the old endpoint and starts the new endpoint.

There is no sync between stopping the old and starting the new. While stopping the old, manager marks devices(which are copied to new endpoint as well) as "Unhealthy".

In the endpoint.go, when after restart, plugin reports devices healthy, same health state (healthy) is found  in the endpoint database and endpoint module does not update manager database.

Solution in the PR is to mark devices as unhealthy before copying to new endpoint. 


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

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
/cc @jiayingz @vishh @RenaudWasTaken @derekwaynecarr
2018-04-25 02:01:56 -07:00
Kubernetes Submit Queue 4f233eb92a
Merge pull request #57460 from dixudx/validate_initcontainer_hostport
Automatic merge from submit-queue (batch tested with PRs 62951, 57460, 63118). 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 hostport checking for initContainers since they run in sequential order

**What this PR does / why we need it**:
Fix hostport checking for initContainers since they run in sequential order

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

**Special notes for your reviewer**:
/assign @CaoShuFeng @dims 

**Release note**:

```release-note
None
```
2018-04-25 02:01:53 -07:00
xuzhonghu e1bcca681d remove useless alwaysAdmit in apiserver test 2018-04-25 16:37:08 +08:00
Kubernetes Submit Queue aa1ec693c3
Merge pull request #62951 from dims/support-nsenter-better-in-non-systemd-envs
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>.

Support nsenter in non-systemd environments

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

In our CI, we run kubekins image for most of the jobs. This is a
debian image with upstart and does not enable systemd. So we should

* Bailout if any binary is missing other than systemd-run.
* SupportsSystemd should check the binary path to correctly
  identify if the systemd-run is present or not
* Pass the errors back to the callers so kubelet is forced to
  fail early when there is a problem. We currently assume
  that all binaries are in the root directory by default which
  is wrong.


**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 01:08:10 -07:00
Kubernetes Submit Queue fad6279eee
Merge pull request #62745 from cblecker/github-template-owners
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 contribex to github template owners

**What this PR does / why we need it**:
The `.github/` folder doesn't have an OWNERS file. These templates fall under contribex, so this would add an OWNERS file to this folder.

**Release note**:

```release-note
NONE
```
2018-04-25 00:17:53 -07:00
Kubernetes Submit Queue 4dfd4b219c
Merge pull request #63111 from ixdy/rpm-rules-manual
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>.

Tag pkg_rpm rules as manual

**What this PR does / why we need it**: Mitigation step for #63108. Nothing depends on these rules yet, and tagging as manual prevents `make bazel-build` from building them, too.

**Release note**:

```release-note
NONE
```

/assign @BenTheElder 
/cc @sigma
2018-04-25 00:17:32 -07:00
Martin Vladev 40cf788013 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.
2018-04-25 10:06:37 +03:00
Christoph Blecker 4644761625
Clean up and remove unused deps 2018-04-24 23:55:29 -07:00
Di Xu b47ab8b2d3 add warnings for docker-only flags 2018-04-25 12:56:53 +08:00
Kubernetes Submit Queue 61892abc94
Merge pull request #62874 from dcbw/dockershim-SetUpPod-cleanup-on-failure
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>.

dockershim/sandbox: clean up pod network even if SetUpPod() failed

If the CNI network plugin completes successfully, but something fails
between that success and dockerhsim's sandbox setup code, plugin resources
may not be cleaned up. A non-trivial amount of code runs after the
plugin itself exits and the CNI driver's SetUpPod() returns, and any error
condition recognized by that code would cause this leakage.

The Kubernetes CRI RunPodSandbox() request does not attempt to clean
up on errors, since it cannot know how much (if any) networking
was actually set up. It depends on the CRI implementation to do
that cleanup for it.

In the dockershim case, a SetUpPod() failure means networkReady is
FALSE for the sandbox, and TearDownPod() will not be called later by
garbage collection even though networking was configured, because
dockershim can't know how far SetUpPod() got.

Concrete examples include if the sandbox's container is somehow
removed during during that time, or another OS error is encountered,
or the plugin returns a malformed result to the CNI driver.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1532965

```release-note
NONE
```
2018-04-24 21:48:01 -07:00
Da K. Ma 793ed98715 Added more UT for invalid case.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
2018-04-25 11:14:24 +08:00
vikaschoudhary16 c846d5fe63 Fix race between stopping old and starting new endpoint 2018-04-24 22:22:39 -04:00
Kubernetes Submit Queue 50dd920837
Merge pull request #62284 from DirectXMan12/bug/fix-use-rest-clients-help-line
Automatic merge from submit-queue (batch tested with PRs 59220, 62927, 63084, 63090, 62284). 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 hpa-use-rest-clients help text

The help text erroneously says "WARNING: alpha feature" when it
shouldn't have.  When we moved to beta, this should have been removed.

**Release note**:
```release-note
NONE
```
2018-04-24 19:01:23 -07:00
Kubernetes Submit Queue a4271c03cb
Merge pull request #63090 from mtaufen/fix-qosreserved-json-tag
Automatic merge from submit-queue (batch tested with PRs 59220, 62927, 63084, 63090, 62284). 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 qosReserved json tag (lowercase qos, instead of uppercase QOS)

The API conventions specify that json keys should start with a lowercase
character, and if the key starts with an initialism, all characters in
the initialism should be lowercase. See `tlsCipherSuites` as an example.

API Conventions:
https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md

>All letters in the acronym should have the same case, using the
>appropriate case for the situation. For example, at the beginning
>of a field name, the acronym should be all lowercase, such as "httpGet".

Follow up to: https://github.com/kubernetes/kubernetes/pull/62925

```release-note
NONE
```

@sjenning @derekwaynecarr
2018-04-24 19:01:20 -07:00
Kubernetes Submit Queue 9baf337cf3
Merge pull request #63084 from mikedanese/ctx
Automatic merge from submit-queue (batch tested with PRs 59220, 62927, 63084, 63090, 62284). 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>.

replace request.Context with context.Context

Followup on https://github.com/kubernetes/kubernetes/pull/62810

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

```release-note
NONE
```
2018-04-24 19:01:17 -07:00
Kubernetes Submit Queue be20a8d1d0
Merge pull request #62927 from hzxuzhonghu/fix-typo
Automatic merge from submit-queue (batch tested with PRs 59220, 62927, 63084, 63090, 62284). 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 typo: mutating validating admission should be distinguished

1. fix typo: mutating validating admission should be distinguished

1. avoid calling admit.Handles twice in delete

**Release note**:

```release-note
NONE
```
2018-04-24 19:01:14 -07:00
Kubernetes Submit Queue 47ece3a2ca
Merge pull request #59220 from neolit123/test-token
Automatic merge from submit-queue (batch tested with PRs 59220, 62927, 63084, 63090, 62284). 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 better test coverage to token.go

**What this PR does / why we need it**:
a PR for adding some more tests in `kubeadm/cmd` for `token.go`.

some areas of the `token.go` like listing, creating and deleting tokens can present challenges.
coverage was increased to around 87%.

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

please, link issue # if you know of such.

**Special notes for your reviewer**:
none

**Release note**:

```release-note
NONE
```
2018-04-24 19:01:10 -07:00
Kubernetes Submit Queue 6fbca94fae
Merge pull request #63010 from deads2k/api-04-metadataaccessor
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 confusing flexibility for metadata interpretation

Metadata accessors are coded in.  This means that we don't need to inject flexibility, the flexibility is already present based on what your code relies up.  This removes the per-individual resource injection which simplifies all calling code.

intersection of @kubernetes/sig-api-machinery-pr-reviews @kubernetes/sig-cli-maintainers 

```release-note
NONE
```
2018-04-24 17:59:12 -07:00
Jeff Grafton 6ddf6c12c5 Tag pkg_rpm rules as manual 2018-04-24 16:48:22 -07:00