Commit Graph

3530 Commits (ba535d57f6e2eb338f6fbf121d6be2e6f9204136)

Author SHA1 Message Date
Kubernetes Submit Queue b099e91920
Merge pull request #59905 from mtaufen/dkcfg-config-ok-kubelet-config-ok
Automatic merge from submit-queue (batch tested with PRs 59353, 59905, 53833). 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>.

Rename ConfigOK to KubeletConfigOk

This is a more accurate name for the condition, as it describes the
status of the Kubelet's configuration.

Also cleans up capitalization of internal names.

```release-note
The ConfigOK node condition has been renamed to KubeletConfigOk.
```
2018-02-15 11:06:36 -08:00
Kubernetes Submit Queue bb500a73b6
Merge pull request #59353 from juanvallejo/jvallejo/update-name-printer-output
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 name printer output to kind.group/name

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

Followup to https://github.com/kubernetes/kubernetes/pull/59227

Updates output via `-o name` to be pipeable.

cc @deads2k
2018-02-15 10:37:19 -08:00
juanvallejo 765f9ec68b
update -o name format to kind.group/name 2018-02-15 10:33:06 -05:00
Kubernetes Submit Queue d336607679
Merge pull request #59871 from wojtek-t/cache_fields_and_labels
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>.

Store labels and fields with object

We are already computing labels and fields before putting objects in watchcache.
And my tests show this is `PodToSelectableFields` is responsible for ~10% of memory allocations.
This PR is supposed to fix that - let's double check by running kubemark-big on it.
2018-02-15 07:20:51 -08:00
Wojciech Tyczynski 87a65b6c93 Store labels and fields with object 2018-02-15 14:56:33 +01:00
Michael Taufen d8cc440dd6 Rename ConfigOK to KubeletConfigOk
This is a more accurate name for the condition, as it describes the
status of the Kubelet's configuration.

Also cleans up capitalization of internal names.
2018-02-14 19:36:52 -08:00
Mike Danese 83c1334e51 apiserver: fix some typos from refactor
introduced in #59582
2018-02-14 17:47:45 -08:00
Kubernetes Submit Queue f33e0b33f4
Merge pull request #56717 from roycaihw/dynamic_subresource
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>.

Dynamic client supports subresources

**What this PR does / why we need it**:
Allows `resource.name` to be a subresource which contains `"/"` in db2977fb11/staging/src/k8s.io/client-go/dynamic/client.go (L143)

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

**Special notes for your reviewer**:
The change is backward compatible. 

**Release note**:

```release-note
NONE
```

/sig api-machinery
2018-02-14 11:14:43 -08:00
Davanum Srinivas 375360312a Update to latest gophercloud/gophercloud
Looks like we end up with the following changes:
1a43566306cb8cebad8cae85c67b15b3c254f316 - Prevent Recursive BuildRequestBody
debc1adf8e41fb5c5b7e2021a1be0b4d0c78318a - Networking v2: Create Floating IP with Subnet
1db95d798aa72ec12a6e60e40749cea56073d2fb - Compute v2: Add unit tests for Ephemeral field
0b8b348f5ad19aa4513ad9f8ad24f766a6623ad9 - compute: flavors: add Ephemeral attribute
8a6dfa8264e8b64523272c7a205e5f08bb6c118f - Compute v2: Flavor Access Remove (#688)
35ab3f13f69349f99ba8b9c9c36a7031ae2963dd - Flavor Extra Spec Update
800a4c0d57fbe8403b0bb6f13a8340c8fc990ad5 - Flavor Extra Spec Delete
be3fd7845c1928cbc5bbe289f2e39f5dec2e7278 - Flavor Extra Specs Create
c2cafb46bb409768f420742757949fd05fb1d704 - Flavor Extra Specs: List / Get (#686)
7b1b87753c31d4900587840774a019bbfa770698 - Compute v2: Flavor Access Add (#687)
1a43566306cb8cebad8cae85c67b15b3c254f316 - Prevent Recursive BuildRequestBody
debc1adf8e41fb5c5b7e2021a1be0b4d0c78318a - Networking v2: Create Floating IP with Subnet

The full set of changes between the old and new SHA are here:
8e59687aa4...6da026c32e
2018-02-14 14:02:57 -05:00
steveperry-53 cc7cea74ae Merge branch 'master' into ipv6 2018-02-14 10:45:27 -08:00
Kubernetes Submit Queue 5f7b530d87
Merge pull request #59825 from dcbw/remove-deltafifo-compressor
Automatic merge from submit-queue (batch tested with PRs 59832, 59825). 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 unused DeltaFIFO compressor argument to NewDeltaFIFO

Nobody uses it; the one or two older users from 1.4/1.5 timeframe
were removed for 1.6.  It's also poorly understood and the sole
example is in the testcases, and it's pretty incomplete.

If anyone really wants compression, they can revert this PR.

Earlier pull was https://github.com/kubernetes/kubernetes/pull/43475 which was blocked on some downstream users, which have now removed their usage of the compressor.

@ncdc @deads2k 

```release-note
NONE
```
2018-02-14 07:35:37 -08:00
Kubernetes Submit Queue d89e64110a
Merge pull request #59716 from feiskyer/vmss-disk
Automatic merge from submit-queue (batch tested with PRs 59489, 59716). 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 AzureDisk support for vmss nodes

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

This PR adds AzureDisk support for vmss nodes. Changes include

- Upgrade vmss API to 2017-12-01
- Upgrade vmss clients with new version API
- Abstract AzureDisk operations for vmss and vmas
- Added AzureDisk support for vmss
- Unit tests and fake clients fix
 
**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 #43287

**Special notes for your reviewer**:

~~Depending on #59652 (the first two commits are from #59652).~~

**Release note**:

```release-note
Add AzureDisk support for vmss nodes
```
2018-02-14 00:14:34 -08:00
Kubernetes Submit Queue 6590ea6d5d
Merge pull request #59828 from krousey/shared_informer_race
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 a race condition in SharedInformer

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

This fixes a race condition that can occur in the `sharedIndexInformer`

**Which issue(s) this PR fixes**:
Fixes #59822

**Release note**:

```release-note
Fixed a race condition in k8s.io/client-go/tools/cache.SharedInformer that could violate the sequential delivery guarantee and cause panics on shutdown.
```
2018-02-13 16:02:44 -08:00
Kubernetes Submit Queue 2a8049890a
Merge pull request #59492 from dims/remove-old-keystone-authenticator
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 experimental keystone authenticator

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

experimental-keystone-url and experimental-keystone-ca-file were always
experimental. So we don't need a deprecation period.
KeystoneAuthenticator was on the server side and needed userid/password
to be passed in and used that to authenticate with Keystone. We now
have authentication and authorization web hooks that can be used. There
is a external repo with a webook for keystone which works fine along
with the kubectl auth provider that was added in:
a0cebcb559

So we don't need this older style / hard coded / experimental code
anymore.

**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
kube-apiserver: the experimental in-tree Keystone password authenticator has been removed in favor of extensions that enable use of Keystone tokens.
```
2018-02-13 14:14:45 -08:00
Dan Williams a56c8f50cb Remove unused DeltaFIFO compressor argument to NewDeltaFIFO
Nobody uses it; the one or two older users from 1.4/1.5 timeframe
were removed for 1.6.  It's also poorly understood and the sole
example is in the testcases, and it's pretty incomplete.

If anyone really wants compression, they can revert this PR.
2018-02-13 13:41:48 -06:00
Kris 3c36d9e373 Add started state to the processor to protect against double starts
This prevents a race condition where the sharedIndexInformer was
causeing the processorListener's run and pop method to be started
twice. That violated the SharedInformer's interface guarantee of
sequential delivery and also caused panics on shutdown.
2018-02-13 11:38:54 -08:00
Kris be482ad51c Add a test case for the race in #59822 2018-02-13 11:38:54 -08:00
Kubernetes Submit Queue bd6b71d015
Merge pull request #59582 from sttts/sttts-ctrl-mgr-auth
Automatic merge from submit-queue (batch tested with PRs 59653, 58812, 59582, 59665, 59511). 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>.

controller-manager: switch to options+config pattern and add https+auth

This PR switch the {kube,cloud}-controller-managers to use the Options+Config struct pattern for bootstrapping, as we use it throughout all apiservers. This allows us to easily plug in https and authn/z support.

Fixes parts of https://github.com/kubernetes/kubernetes/issues/59483

This is equivalent to https://github.com/kubernetes/kubernetes/pull/59408 after squashing.

```release-note
Deprecate insecure HTTP port of kube-controller-manager and cloud-controller-manager. Use `--secure-port` and `--bind-address` instead.
```
2018-02-13 11:12:47 -08:00
Kubernetes Submit Queue 46df831351
Merge pull request #56478 from hzxuzhonghu/fix-admissionregistration
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>.

admissionregistration use shared informer instead of poll

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

poll with 1s interval influence apiserver's performance

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-13 09:10:45 -08:00
Karol Wychowaniec 40935568c5 Remove duplicated definition of ResourceList in Metrics API 2018-02-13 16:27:52 +01:00
Kubernetes Submit Queue f61b4a4e4a
Merge pull request #59779 from timothysc/timothysc
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 myself (timothysc) from OWNERS files on areas that I do not maintain

I do not actively participate in api-machinery, so I'm removing myself from the OWNERS files.  

/cc @ncdc
2018-02-13 07:15:36 -08:00
Kubernetes Submit Queue da0e30a278
Merge pull request #58937 from hzxuzhonghu/pass-listener
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>.

pass listener in integration test

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

pass listener to `SecureServingOptions` to prevent port in use flake.
partially fix #58936

**Special notes for your reviewer**:

/assign @liggitt @sttts @caesarxuchao 

**Release note**:

```release-note
NONE
```
2018-02-13 06:22:53 -08:00
Kubernetes Submit Queue 10f2544ec8
Merge pull request #55306 from hzxuzhonghu/audit
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>.

Audit support resource wildcard matching 

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

audit policy support "resource/subresources" wildcard matching "resource/*", "*/subresource","*"

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

**Special notes for your reviewer**:

**Release note**:

```release-note
[advanced audit] support subresources wildcard matching.
```
2018-02-13 05:38:25 -08:00
hzxuzhonghu a6c43c6a5c pass listener in integration test to prevent port in use flake 2018-02-13 20:46:43 +08:00
Nikhita Raghunath c7d67ad1ee staging: add boilerplate header 2018-02-13 16:50:05 +05:30
Dr. Stefan Schimanski 5483ab7679 Update generated files 2018-02-13 11:16:48 +01:00
Dr. Stefan Schimanski cecd663c21 controller-manager: add authz/n to options, nil by default 2018-02-13 11:16:48 +01:00
Dr. Stefan Schimanski 4e0114b0dd apiserver: make SecureServingOptions and authz/n options re-usable 2018-02-13 11:16:38 +01:00
Nikhita Raghunath 8f898a3763 code-generator: add boilerplate header
Currently, the boilerplate header from k8s.io/kubernetes
is used. If k8s.io/kubernetes is not in the GOPATH, a
panic will occur.

To fix this, we first calculate the relative path to
k8s.io/code-generator and then use the boilerplate from
code-generator. This avoids hard coding the path and
works well for all repos.
2018-02-13 12:34:54 +05:30
Timothy St. Clair da77826d08 Remove myself (timothysc) from OWNERS files on areas that I do not
actively maintain.
2018-02-12 18:56:41 -06:00
Haowei Cai e10cdb3b0f Dynamic client support subresource create/get/update/patch verbs 2018-02-12 16:56:03 -08:00
Zihong Zheng 44a64edc54 Auto-generated files for CustomPodDNS Beta API 2018-02-12 13:55:10 -08:00
Zihong Zheng 1a60276b6e Promote configurable pod resolv.conf (CustomPodDNS) to Beta 2018-02-12 13:54:21 -08:00
Pengfei Ni 1d3cf76d75 Fix godeps for client-go 2018-02-12 14:07:05 +08:00
Wang Guoliang d065157dd7 fix some syntax related errors 2018-02-11 19:50:49 +08:00
Kubernetes Submit Queue 317853c90c
Merge pull request #59464 from dixudx/fix_all_typos
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 all the typos across the project

**What this PR does / why we need it**:
There are lots of typos across the project. We should avoid small PRs on fixing those annoying typos, which is time-consuming and low efficient.

This PR does fix all the typos across the project currently. And with #59463, typos could be avoided when a new PR gets merged.

**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**:
/sig testing
/area test-infra
/sig release
/cc @ixdy 
/assign @fejta 

**Release note**:

```release-note
None
```
2018-02-10 22:12:45 -08:00
Di Xu 521146e62d auto-generated 2018-02-11 11:04:15 +08:00
Di Xu 48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
Kubernetes Submit Queue 72896f6e0b
Merge pull request #59389 from Lihua93/patch-1
Automatic merge from submit-queue (batch tested with PRs 59447, 59594, 59651, 59389). 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: constucts -> constructs

**What this PR does / why we need it**:
To fix doc typo

**Release note**:
```release-note
NONE
```
2018-02-09 12:21:39 -08:00
Kubernetes Submit Queue 5898d63092
Merge pull request #59594 from liggitt/wait-for-patch
Automatic merge from submit-queue (batch tested with PRs 59447, 59594, 59651, 59389). 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>.

Workaround patch using cached version in TestPatch

Deflakes https://github.com/kubernetes/kubernetes/issues/42644 but does not resolve the underlying issue

```release-note
NONE
```
2018-02-09 12:21:32 -08:00
Jordan Liggitt cb24bd03f7
Workaround patch using cached version in TestPatch 2018-02-09 12:30:39 -05:00
Vladimir Vivien b5deaf6136 CSI - Auto-generated code updates 2018-02-09 11:10:42 -05:00
Vladimir Vivien 18722910eb CSI - Marking CSIPersistentVolumeSource Beta 2018-02-09 11:10:42 -05:00
Kubernetes Submit Queue 8eae0a8a37
Merge pull request #57682 from nikhita/customresource-metrics
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>.

Collect prometheus metrics for custom resources

Enables apiserver metrics for custom resources.

Fixes #55146

**Release note**:

```release-note
Enable apiserver metrics for custom resources.
```

/cc sttts deads2k kargakis brancz
2018-02-09 02:18:45 -08:00
Kubernetes Submit Queue 53207e1be6
Merge pull request #55684 from wu-qiang/kms-plugin-grpc-api
Automatic merge from submit-queue (batch tested with PRs 58437, 59490, 55684). 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>.

gRPC-based KMS plugin service

**What this PR does / why we need it**:
Implement for issue https://github.com/kubernetes/kubernetes/issues/51965
**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 #51965

**Special notes for your reviewer**:
@destijl @sakshamsharma @deads2k @ericchiang
The implementation based on the document https://docs.google.com/document/d/1S_Wgn-psI0Z7SYGvp-83ePte5oUNMr4244uanGLYUmw/edit
**Release note**:

```release-note
Implement envelope service with gRPC, so that KMS providers can be pulled out from API server.
```
2018-02-08 21:34:41 -08:00
Wu Qiang 31f74303fc Update endpoint value in test code 2018-02-09 01:29:17 +00:00
Kubernetes Submit Queue 9a3d2795ed
Merge pull request #57143 from sttts/sttts-clientgen-no-base-dirs
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>.

client-gen: remove base input dirs

Were these dirs some kind of cargo cult? Removing them causes no change to the generated code.

Background: having those packages in the list of input dirs makes them mandatory to exist. If people use code-gen on a project that does not vendor them (due to vendor/ pruning), code-gen fails.

Fixes https://github.com/kubernetes/sample-controller/issues/8
2018-02-08 07:09:58 -08:00
Kubernetes Submit Queue b5387effe8
Merge pull request #58867 from hzxuzhonghu/fix-cors-test-bug
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 using defer in loop in cors test

**What this PR does / why we need it**:
fix bug in cors test


**Special notes for your reviewer**:
a small bug fix, wrap defer in a closure
**Release note**:

```release-note
NONE
```
2018-02-08 05:34:20 -08:00
Nikhita Raghunath 60438762d1 update staging godeps 2018-02-08 17:06:07 +05:30
Nikhita Raghunath 74cd45fb21 Collect prometheus metrics for custom resources
Since we have a custom handler for apiextensions-apiserver,
we need to record the metrics here.
2018-02-08 17:06:07 +05:30
Kubernetes Submit Queue b309c2f4f0
Merge pull request #59410 from fisherxu/testapigroup
Automatic merge from submit-queue (batch tested with PRs 57824, 58806, 59410, 59280). 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 some package to code-generator

**What this PR does / why we need it**:
add some package to code-generator and regenerated files.

**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**:
/cc @sttts 

**Release note**:

```release-note
NONE
```
2018-02-08 03:29:39 -08:00
Kubernetes Submit Queue db1ed10534
Merge pull request #58806 from CaoShuFeng/audit_annotation_api
Automatic merge from submit-queue (batch tested with PRs 57824, 58806, 59410, 59280). 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 Annotations to advanced audit api

**Release note**:
```release-note
Annotations is added to advanced audit api
```
2018-02-08 03:29:36 -08:00
Kubernetes Submit Queue fb340a4695
Merge pull request #57824 from thockin/gcr-vanity
Automatic merge from submit-queue (batch tested with PRs 57824, 58806, 59410, 59280). 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>.

2nd try at using a vanity GCR name

The 2nd commit here is the changes relative to the reverted PR.  Please focus review attention on that.

This is the 2nd attempt.  The previous try (#57573) was reverted while we
figured out the regional mirrors (oops).
    
New plan: k8s.gcr.io is a read-only facade that auto-detects your source
region (us, eu, or asia for now) and pulls from the closest.  To publish
an image, push k8s-staging.gcr.io and it will be synced to the regionals
automatically (similar to today).  For now the staging is an alias to
gcr.io/google_containers (the legacy URL).
    
When we move off of google-owned projects (working on it), then we just
do a one-time sync, and change the google-internal config, and nobody
outside should notice.
    
We can, in parallel, change the auto-sync into a manual sync - send a PR
to "promote" something from staging, and a bot activates it.  Nice and
visible, easy to keep track of.

xref https://github.com/kubernetes/release/issues/281

TL;DR:
  *  The new `staging-k8s.gcr.io` is where we push images.  It is literally an alias to `gcr.io/google_containers` (the existing repo) and is hosted in the US.
  * The contents of `staging-k8s.gcr.io` are automatically synced to `{asia,eu,us)-k8s.gcr.io`.
  * The new `k8s.gcr.io` will be a read-only alias to whichever regional repo is closest to you.
  * In the future, images will be promoted from `staging` to regional "prod" more explicitly and auditably.

 ```release-note
Use "k8s.gcr.io" for pulling container images rather than "gcr.io/google_containers".  Images are already synced, so this should not impact anyone materially.
    
Documentation and tools should all convert to the new name. Users should take note of this in case they see this new name in the system.
```
2018-02-08 03:29:32 -08:00
Dr. Stefan Schimanski ed1b01090d client-gen: remove base input dirs 2018-02-08 12:20:19 +01:00
hzxuzhonghu b835c46c86 fix using defer in loop in cors test 2018-02-08 19:17:38 +08:00
hzxuzhonghu ea7a713010 run update bazel staging-dep 2018-02-08 19:10:11 +08:00
hzxuzhonghu ec39259785 add wait ready for mutating/validating webhook configuration 2018-02-08 19:10:09 +08:00
hzxuzhonghu f287527442 admission registration use shared informer instead of poll 2018-02-08 19:08:19 +08:00
Tim Hockin 3586986416 Switch to k8s.gcr.io vanity domain
This is the 2nd attempt.  The previous was reverted while we figured out
the regional mirrors (oops).

New plan: k8s.gcr.io is a read-only facade that auto-detects your source
region (us, eu, or asia for now) and pulls from the closest.  To publish
an image, push k8s-staging.gcr.io and it will be synced to the regionals
automatically (similar to today).  For now the staging is an alias to
gcr.io/google_containers (the legacy URL).

When we move off of google-owned projects (working on it), then we just
do a one-time sync, and change the google-internal config, and nobody
outside should notice.

We can, in parallel, change the auto-sync into a manual sync - send a PR
to "promote" something from staging, and a bot activates it.  Nice and
visible, easy to keep track of.
2018-02-07 21:14:19 -08:00
hzxuzhonghu 08c024f367 run hack/update-all.sh 2018-02-08 09:41:46 +08:00
hzxuzhonghu cc135e985c add test case 2018-02-08 09:41:41 +08:00
hzxuzhonghu 6e83d88be9 audit support wildcard matching subresources 2018-02-08 09:41:38 +08:00
Wu Qiang 9825018e4a Add generated script for kms api pb file 2018-02-08 01:00:38 +00:00
Wu Qiang 5ae61ed386 Remove configfile for kms in encryption config 2018-02-08 01:00:38 +00:00
Wu Qiang 2e7af38d6b Update for review comments 2018-02-08 01:00:38 +00:00
Wu Qiang a6368bb04c Only support unix socket for kms gRPC, also add Version method 2018-02-08 01:00:38 +00:00
Wu Qiang 16b04d68b1 Fix verify error and address review comments
Signed-off-by: Wu Qiang <qiang.q.wu@oracle.com>
2018-02-08 01:00:38 +00:00
Wu Qiang 31fb539f17 Update kms provider config for gRPC client service 2018-02-08 01:00:38 +00:00
Wu Qiang 772fa0f62f Add gRPC client service for envelope transformer 2018-02-08 01:00:38 +00:00
Davanum Srinivas 18590378c4 Remove experimental keystone authenticator
experimental-keystone-url and experimental-keystone-ca-file were always
experimental. So we don't need a deprecation period.
KeystoneAuthenticator was on the server side and needed userid/password
to be passed in and used that to authenticate with Keystone. We now
have authentication and authorization web hooks that can be used. There
is a external repo with a webook for keystone which works fine along
with the kubectl auth provider that was added in:
a0cebcb559

So we don't need this older style / hard coded / experimental code
anymore.
2018-02-07 19:28:55 -05:00
Kubernetes Submit Queue 1f6251444b
Merge pull request #51042 from soltysh/request_timeout
Automatic merge from submit-queue (batch tested with PRs 59276, 51042, 58973, 59377, 59472). 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>.

Allow passing request-timeout from NewRequest all the way down

**What this PR does / why we need it**:
Currently if you pass `--request-timeout` it's not passed all the way down to the actual request object. There's a separate field on the `Request` object that allows setting that timeout, but it's not taken from that flag. 

@smarterclayton @deads2k ptal, this is coming from https://github.com/openshift/origin/pull/13701
2018-02-07 12:00:44 -08:00
Maciej Szulik 7da1002091 Allow passing request-timeout from NewRequest all the way down to actual request 2018-02-07 16:02:26 +01:00
Jordan Liggitt 17f18fa07a
Indicate endpoint subsets are an optional field 2018-02-07 09:29:16 -05:00
hangaoshuai 3cbd8e2132 fix todo: use selector.DeepCopy replace of hard code 2018-02-07 19:09:05 +08:00
fisherxu c6499e8db3 delete unused generated file 2018-02-07 15:21:51 +08:00
Kubernetes Submit Queue 1f3c66fba7
Merge pull request #59437 from mikedanese/id-api
Automatic merge from submit-queue (batch tested with PRs 58444, 59283, 59437, 59325, 59449). 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>.

authentication: remove TokenRequest from authentication.k8s.io/v1beta1

We don't actually need v1beta1 TokenRequest so should we leave the API group sparse?

https://github.com/kubernetes/kubernetes/issues/58790

```release-note
NONE
```
2018-02-06 22:42:38 -08:00
Kubernetes Submit Queue f99ed35b28
Merge pull request #58444 from bsalamat/update_prio
Automatic merge from submit-queue (batch tested with PRs 58444, 59283, 59437, 59325, 59449). 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 PriorityClassName API doc

**What this PR does / why we need it**: It updates the comment (and hence API doc) for PriorityClassName of PodSpec.

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

/sig scheduling
2018-02-06 22:42:33 -08:00
fisherxu cf830cb973 regenerated files 2018-02-07 11:19:31 +08:00
fisherxu 0c4e0aee80 add k8s:conversion-gen to internalversion 2018-02-07 11:19:31 +08:00
Bobby (Babak) Salamat 646ee95213 autogenerated files 2018-02-06 17:55:14 -08:00
Bobby (Babak) Salamat 9493f5fceb Update PriorityClassName API doc 2018-02-06 17:44:18 -08:00
Mike Danese 33a8f39a03 authentication: remove TokenRequest from authentication.k8s.io/v1beta1
We don't actually need that type so leave the API group sparse.
2018-02-06 14:07:08 -08:00
Kubernetes Submit Queue b2c1e5de11
Merge pull request #58562 from MikeSpreitzer/issue-58558
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>.

Clarify that ListOptions.Timeout is not conditional on inactivity

**What this PR does / why we need it**:
Clarifies the meaning of the `Timeout` field of a `ListOptions`, because the name and existing description can reasonably be interpreted to mean something divergent from the actual behavior.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-06 12:44:23 -08:00
Kubernetes Submit Queue 4bd22b5467
Merge pull request #58415 from gnufied/fix-volume-resize-messages
Automatic merge from submit-queue (batch tested with PRs 52942, 58415). 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>.

Improve messaging on volume expansion

- we now provide clear message to user what to do when cloudprovider resizing is finished
  and file system resizing is needed.
- add a event when resizing is successful
- Use PATCH both in controller-manager and kubelet for updating PVC status
- Remove code duplication between controller-manager and kubelet for updating PVC status
- Only remove conditions that are managed by resize controller



```release-note
Improve messages user gets during and after volume resizing is done.
```
2018-02-06 07:55:32 -08:00
fisherxu 44fa4c0ff0 add testapigroup of apimachinery to go-to-protobuf 2018-02-06 17:24:05 +08:00
Cao Shufeng 9a7acaae1d fix invalid match rules for advanced audit policy
When users or groups are set in a rule, this rule should not match
attribute with unauthorized request where user and group are nil.
2018-02-06 14:53:43 +08:00
Kubernetes Submit Queue 5aa68f528f
Merge pull request #58027 from mikedanese/id-api
Automatic merge from submit-queue (batch tested with PRs 55986, 59375, 59334, 59348, 58027). 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 minimal types for service account TokenRequest API

Adds parts of the types in https://github.com/kubernetes/community/pull/1460. ValidityDuration is omitted because we are still discussing how to surface non-expiring tokens but it should be easy to add in a backwards compatibly.

#58790

@kubernetes/sig-auth-api-reviews
2018-02-05 21:14:43 -08:00
Lihua Tang 7671c0c6bc
Fix typo: constucts -> constructs 2018-02-06 10:36:57 +08:00
Kubernetes Submit Queue 4e2c3f060a
Merge pull request #58317 from nikhita/bump-go-yaml
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>.

bump(670d4c): gopkg.in/yaml.v2: fix parsing for non-specific tags

Fixes #56976

Fixes this bug - https://github.com/go-yaml/yaml/issues/75 - in `go-yaml`. The fix for this bug is at 670d4cfef0.

**Release note**:

```release-note
NONE
```

/cc sttts caesarxuchao jennybuckley
2018-02-05 18:22:21 -08:00
Mikhail Mazurskiy 03fc8dedb1
Use direct struct comparison, not reflection
Also use constant instead of hardcoding internal version
2018-02-06 13:06:47 +11:00
Mike Spreitzer b43dc4fac2 Clarify that ListOptions.Timeout is not conditional on inactivity
Fixes #58558
2018-02-05 17:04:03 -05:00
Kubernetes Submit Queue 9ee71b720e
Merge pull request #59059 from smarterclayton/move_partial_object
Automatic merge from submit-queue (batch tested with PRs 59158, 38320, 59059, 55516, 59357). 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>.

Promote v1alpha1 meta to v1beta1

No code changes, just renames. We can discuss if there are any field / naming changes here or in a follow-up

Parent #58536
Fixes #53224
Prereq to #55637

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

```release-note
The `meta.k8s.io/v1alpha1` objects for retrieving tabular responses from the server (`Table`) or fetching just the `ObjectMeta` for an object (as `PartialObjectMetadata`) are now beta as part of `meta.k8s.io/v1beta1`.  Clients may request alternate representations of normal Kubernetes objects by passing an `Accept` header like `application/json;as=Table;g=meta.k8s.io;v=v1beta1` or `application/json;as=PartialObjectMetadata;g=meta.k8s.io;v1=v1beta1`.  Older servers will ignore this representation or return an error if it is not available.  Clients may request fallback to the normal object by adding a non-qualified mime-type to their `Accept` header like `application/json` - the server will then respond with either the alternate representation if it is supported or the fallback mime-type which is the normal object response.
```
2018-02-05 12:40:37 -08:00
Kubernetes Submit Queue 0656d030a7
Merge pull request #38320 from liggitt/golang-ratelimit
Automatic merge from submit-queue (batch tested with PRs 59158, 38320, 59059, 55516, 59357). 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>.

Switch from juju/ratelimit to golang.org/x/time/rate

Replaces juju/ratelimit with golang.org/x/time/rate
xref https://github.com/kubernetes/steering/issues/21

Requires removing the Saturation() method on the rate limiter. In the process of attempting to contribute it to the `golang.org/x/time/rate` implementation, it became clear that what it was calculating was not very useful when combined with periodic polling. See discussion in https://go-review.googlesource.com/c/time/+/29958#message-4caffc11669cadd90e2da4c05122cfec50ea6a22

```release-note
NONE
```
2018-02-05 12:40:34 -08:00
Haowei Cai 8b03e77aec Add comments about potential race in delta fifo. 2018-02-05 12:32:27 -08:00
Mike Danese ee48da13fc autogenerated 2018-02-05 11:39:27 -08:00
Mike Danese 48959be848 add minimal types for service account TokenRequest API 2018-02-05 11:39:27 -08:00
Kubernetes Submit Queue 1105751cc7
Merge pull request #58926 from nikhita/fix-customresource-selflink
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 self link for cluster scoped custom resources

**What this PR does / why we need it**: Fixes self link for cluster scoped custom resources.

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

**Special notes for your reviewer**:

For the main apiserver:

e8225f5618/staging/src/k8s.io/apiserver/pkg/endpoints/installer.go (L408)

**Release note**:

```release-note
NONE
```

/assign sttts deads2k
2018-02-05 09:29:18 -08:00
Nikhita Raghunath 45950fdb75 core/v1 should be first in discovery order
Currently, core/v1 is in the end of the discovery order.

Since core/v1 is special, it should be in the beginning.
2018-02-05 15:04:29 +05:30
Kubernetes Submit Queue c6e581ff42
Merge pull request #59195 from pigletfly/fix-typo
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 some typos

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

**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-02-04 08:00:38 -08:00
halfcrazy 86801dee64 fix typo in client-go 2018-02-04 21:48:42 +08:00
Kubernetes Submit Queue c52192f33b
Merge pull request #59265 from yue9944882/fix-irregular-docs-typo-ish
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(doc): irregular descriptive docs

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

Fixes documentations.

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

```
2018-02-04 01:55:04 -08:00
Cao Shufeng c512a078e9 run hack/update-all.sh 2018-02-04 15:35:42 +08:00
Cao Shufeng 97b0d99a33 add Annotations to audit event 2018-02-04 15:35:36 +08:00
Clayton Coleman b81f474554
When using the bootstrap cert, update the store
Otherwise, the certificate store will return nil the first time a store
cert is accessed. When background rotation is being used, prevents the
client from being nil.
2018-02-04 01:24:56 -05:00
Joe Betz f0d04b7131 Update etcd server version to 3.2.13 2018-02-02 17:25:13 -08:00
Clayton Coleman d07a608607 Promote v1alpha1 meta to v1beta1
No code changes, just renames
2018-02-02 14:00:45 -05:00
Kubernetes Submit Queue 21387af0b4
Merge pull request #58990 from bsalamat/nominated_node
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 NominatedNodeName field to PodStatus

**What this PR does / why we need it**:
Today, Scheduler uses an annotation called "nominated-node-name" to mark a preemptor Pod. This annotation helps scheduler know about the Pods that are destined to run on the nodes so that the resources made available by preemption is not allocated to a different Pod. In a recent discussion with @bgrant0607, we learned that we should change the annotation to a field as this field can be used by multiple schedulers and other components that may make scheduling-related decisions (descheduler, auto-scaler, kube-arbitrator, ...). 


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

**Special notes for your reviewer**:

**Release note**:

```release-note
Add "nominatedNodeName" field to PodStatus. This field is set when a pod preempts other pods on the node.
```
/sig scheduling
2018-02-02 07:26:16 -08:00
Kubernetes Submit Queue 11576c3650
Merge pull request #59198 from liubin/fix1
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 typos

Fix typos in source code's comment.
2018-02-02 05:17:21 -08:00
yue9944882 dc2f6f9325 fix irregular descriptive docs 2018-02-02 21:05:49 +08:00
Mikhail Mazurskiy cd8fd313bb
Conversion from typed to unstructured should set GVK 2018-02-02 23:26:04 +11:00
Kubernetes Submit Queue 8363129ee6
Merge pull request #58462 from NickrenREN/va-to-beta
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 V1beta1 VolumeAttachment API

**What this PR does / why we need it**:
Add V1beta1 VolumeAttachment API, co-existing with Alpha API object

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

**Special notes for your reviewer**:

**Release note**:
```release-note
Add V1beta1 VolumeAttachment API, co-existing with Alpha API object
```
2018-02-01 18:50:25 -08:00
Kubernetes Submit Queue 06472a054a
Merge pull request #58930 from smarterclayton/background_rotate
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>.

Only rotate certificates in the background

Change the Kubelet to not block until the first certs have rotated (we didn't act on it anyway) and fall back to the bootstrap cert if the most recent rotated cert is expired on startup.

The certificate manager originally had a "block on startup" rotation behavior to ensure at least one rotation happened on startup. However, since rotation may not succeed within the first time window the code was changed to simply print the error rather than return it. This meant that the blocking rotation has no purpose - it cannot cause the kubelet to fail, and it *does* block the kubelet from starting static pods before the api server becomes available.

The current block behavior causes a bootstrapped kubelet that is also set to run static pods to wait several minutes before actually launching the static pods, which means self-hosted masters using static pods have a pointless delay on startup.

Since blocking rotation has no benefit and can't actually fail startup, this commit removes the blocking behavior and simplifies the code at the same time. The goroutine for rotation now completely owns the deadline, the shouldRotate() method is removed, and the method that sets rotationDeadline now returns it. We also explicitly guard against a negative sleep interval and omit the message.

Should have no impact on bootstrapping except the removal of a long delay on startup before static pods start.

The other change is that an expired certificate from the cert manager is *not* considered a valid cert, which triggers an immediate rotation.  This causes the cert manager to fall back to the original bootstrap certificate until a new certificate is issued.  This allows the bootstrap certificate on masters to be "higher powered" and allow the node to function prior to initial approval, which means someone configuring the masters with a pre-generated client cert can be guaranteed that the kubelet will be able to communicate to report self-hosted static pod status, even if the first client rotation hasn't happened.  This makes master self-hosting more predictable for static configuration environments.

```release-note
When using client or server certificate rotation, the Kubelet will no longer wait until the initial rotation succeeds or fails before starting static pods.  This makes running self-hosted masters with rotation more predictable.
```
2018-02-01 12:05:15 -08:00
steveperry-53 1a530d1884 Add IPv6 to ref page descriptions. 2018-02-01 19:29:54 +00:00
Kubernetes Submit Queue 7d07810c6d
Merge pull request #59140 from halfcrazy/typo-apiserver
Automatic merge from submit-queue (batch tested with PRs 57683, 59116, 58728, 59140, 58976). 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>.

doc: fix typo in package apiserver

**What this PR does / why we need it**:
fix typo in package apiserver

**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-02-01 07:04:43 -08:00
Kubernetes Submit Queue a7a3dcfc52
Merge pull request #59037 from hzxuzhonghu/aggregator-api
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>.

refactor aggregator api group install

**What this PR does / why we need it**:
refactor aggregator apigroup install. move NewRESTStorage to 
`staging/src/k8s.io/kube-aggregator/pkg/registry/apiservice/rest/storage_apiservice.go`

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-01 04:35:10 -08:00
bin liu 4260bf2a2b Fix typos 2018-02-01 19:53:51 +08:00
pigletfly 5eba676508 Fix typo 2018-02-01 19:11:19 +08:00
Kubernetes Submit Queue ca17c82b37
Merge pull request #58865 from hzxuzhonghu/fix-filters-typos
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 some typos in apiserver filters

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

fix some typos

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-01 02:31:45 -08:00
Kubernetes Submit Queue f96ac05774
Merge pull request #59062 from mtaufen/fix-pod-pids-limit
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 PodPidsLimit and ConfigTrialDuration on internal KubeletConfig type

They should both follow the convention of not being a pointer on the internal type. 

This required adding a conversion function between `int64` and `*int64`. A side effect is this removes a warning in the generated code for the apps API group.

@dims

```release-note
NONE
```
2018-02-01 01:45:55 -08:00
Kubernetes Submit Queue 5d457dbd3c
Merge pull request #58940 from hanxiaoshuai/bugfix
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>.

pass listener in apiextentions-apiserver test to prevent port in use …

**What this PR does / why we need it**:
pass listener to SecureServingOptions to prevent port in use flake.
**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 #
partially fix [58936](https://github.com/kubernetes/kubernetes/issues/58936)
**Special notes for your reviewer**:
/assign @hzxuzhonghu @liggitt @sttts @caesarxuchao
2018-02-01 00:56:43 -08:00
halfcrazy 0da91a8577 fix typo in package apiserver 2018-02-01 03:04:33 +08:00
Kubernetes Submit Queue 4ce4bdc82c
Merge pull request #59061 from nikhita/crds-is-a-thing
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 crds as CustomResourceDefinition shortname

See https://github.com/kubernetes/apiextensions-apiserver/issues/6#issuecomment-361539766.
Fixes kubernetes/apiextensions-apiserver#6

Before:

```
➜  kubectl get crds
the server doesn't have a resource type "crds"
```

After:

```
➜  kubectl get crds
No resources found.
```


**Release note**:

```release-note
 `crds` is added as a shortname for CustomResourceDefinition i.e. `kubectl get crds` can now be used.
```

/cc sttts deads2k soltysh pwittrock
2018-01-31 05:48:41 -08:00
hzxuzhonghu 2742d1e42d refactor kube-aggregator api group install 2018-01-31 21:38:47 +08:00
Kubernetes Submit Queue a241087f99
Merge pull request #57457 from vfreex/fix-port-forward-ipv6
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>.

client-go: Fix broken TCP6 listen for port forwarding

**What this PR does / why we need it**:
The IPV6 loopback address `::1` is enclosed in square brackets twice,
which cause a failure to listen on the TCP6 port.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Fix an issue where port forwarding doesn't forward local TCP6 ports to the pod
```
/area ipv6
/sig cli
2018-01-31 04:06:46 -08:00
Kubernetes Submit Queue 8f71d6d840
Merge pull request #58598 from WanLinghao/rbac_improve
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 a comment on specical  case on authorization  

In file /staging/src/k8s.io/apiserver/pkg/endpoints/filters/authorization.go, 
function WithAuthorization() returns DecisionAllow before error check.
It is intentional to avoid leaking authorization errors to attackers.
This patch add a comment here to give a hint



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

**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-01-31 03:23:16 -08:00
NickrenREN 8915e275c0 update all 2018-01-31 18:45:49 +08:00
Nikhita Raghunath 1fd07e1978 sample-controller: document minimum kube version
The sample-controller uses apps/v1 deployments
since they became GA in 1.9. This means that
sample-controller does not support versions below 1.9.
2018-01-31 15:16:41 +05:30
NickrenREN d45a41807e Add Beta VolumeAttachment API 2018-01-31 17:38:11 +08:00
Kubernetes Submit Queue f3942e7ded
Merge pull request #58817 from karlhungus/bugfix_yaml_decoder_short_buf
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 test/fix for ErrShortBuffer edgecase

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

Found a bug with YAMLToJSONDecoder where subsequent reads after `io.ErrShortBuffer` would return values from the next yaml section, rather than the rest of the section I was reading.

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

https://github.com/kubernetes/kubernetes/issues/59055

**Special notes for your reviewer**:

**Release note**:

```release-note
YAMLDecoder Read now tracks rest of buffer on io.ErrShortBuffer
```
2018-01-31 00:18:03 -08:00
WanLinghao 983435bdce modified: staging/src/k8s.io/apiserver/pkg/endpoints/filters/authorization.go 2018-01-31 14:21:42 +08:00
hzxuzhonghu b9308355a6 fix some typos in filters 2018-01-31 09:37:02 +08:00
Bobby (Babak) Salamat 74706546e9 Autogenerated files 2018-01-30 13:13:57 -08:00
Bobby (Babak) Salamat 384a86caa9 Add NominatedNodeName to PodStatus 2018-01-30 13:13:57 -08:00
Michael Taufen da41a6e793 Fix PodPidsLimit and ConfigTrialDuration on internal KubeletConfig type
They should both follow the convention of not being a pointer on the
internal type. This required adding a conversion function between
`int64` and `*int64`.

A side effect is this removes a warning in the generated code for the
apps API group.
2018-01-30 11:43:41 -08:00
Nikhita Raghunath ba8488559d Add crds as CustomResourceDefinition shortname 2018-01-31 00:21:47 +05:30
Izaak Alpert 6100c7fe3f
Add test/fix for ErrShortBuffer edgecase 2018-01-30 13:34:44 -05:00
Kubernetes Submit Queue 7cd474f524
Merge pull request #58914 from hzxuzhonghu/customresource_handler
Automatic merge from submit-queue (batch tested with PRs 58914, 58933). 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 GetCustomResourceListerCollectionDeleter comments

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

fix  https://github.com/kubernetes/kubernetes/pull/58688#discussion_r163865115



**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-01-30 08:36:31 -08:00
hzxuzhonghu 24c687fdad deprecate insecure http flags and remove already deprecated public-address-override 2018-01-30 16:05:33 +08:00
lichuqiang fde4f6f9b0 resourceQuota support for extended resources 2018-01-30 09:29:22 +08:00
Kubernetes Submit Queue 52c3ff3ab8
Merge pull request #58963 from deads2k/server-06-dead-etcdserver
Automatic merge from submit-queue (batch tested with PRs 58955, 58968, 58971, 58963, 58298). 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 dead testing code

Removes a deprecated etcd server init function and stops starting an etc server during unit tests that we never use.
2018-01-29 13:48:48 -08:00
Kubernetes Submit Queue 946b1f023f
Merge pull request #58971 from deads2k/client-01-prefix
Automatic merge from submit-queue (batch tested with PRs 58955, 58968, 58971, 58963, 58298). 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 dead prefix field

The `Prefix` field was never used.
2018-01-29 13:48:45 -08:00
Kubernetes Submit Queue d8f32b2917
Merge pull request #58968 from deads2k/server-07-deadarg
Automatic merge from submit-queue (batch tested with PRs 58955, 58968, 58971, 58963, 58298). 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 --tls-ca-file which had no effect

The flag has had no effect since we started configuring loopback based on the direct cert.  I've marked it deprecated this release so we don't break launch scripts right away, but its coming.  I think we should remove it in 1.11.


```release-note-action-required
kube-apiserver flag --tls-ca-file has had no effect for some time.  It is now deprecated and slated for removal in 1.11.  If you are specifying this flag, you must remove it from your launch config before ugprading to 1.11.
```
2018-01-29 13:48:42 -08:00
Kubernetes Submit Queue 5ab8f8cea9
Merge pull request #58863 from hzxuzhonghu/runtime-config-resource-remove
Automatic merge from submit-queue (batch tested with PRs 56995, 58498, 57426, 58902, 58863). 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>.

cleanup enable/disable api resources code

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

After #57228, `runtime-config` flag has stop support enable/disable resources of a specific groupVersion,
so this pr does some clean work about this.

Mainly delete unused code in  `k8s.io/apiserver/pkg/server/storage/resource_config.go`

**Special notes for your reviewer**:
/assign @deads2k  @sttts 
**Release note**:

```release-note
NONE
```
/kind cleanup
2018-01-29 12:37:47 -08:00
Hemant Kumar 1fa8cbc5e4 Improve messaging on resize
- we now provide clear message to user what to do when cloudprovider resizing is finished
  and file system resizing is needed.
- add a event when resizing is successful.
- Use Patch for updating PVCs in both kubelet and controller-manager
- Extract updating pvc util function in one place.
- Only update resize conditions on progress
2018-01-29 15:07:51 -05:00
Michael Taufen 4258926640 Kubelet flags take precedence
This changes the Kubelet configuration flag precedence order so that
flags take precedence over config from files/ConfigMaps.

See #56171 for rationale.

Note: Feature gates accumulate with the following
precedence (greater number overrides lesser number):
1. file-based config
2. dynamic cofig
3. flag-based config
2018-01-29 10:07:37 -08:00
David Eads e7b6d77c7e remove dead prefix field 2018-01-29 11:30:14 -05:00
David Eads 114711f77d remove --tls-ca-file which had no effect 2018-01-29 10:31:37 -05:00
David Eads 3e6bfcb5db remove dead testing code 2018-01-29 09:50:40 -05:00
hangaoshuai 293616ae9a pass listener in apiextentions-apiserver test to prevent port in use flake 2018-01-29 15:44:11 +08:00
Clayton Coleman 44493de195
Only rotate certificates in the background
The certificate manager originally had a "block on startup" rotation
behavior to ensure at least one rotation happened on startup. However,
since rotation may not succeed within the first time window the code was
changed to simply print the error rather than return it. This meant that
the blocking rotation has no purpose - it cannot cause the kubelet to
fail, and it *does* block the kubelet from starting static pods before
the api server becomes available.

The current block behavior causes a bootstrapped kubelet that is also
set to run static pods to wait several minutes before actually launching
the static pods, which means self-hosted masters using static pods have
a pointless delay on startup.

Since blocking rotation has no benefit and can't actually fail startup,
this commit removes the blocking behavior and simplifies the code at the
same time. The goroutine for rotation now completely owns the deadline,
the shouldRotate() method is removed, and the method that sets
rotationDeadline now returns it. We also explicitly guard against a
negative sleep interval and omit the message.

Should have no impact on bootstrapping except the removal of a long
delay on startup before static pods start.

Also add a guard condition where if the current cert in the store is
expired, we fall back to the bootstrap cert initially (we use the
bootstrap cert to communicate with the server). This is consistent with
when we don't have a cert yet.
2018-01-28 17:48:17 -05:00
Nikhita Raghunath 843aec994b Fix self link for cluster scoped custom resources 2018-01-28 12:17:00 +01:00
Kubernetes Submit Queue e8225f5618
Merge pull request #58878 from liggitt/deprecated-feature
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>.

Categorize deprecated feature gate more accurately

related to #58761

follow up from https://github.com/kubernetes/kubernetes/pull/57265 to clarify the status of the feature gate

```release-note
NONE
```
2018-01-27 12:40:45 -08:00
hzxuzhonghu d0d1e1dcc4 refactor resource_config.go thoroughly and remove useless code in registry 2018-01-27 16:10:58 +08:00
hzxuzhonghu 6abde54bbe fix GetCustomResourceListerCollectionDeleter comments 2018-01-27 16:00:10 +08:00
hzxuzhonghu 64a12258e8 remove support enable-disable api resources 2018-01-27 15:25:23 +08:00
Kubernetes Submit Queue 6ef0514bd9
Merge pull request #58141 from ahmetb/configurable-scopes
Automatic merge from submit-queue (batch tested with PRs 58903, 58141, 58900). 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>.

auth/gcp: configurable scopes for gcp default credentials

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

- add `config.scopes` field comma-separated scope URLs, to be used with Google
  Application Default Credentials (i.e. GOOGLE_APPLICATION_CREDENTIALS env)
- users now should be able to set a gserviceaccount key in GOOGLE_APPLICATION_CREDENTIALS
  env, craft a kubeconfig file with GKE master IP+CA cert and should be able to authenticate
  to GKE in headless mode _without requiring gcloud_ CLI, and they can now use the
  email address of the gserviceaccount in RBAC role bindings and _not use Google Cloud IAM at all._
- gcp default scopes now include userinfo.email scope, so authenticating to GKE
  using gserviceaccount keys can now be done without gcloud as well.
- since userinfo.email scope is now a default, users who have existing RBAC bindings
  that use numeric uniqueID of the gserviceaccount will be broken (this behavior was
  never documented/guaranteed). from now on email address of the service account
  should be used as the subject in RBAC Role Bindings.


**Release note**:
```release-note
Google Cloud Service Account email addresses can now be used in RBAC
Role bindings since the default scopes now include the "userinfo.email"
scope. This is a breaking change if the numeric uniqueIDs of the Google
service accounts were being used in RBAC role bindings. The behavior
can be overridden by explicitly specifying the scope values as
comma-separated string in the "users[*].config.scopes" field in the
KUBECONFIG file.
```

/assign @cjcullen 
/sig gcp
2018-01-26 21:00:35 -08:00
Kubernetes Submit Queue ac495f169b
Merge pull request #58644 from yguo0905/webhooks
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>.

Use SSH tunnel for webhook communication iff the webhook is deployed as a service

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

We are getting the following error when the apiserver connects the webhook on localhost (configured via URL). We should only use the SSL tunnel for the connections to nodes when the webhooks are running as services.

```
I0119 17:41:18.678436       1 ssh.go:400] [4cdf44753cc3705d: localhost:10258] Dialing...
W0119 17:41:18.678483       1 ssh.go:424] SSH tunnel not found for address "localhost", picking random node
I0119 17:41:18.679810       1 ssh.go:402] [4cdf44753cc3705d: localhost:10258] Dialed in 1.398691ms.
W0119 17:41:18.679928       1 admission.go:256] Failed calling webhook, failing closed xxx: failed calling admission webhook "xxx": Post xxx: ssh: rejected: connect failed (Connection refused)
I0119 17:41:18.680346       1 wrap.go:42] POST /api/v1/namespaces/kube-system/pods: (5.725588ms) 500
```

**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/kubernetes/issues/58779

**Special notes for your reviewer**:

**Release note**:

```release-note
kube-apiserver is changed to use SSH tunnels for webhook iff the webhook is not directly routable from apiserver's network environment.
```

/assign @lavalamp @caesarxuchao @cheftako
2018-01-26 15:58:27 -08:00
Yang Guo 05fbc22064 Split ClientConfigFor() 2018-01-26 11:51:19 -08:00
Kubernetes Submit Queue 88abb431ae
Merge pull request #58846 from hzxuzhonghu/aggregator-fix
Automatic merge from submit-queue (batch tested with PRs 58783, 58800, 58846). 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>.

runtime-config bug in kube-aggregator

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

kube-aggregator api has upgraded to v1, and introduce a little bug. I have to fix it.

**Special notes for your reviewer**:
/assign @deads2k 
**Release note**:

```release-note
NONE
```
2018-01-26 10:19:39 -08:00
Jordan Liggitt 7336eeab8a
Add deprecated stage of feature gates 2018-01-26 10:49:52 -05:00
Kubernetes Submit Queue a73c96d7b2
Merge pull request #58342 from gmarek/inflight
Automatic merge from submit-queue (batch tested with PRs 55792, 58342). 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 a metric to track usage of inflight request limit.

This one is tricky. The goal is to know how 'loaded' given apiserver is before we start dropping the load, to so we need to somehow expose 'fullness' of channels.

Sadly this metric is pretty volatile so it's not clear how to do this correctly. I decided to do pre-aggregation  to smoothen the metric a bit. In the current implementation the metric publishes maximum "usage" of the inflight is previous second.

If you have any ideas please share.
@smarterclayton @lavalamp @wojtek-t @liggitt @deads2k @caesarxuchao @sttts @crassirostris @hulkholden

```release-note
NONE
```
2018-01-26 06:54:36 -08:00
Kubernetes Submit Queue 27d01b5ab9
Merge pull request #57938 from dims/add-binary-configmap
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 binary configmap

Reviving code from https://github.com/kubernetes/kubernetes/pull/33549 submitted by @zreigz

**What this PR does / why we need it**:
Add support for binary files in ConfigMap

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

**Special notes for your reviewer**:

**Release note**:

```release-note
ConfigMap objects now support binary data via a new `binaryData` field. When using `kubectl create configmap --from-file`, files containing non-UTF8 data will be placed in this new field in order to preserve the non-UTF8 data. Use of this feature requires 1.10+ apiserver and kubelets.
```
2018-01-26 04:34:33 -08:00
Marek Grabowski 000d7bac29 Add a metric to track usage of inflight request limit. 2018-01-26 11:11:16 +00:00
Kubernetes Submit Queue d9ded43bbe
Merge pull request #58101 from lavalamp/scramble-rv
Automatic merge from submit-queue (batch tested with PRs 58518, 58771, 58101, 56829). 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>.

Resource version parsing should all be in one place

This is 100% refactoring that ought to be a no-op at run time. It puts resource version parsing in a single file. Doing this because I want to follow up with a change which will make it obvious to users of the system our rules about resource version. Don't want to mix that with this refactor (on the off chance it gets rolled back).

Part of: #58112

```release-note
NONE
```
2018-01-26 01:03:38 -08:00
hzxuzhonghu 7bf825a763 fix runtime-config bug in kube-aggregator 2018-01-26 10:32:46 +08:00
Kubernetes Submit Queue 2e3cb71583
Merge pull request #56874 from caesarxuchao/fail-open-doc
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 the comments on webhook failure policy

ref: kubernetes/features#492

Note that comments on constants aren't reflected in the user docs
2018-01-25 11:44:42 -08:00
Kubernetes Submit Queue 068e1642f6
Merge pull request #58735 from liggitt/server-unavailable-errors
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>.

Distinguish service unavailable errors in client-go

related to https://github.com/kubernetes/kubernetes/issues/58642

the server is returning correct errors, but the client was not distinguishing service unavailable errors from general 5xx errors

```release-note
NONE
```
2018-01-25 06:14:21 -08:00
Kubernetes Submit Queue 0b8f3a2240
Merge pull request #58185 from caesarxuchao/webhook-cluster-scoped-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>.

Never let cluster-scoped resources skip webhooks

Fix #57964

This allows user write webhooks for cluster-scoped custom resources.

We still need to figure out how to selectively exempt cluster-scoped resources from webhooks to avoid bootstrapping deadlocks. For now, if a deadlock occurs, users can work around by first deleting the webhook configuration, then rebooting the webhook, then re-enabling the webhook configuration.

```release-note
Bug fix: webhooks now do not skip cluster-scoped resources

Action required: Before upgrading your Kubernetes clusters, double check if you had configured webhooks for cluster-scoped objects (e.g., nodes, persistentVolume), these webhooks will start to take effect. Delete/modify the configs if that's not desirable.
```
2018-01-24 17:41:18 -08:00
hzxuzhonghu 1f013b7dea run update code-gen 2018-01-24 16:45:23 +08:00
hzxuzhonghu aa066e1322 remove newline after range 2018-01-24 16:44:02 +08:00
Jordan Liggitt ca2eba7040
Distinguish service unavailable errors in client-go 2018-01-24 00:14:21 -05:00
Daniel Smith 023895d597 resource version parsing should all be in one place 2018-01-23 17:18:16 -08:00
Kubernetes Submit Queue 35ed5338b1
Merge pull request #58393 from deads2k/agg-02-ga
Automatic merge from submit-queue (batch tested with PRs 54071, 58393). 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>.

promote aggregation API to v1

Finishing https://github.com/kubernetes/features/issues/263 as discussed in apimachinery

The API has been available since 1.6 and beta since 1.7.  Openshift has been using it for about a year and service catalog (@pmorie) and metrics server (@piosz @DirectXMan12) have both been using too.  The feature and the API have both been stable over that time.

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

/assign lavalamp
/assign smarterclayton


```release-note
Promoting the apiregistration.k8s.io (aggregation) to GA
```
2018-01-23 16:41:33 -08:00
Yang Guo 454276c23c Use SSH tunnel for webhook communication iff the webhook is deployed as a service 2018-01-23 14:31:09 -08:00
David Eads 972693cffe generated 2018-01-23 14:11:49 -05:00
David Eads 9baae557da add apiregistration v1 2018-01-23 14:11:49 -05:00
Jordan Liggitt 91ba8c37d0
Return ServiceUnavailable error consistently from proxy 2018-01-23 11:00:13 -05:00
Davanum Srinivas 426eb0419e generated code and docs 2018-01-23 07:28:47 -05:00
Lukasz Zajaczkowski 7e158fb4f6 Add support for binary file in configmap 2018-01-23 07:28:34 -05:00
Kubernetes Submit Queue 30d42dc95f
Merge pull request #58438 from carlory/fix-crd
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 apiserver crash caused by nil pointer

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

1. $ref should be not supported
2. redefine CRClientGetter 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 #58427

**Release note**:


```release-note
CustomResourceDefinitions: OpenAPI v3 validation schemas containing `$ref`references are no longer permitted (valid references could not be constructed previously because property ids were not permitted either). Before upgrading, ensure CRD definitions do not include those `$ref` fields.
```
2018-01-23 03:18:27 -08:00
Kubernetes Submit Queue a5e33195e4
Merge pull request #57867 from CaoShuFeng/patch_trace
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>.

trace patch operations

Just like `update`, `create`, `get` and `delete` operations.

**Release note**:
```release-note
NONE
```
2018-01-22 23:53:48 -08:00
Kubernetes Submit Queue 71426ba59f
Merge pull request #58394 from deads2k/controller-08-redeliver
Automatic merge from submit-queue (batch tested with PRs 58412, 56132, 58506, 58542, 58394). 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>.

don't stop informer delivery on error

If an informer delivery fails today, we stop delivering to it entirely.  The pull updates the code to skip that particular notification, delay, and continue delivery with the next time.

/assign derekwaynecarr 
/assign ncdc
/assign ash2k

@derekwaynecarr This would change the "the controller isn't doing anything?!" to "the controller missed my (individual) resource!"


```release-note
NONE
```
2018-01-22 22:57:47 -08:00
Kubernetes Submit Queue 3550551b9f
Merge pull request #58528 from deads2k/kubelet-02-mincipher
Automatic merge from submit-queue (batch tested with PRs 58547, 57228, 58528, 58499, 58618). 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 TLS min version flag

Adds a flag for controlling the minimum TLS level allowed.

/assign liggitt

@kubernetes/sig-node-pr-reviews @k8s-mirror-api-machinery-pr-reviews 

```release-note
--tls-min-version on kubelet and kube-apiserver allow for configuring minimum TLS versions
```
2018-01-22 20:49:35 -08:00
Kubernetes Submit Queue f0b7319494
Merge pull request #57228 from hzxuzhonghu/runtime-config
Automatic merge from submit-queue (batch tested with PRs 58547, 57228, 58528, 58499, 58618). 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>.

pass down runtime-config through apiserver chain

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

>kube-apiserver is actually a delegation chain of aggregator+kube+apiextensions. Let's pass down runtime-config through the chain, each layer removing the groups it knows about.

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

**Special notes for your reviewer**:

make a new pkg `k8s.io/apiserver/pkg/server/resourceconfig`, and 
1. move resourceconfig related code to it. 
2. abstract generic used function `MergeAPIResourceConfigs`, put it here.

**Release note**:

```release-note
NONE
```
2018-01-22 20:49:32 -08:00
Kubernetes Submit Queue 619305f101
Merge pull request #58547 from liggitt/watch-cache-delete-resourceversion
Automatic merge from submit-queue (batch tested with PRs 58547, 57228, 58528, 58499, 58618). 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>.

Send correct resource version for delete events from watch cache

Fixes #58545 

the watch cache filtering is returning the previous object content intact, including resource version. this is the logic the watch cache uses:
```go
switch {
case curObjPasses && !oldObjPasses:
	watchEvent = watch.Event{Type: watch.Added, Object: event.Object.DeepCopyObject()}
case curObjPasses && oldObjPasses:
	watchEvent = watch.Event{Type: watch.Modified, Object: event.Object.DeepCopyObject()}
case !curObjPasses && oldObjPasses:
	watchEvent = watch.Event{Type: watch.Deleted, Object: event.PrevObject.DeepCopyObject()}
}
```

when processing a delete event, we should be sending the old object's content *but* with the event's resource version set in it. corresponding logic exists in the uncached stores:

77ac663df4/staging/src/k8s.io/apiserver/pkg/storage/etcd/etcd_watcher.go (L401-L403)

77ac663df4/staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go (L373-L378)


```release-note
Fixes an issue where the resourceVersion of an object in a DELETE watch event was not the resourceVersion of the delete itself, but of the last update to the object. This could cause clients receiving the watch event to revert to an old "last observed" resource version, and disrupt their ability to re-establish watches properly.
```
2018-01-22 20:49:30 -08:00
Ahmet Alp Balkan ad4fdc7d15
Refactor gcp.go methods for testability, add tests
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-01-22 11:21:17 -08:00
David Eads 2fa93da6d5 don't stop informer delivery on error 2018-01-22 09:55:49 -05:00
carlory 5819a608b9 ref -> $ref 2018-01-22 21:51:50 +08:00
hzxuzhonghu eff1f20ff1 run update bazel and staging-godep 2018-01-22 19:10:28 +08:00
hzxuzhonghu 2f403b7ad1 pass APIEnablement through apiserver chain 2018-01-22 19:10:26 +08:00
Kubernetes Submit Queue 23226c24d4
Merge pull request #58070 from weekface/weekface/aggregator-proxy-fix
Automatic merge from submit-queue (batch tested with PRs 57896, 58070). 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>.

Don't remove APIService from apiHandlerManager when its Available Conditions is not True

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

I use my own apiserver works together with `kube-apiserver`, i have a custom resource: `databases` and created a `database` named: `db-name-1`.

When this apiserver is down(for example: OOMKilled), `kubectl get databases db-name-1 -v 10` returns `404 NotFound`:

```
[{
  "metadata": {},
  "status": "Failure",
  "message": "the server could not find the requested resource (get databases.core.example.com db-name-1)”,
  "reason": "NotFound",
  "details": {
    "name": “db-name-1”,
    "group": "core.example.com",
    "kind": “databases”,
    "causes": [
      {
        "reason": "UnexpectedServerResponse",
        "message": "404 page not found"
      }
    ]
  },
  "code": 404
}]
```

But it is not really `NotFound`.

So if the APIService is not available, just return 503.

There was a PR related with this: #57943 

**Release note**:


```release-note
kube-apiserver: requests to endpoints handled by unavailable extension API servers (as indicated by an `Available` condition of `false` in the registered APIService) now return `503` errors instead of `404` errors.
```
2018-01-21 20:25:31 -08:00
carlory 8b8d522228 fix apiserver crash caused by nil pointer and ensure CRD schema
validator can be constructed during validation.
2018-01-22 12:05:39 +08:00
weekface f06e68a3ab Update unavailable aggregated APIs to 503s instead of 404s 2018-01-21 10:25:03 +08:00
Kubernetes Submit Queue c9c6901303
Merge pull request #58520 from porridge/fix-connreset
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>.

Make IsConnectionReset work with more error implementations.

**What this PR does / why we need it**:
This fixes the code to correctly navigate error hierarchy, and actually
work.

**Which issue(s) this PR fixes**
An improvement for #55860

**Special notes for your reviewer**:

Integration-testing this code is somewhat hard. What I did to reproduce this
condition reliably was:

1. use iptables to let the TCP handshake packets through but reject
payload-carrying packets with:
```
sudo iptables -t raw -I PREROUTING -d localhost --protocol tcp --dport 443  -j NOTRACK
sudo iptables -t filter -I INPUT -d localhost --protocol tcp --dport 443 -m string --algo bm --string http  -j REJECT --reject-with tcp-reset
```
2. start a dummy server with: `nc -l -4 localhost 443`
3. make the client issue a GET on localhost:443

Then I added instrumentation to the place in k8s.io/client-go/rest/request.go
which calls this code, to discover the actual error hierarchy.

I think another way to test this would be to run a dummy server which would
listen() on a socket, accept() and then close() the incoming connection
straight away.

**Release note**:
```release-note
Correctly handle transient connection reset errors on GET requests from client library.
```
2018-01-20 05:37:25 -08:00
Jordan Liggitt 57998d247d
Send correct resource version for delete events from watch cache 2018-01-19 18:08:35 -05:00
Chao Xu c80a7ee9e1 generated 2018-01-19 14:05:04 -08:00
Chao Xu 0d717272cc Never let cluster-scoped resources skip webhooks 2018-01-19 14:05:04 -08:00
Marcin Owsiany 313128d760 Make IsConnectionReset work with more error implementations. 2018-01-19 21:49:04 +01:00
David Eads 4ce7bcced4 generated 2018-01-19 14:08:28 -05:00
David Eads ad16803470 add options for min tls levels 2018-01-19 14:08:27 -05:00