Commit Graph

2318 Commits (8cbbbac27d427668a655fd704c6db17904520e42)

Author SHA1 Message Date
Kubernetes Submit Queue 12d73c31a9 Merge pull request #51436 from liggitt/initializer-feature
Automatic merge from submit-queue (batch tested with PRs 51471, 50561, 50435, 51473, 51436)

Feature gate initializers field

The metadata.initializers field should be feature gated and disabled by default while in alpha, especially since enforcement of initializer permission that keeps users from submitting objects with their own initializers specified is done via an admission plugin most clusters do not enable yet.

Not gating the field and tests caused tests added in https://github.com/kubernetes/kubernetes/issues/51429 to fail on clusters that don't enable the admission plugin.

This PR:
* adds an `Initializers` feature gate, auto-enables the feature gate if the admission plugin is enabled
* clears the `metadata.initializers` field of objects on create/update if the feature gate is not set
* marks the e2e tests as feature-dependent (will follow up with PR to test-infra to enable the feature and opt in for GCE e2e tests)

```release-note
Use of the alpha initializers feature now requires enabling the `Initializers` feature gate. This feature gate is auto-enabled if the `Initialzers` admission plugin is enabled.
```
2017-08-29 02:22:19 -07:00
Kubernetes Submit Queue 9f6c61bba3 Merge pull request #50435 from NickrenREN/localstorage-downwardapi
Automatic merge from submit-queue (batch tested with PRs 51471, 50561, 50435, 51473, 51436)

Add local storage to downwards API

**Release note**:
```release-note
Add local ephemeral storage to downward API 
```


/assign @NickrenREN
2017-08-29 02:22:13 -07:00
huangjiuyuan 4ce3b6cf4f modifying the comment of BeforeDelete function to improve readibility 2017-08-29 17:03:06 +08:00
Kubernetes Submit Queue 0b0b2a22c5 Merge pull request #51415 from jpbetz/timeout-param-minimal
Automatic merge from submit-queue (batch tested with PRs 50932, 49610, 51312, 51415, 50705)

Add --request-timeout to kube-apiserver to make global request timeout configurable

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

Make the currently hard coded 60 global request timeout in apiserver configurable via a --request-timeout command line flag.

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

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

**Special notes for your reviewer**:

We plan to backport this to 1.6 and 1.7. To ease the backport work, we've kept this change to a minimum. After this PR we will submit an additional PR to rename `--min-request-timeout` to something that more clearly describes it's purpose, such as `--long-running-request-timeout-min`.

**Release note**:

```release-note
Add --request-timeout to kube-apiserver to make global request timeout configurable.
```
2017-08-29 01:17:40 -07:00
huangjiuyuan 6e832e2fe8 fixing package comment of v1 2017-08-29 15:26:27 +08:00
ymqytw 4de18dec2b return reasonable error when connection closed 2017-08-28 20:01:37 -07:00
ymqytw 9b05e2644f update generated files 2017-08-28 16:37:24 -07:00
Chao Xu 85ee09e4c9 update initializer names to valid ones in tests 2017-08-28 16:17:57 -07:00
Chao Xu c33de9f204 unify the validation rules on initializer name 2017-08-28 16:17:05 -07:00
ymqytw fd3b5bea8f add retainKeys in patchStrategy 2017-08-28 15:40:47 -07:00
Chao Xu 65308d68c5 generated 2017-08-28 15:24:50 -07:00
Chao Xu b642c9afbb remove failure policy from intializer configuration 2017-08-28 15:24:50 -07:00
Joe Betz cb764756c6 Add --request-timeout to allow the global request timeout of 60 seconds to be configured. 2017-08-28 13:42:43 -07:00
Matthew Wong 9e37133a1f Generated PV.Spec.MountOptions code 2017-08-28 14:20:48 -04:00
Matthew Wong 0855f6a089 Add MountOptions field to PV spec 2017-08-28 14:18:34 -04:00
Jordan Liggitt 838d8a7274
Add liggitt to client-go approvers 2017-08-28 13:47:01 -04:00
Saksham Sharma 6a4afc897c Unify cloudprovided and normal KMS plugins 2017-08-28 22:46:42 +05:30
Jordan Liggitt 658956f063
Feature gate initializers field 2017-08-28 11:11:48 -04:00
Lucas Käldström e1cff67aa6
autogenerated code 2017-08-27 18:32:14 +03:00
Lucas Käldström 9b060faa2a
Make it possible to fake the ServerVersion in the FakeDiscovery implementation 2017-08-27 18:31:59 +03:00
Kubernetes Submit Queue 877ee91930 Merge pull request #51082 from caesarxuchao/repair-null-pending-initializer
Automatic merge from submit-queue (batch tested with PRs 50953, 51082)

Fix mergekey of initializers; Repair invalid update of initializers

Fix https://github.com/kubernetes/kubernetes/issues/51131

The PR did two things to make parallel patching `metadata.initializers.pending` possible:
* Add mergekey to initializers.pending
* Let the initializer admission plugin set the `metadata.intializers` to nil if an update makes the `pending` and the `result` both nil, instead of returning a validation error. Otherwise if multiple initializer controllers sending the patch removing themselves from `pending` at the same time, one of them will get a validation error.


```release-note
The patch to remove the last initializer from metadata.initializer.pending will result in metadata.initializer to be set to nil (assuming metadata.initializer.result is also nil), instead of resulting in an validation error.
```
2017-08-26 23:03:01 -07:00
NickrenREN 50c6fa9171 Remove previous local storage resource name 'scratch" and "overlay" 2017-08-27 12:03:31 +08:00
Kubernetes Submit Queue 562d2be7a0 Merge pull request #49006 from CaoShuFeng/is_forbidden
Automatic merge from submit-queue

Fix forbidden message format

Before this change:
 $ kubectl get pods --as=tom
 Error from server (Forbidden): pods "" is forbidden: User "tom" cannot list pods in the namespace "default".
After this change:
 $ kubectl get pods --as=tom
 Error from server (Forbidden): pods is forbidden: User "tom" cannot list pods in the namespace "default".



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

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

**Special notes for your reviewer**:

**Release note**:

```
Fix forbidden message format, remove extra ""
```
2017-08-26 19:01:21 -07:00
Kubernetes Submit Queue 217513e27a Merge pull request #45294 from liggitt/proto-slices
Automatic merge from submit-queue

Remove null -> [] slice hack

Closes #44593

When 1.6 added protobuf storage, the storage layer lost the ability to persist slice fields with empty but non-null values.

As a workaround, we tried to convert empty slice fields to `[]`, rather than `null`. Compressing `null` -> `[]` was just as much of an API breakage as `[]` -> `null`, but was hoped to cause fewer problems in clients that don't do null checks.

Because of conversion optimizations around converting lists of objects, the `null` -> `[]` hack was discovered to only apply to individual get requests, not to a list of objects. 1.6 and 1.7 was released with this behavior, and the world didn't explode. 1.7 documented the breaking API change that `null` and `[]` should be considered equivalent, unless otherwise noted on a particular field.

This PR:

* Reverts the earlier attempt (https://github.com/kubernetes/kubernetes/pull/43422) at ensuring non-null json slice output in conversion
* Makes results of `get` consistent with the results of `list` (which helps naive clients that do deepequal comparisons of objects obtained via list/watch and get), and allows empty slice fields to be returned as `null`

```release-note
Protobuf serialization does not distinguish between `[]` and `null`.
API fields previously capable of storing and returning either `[]` and `null` via JSON API requests (for example, the Endpoints `subsets` field) can now store only `null` when created using the protobuf content-type or stored in etcd using protobuf serialization (the default in 1.6+). JSON API clients should tolerate `null` values for such fields, and treat `null` and `[]` as equivalent in meaning unless specifically documented otherwise for a particular field.
```
2017-08-26 13:35:29 -07:00
huangjiuyuan 39c61b0967 adding validations on kubelet starting configurations 2017-08-26 22:28:14 +08:00
Di Xu 789a95971d kubectl add global flag --include-uninitialized 2017-08-26 13:52:36 +08:00
NickrenREN df4e71ffe1 auto generated code 2017-08-26 13:03:30 +08:00
NickrenREN 194418986f Add local storage to downwards API 2017-08-26 11:58:21 +08:00
Kubernetes Submit Queue 21ca7f7eec Merge pull request #47782 from php-coder/fix_reverse_in_tests
Automatic merge from submit-queue (batch tested with PRs 49850, 47782, 50595, 50730, 51341)

Fix benchmarks to really test reverse order of the keys

**What this PR does / why we need it**:
This PR modifies the code to do what comments says -- reverse the order of keys. It also fixes the logic that was wrong and didn't allow stale data.

**Special notes for your reviewer**:
This change resolves the following review comments:
- https://github.com/kubernetes/kubernetes/pull/41939#discussion_r117068104
- https://github.com/kubernetes/kubernetes/pull/46916#discussion_r122763350
- https://github.com/kubernetes/kubernetes/pull/46916#discussion_r122764000

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

PTAL @smarterclayton
2017-08-25 20:43:33 -07:00
Kubernetes Submit Queue b65f3cc8dd Merge pull request #49850 from m1093782566/service-session-timeout
Automatic merge from submit-queue (batch tested with PRs 49850, 47782, 50595, 50730, 51341)

Paramaterize `stickyMaxAgeMinutes` for service in API

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

Currently I find `stickyMaxAgeMinutes` for a session affinity type service is hard code to 180min. There is a TODO comment, see

https://github.com/kubernetes/kubernetes/blob/master/pkg/proxy/iptables/proxier.go#L205

I think the seesion sticky max time varies from service to service and users may not aware of it since it's hard coded in all proxier.go - iptables, userspace and winuserspace.

Once we parameterize it in API, users can set/get the values for their different services.

Perhaps, we can introduce a new field `api.ClientIPAffinityConfig` in `api.ServiceSpec`.

There is an initial discussion about it in sig-network group. See,

https://groups.google.com/forum/#!topic/kubernetes-sig-network/i-LkeHrjs80

**Which issue this PR fixes**: 

fixes #49831

**Special notes for your reviewer**:

**Release note**:

```release-note
Paramaterize session affinity timeout seconds in service API for Client IP based session affinity.
```
2017-08-25 20:43:30 -07:00
Cao Shufeng ab09186737 Fix forbidden message format
Before this change:
 # kubectl get pods --as=tom
 Error from server (Forbidden): pods "" is forbidden: User "tom" cannot list pods in the namespace "default".
After this change:
 # kubectl get pods --as=tom
 Error from server (Forbidden): pods is forbidden: User "tom" cannot list pods in the namespace "default".
2017-08-26 10:27:35 +08:00
Josh Horwitz 6ec738a8ec generated files 2017-08-25 21:39:17 -04:00
Josh Horwitz fab6044a31 Allow PSP's to specify a whitelist of allowed paths for host volume
removed files not supposed to be there
2017-08-25 21:35:55 -04:00
Eric Chiang 9caff69027 generated: update API resources
./hack/update-codegen.sh
	./hack/update-codecgen.sh
	./hack/update-generated-protobuf.sh
2017-08-25 14:40:02 -07:00
Kubernetes Submit Queue b5bb8099e7 Merge pull request #50971 from CaoShuFeng/audit_json
Automatic merge from submit-queue (batch tested with PRs 51134, 51122, 50562, 50971, 51327)

set --audit-log-format default to json

Updates: https://github.com/kubernetes/kubernetes/issues/48561

**Release note**:
```
set --audit-log-format default to json for kube-apiserver
```
2017-08-25 14:01:33 -07:00
Kubernetes Submit Queue ccae631ff9 Merge pull request #50562 from atlassian/call-cleanup-properly
Automatic merge from submit-queue (batch tested with PRs 51134, 51122, 50562, 50971, 51327)

Call the right cleanup function

**What this PR does / why we need it**:
`defer cleanup()` will always call the function that was returned by the first call to `r.resyncChan()` but it should call the one returned by the last call.

**Special notes for your reviewer**:
This will print `c1`, not `c2`. See https://play.golang.org/p/FDjDbUxOvI
```go
func main() {
	var c func()
	c = c1
	defer c()
	c = c2
}

func c1 () {
	fmt.Println("c1")
}

func c2 () {
	fmt.Println("c2")
}
```

**Release note**:
```release-note
NONE
```
/kind bug
/sig api-machinery
2017-08-25 14:01:30 -07:00
Eric Chiang 85491f1578 Audit policy v1beta1 now supports matching subresources and resource names.
policy:
	- level: Metadata
	  resources:
	  - group: ""
	    resources ["pods/logs"]
	- level: None
	  resources:
	  - group: ""
	    resources: ["configmaps"]
	    resourceNames: ["controller-leader"]

The top level resource no longer matches the subresource. For example "pods"
no longer matches requests to the logs subresource on pods.

```release-note
Audit policy supports matching subresources and resource names, but the top level resource no longer matches the subresouce. For example "pods" no longer matches requests to the logs subresource of pods. Use "pods/logs" to match subresources.
```
2017-08-25 13:59:16 -07:00
Jordan Liggitt c7defb806f
Generated files 2017-08-25 15:01:08 -04:00
Jordan Liggitt 1bb19dfcc5
Revert "Ensure empty serialized slices are zero-length, not null" 2017-08-25 14:59:32 -04:00
Kubernetes Submit Queue c04e516373 Merge pull request #50033 from cmluciano/cml/addnpcidrselector
Automatic merge from submit-queue (batch tested with PRs 50033, 49988, 51132, 49674, 51207)

Add IPBlock to Network Policy

**What this PR does / why we need it**:
 Add ipBlockRule to NetworkPolicyPeer.

**Which issue this PR fixes**
fixes #49978

**Special notes for your reviewer**:
- I added this directly as a field on the existing API per guidance from API-Machinery/lazy SIG-Network consensus.

Todo:
- [ ] Documentation comments to mention this is beta, unless we want to go straight to GA
- [ ] e2e tests

**Release note**:
```
Support ipBlock in NetworkPolicy
```
2017-08-25 11:07:07 -07:00
Antoine Pelisse fd5775c192 client-go: Update RoundTrippers to be Unwrappable 2017-08-25 11:05:43 -07:00
Antoine Pelisse 30325cd580 c-go: Update diskv to get atomic fs cache write 2017-08-25 08:31:49 -07:00
Antoine Pelisse 332b681bd1 Revert "Revert "Merge pull request #47353 from apelisse/http-cache""
This reverts commit 4ee72eb300.
2017-08-25 08:31:49 -07:00
Kubernetes Submit Queue 26192e1be7 Merge pull request #51214 from sttts/sttts-cut-off-api-apiserver
Automatic merge from submit-queue (batch tested with PRs 46986, 51214, 51169, 50155, 51261)

admission api: cut off api from k8s.io/apiserver
2017-08-25 07:58:06 -07:00
Slava Semushin 734be0c49f Fix benchmarks to really test reverse order of the keys. 2017-08-25 15:30:29 +02:00
Kubernetes Submit Queue d7965e9331 Merge pull request #51197 from deads2k/api-02-field-default
Automatic merge from submit-queue (batch tested with PRs 51114, 51233, 51024, 51053, 51197)

default field selectors

We have a lot of code around field selectors that doesn't add much value. Every gettable resources probably wants name and namespace by default and since they all use metav1 (today), we can assign that as a default. If we think we'll always have metav1 style name and namespace, then this makes a reasonable default and you can always set something different.

This removes cruft and avoids the risk of accidentally forgetting a field selector.  

@kubernetes/sig-api-machinery-misc @smarterclayton
2017-08-25 06:22:20 -07:00
Kubernetes Submit Queue f65ec4f2ae Merge pull request #51053 from thockin/conversion-gen-debug
Automatic merge from submit-queue (batch tested with PRs 51114, 51233, 51024, 51053, 51197)

Add debug logs to conversion-gen

These were useful when tracking a different problem.
2017-08-25 06:22:17 -07:00
Kubernetes Submit Queue 05294d8034 Merge pull request #50559 from xiangpengzhao/remove-depre-flag
Automatic merge from submit-queue (batch tested with PRs 51244, 50559, 49770, 51194, 50901)

Remove deprecated flag "long-running-request-regexp".

**What this PR does / why we need it**:
remove `long-running-request-regexp` post-1.6.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-25 04:11:08 -07:00
Dr. Stefan Schimanski 8e63473d9e admission api: cut off api from k8s.io/apiserver
This caused an import cycle: api -> apiserver -> api

Fixes https://github.com/kubernetes/kubernetes/issues/51212
2017-08-25 12:29:29 +02:00
m1093782566 ad73fe68a7 auto gen code 2017-08-25 18:28:14 +08:00
m1093782566 c355a2ac96 Paramaterize stickyMaxAgeMinutes for service in API 2017-08-25 17:44:47 +08:00
Kubernetes Submit Queue ed6efbc0b5 Merge pull request #49502 from rootfs/cephfs-pv-ns
Automatic merge from submit-queue (batch tested with PRs 50213, 50707, 49502, 51230, 50848)

Refactor CephFS PV spec

**What this PR does / why we need it**:
refactor CephFS Volume Persistent Volume Spec so CephFS PV's SecretRef allows referencing a secret from a persistent volume in any namespace. This allows locating credentials for persistent volumes in namespaces other than the one containing the PVC.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes https://github.com/kubernetes-incubator/external-storage/issues/309

**Special notes for your reviewer**:
@kubernetes/sig-storage-api-reviews 

**Release note**:

```release-note
Allow CephFS PV to specify a namespace for secret
```
2017-08-25 01:10:33 -07:00
Kubernetes Submit Queue b9425ded2e Merge pull request #50707 from diegs/json-ptr
Automatic merge from submit-queue (batch tested with PRs 50213, 50707, 49502, 51230, 50848)

Fix forkedjson.LookupPatchMetadata for pointers.

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

Fixes a bug in `forkedjson.LookupPatchMetadata`. It is triggered when called with some API objects such as the `Selector` field (a pointer) in https://godoc.org/k8s.io/api/extensions/v1beta1#DeploymentSpec.

The provided test case fails without the lines added to `fields.go`.

**Which issue this PR fixes** N/A

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-08-25 01:10:30 -07:00
xiangpengzhao 8719b4a8ea Remove deprecated init-container in annotations 2017-08-25 13:39:29 +08:00
Kubernetes Submit Queue 4f19a8fd2a Merge pull request #49741 from smarterclayton/server_printer
Automatic merge from submit-queue (batch tested with PRs 51148, 50816, 49741, 50858, 51223)

Add tests around TableConvert and server side printing

Also wire in more table printers

@fabianofranz
2017-08-24 21:51:05 -07:00
Kubernetes Submit Queue 7edab23997 Merge pull request #51148 from ironcladlou/gc-finalizer-decoupling
Automatic merge from submit-queue (batch tested with PRs 51148, 50816, 49741, 50858, 51223)

Enable finalizers independent of GC enablement

Decouple finalizer processing from garbage collection configuration.
Finalizers should be effective even when garbage collection is disabled
for a given store.

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

```release-note
NONE
```

/cc @kubernetes/sig-api-machinery-bugs 
/cc @caesarxuchao @liggitt @sttts @pmorie
2017-08-24 21:51:01 -07:00
Cao Shufeng 130f5d10ad set --audit-log-format default to json
Updates: https://github.com/kubernetes/kubernetes/issues/48561
2017-08-25 09:20:20 +08:00
Clayton Coleman 8f41db8100
Allow bearer requests to be proxied by kubectl proxy
Use a fake transport to capture changes to the request and then surface
them back to the end user.
2017-08-24 20:16:59 -04:00
Mikhail Mazurskiy 1ab88c94e8
Call the right cleanup function 2017-08-25 08:12:58 +10:00
Chao Xu 14dc1d8cb1 generated 2017-08-24 13:35:26 -07:00
Christopher M. Luciano 02735c3fb2
IPBlock generated code
Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>
2017-08-24 16:20:15 -04:00
Christopher M. Luciano b75dc93dd4
Add IPBlock to NetworkPolicy
Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>
2017-08-24 16:20:04 -04:00
Huamin Chen 9f0aad32b0 generated files
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-08-24 18:59:08 +00:00
Huamin Chen 9e65623187 refactor CephFS PV spec to use SecretReference
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-08-24 18:49:05 +00:00
Chao Xu fcd646d80e Let the initializer admission plugin set the metadata.intializers to nil
if an update makes the pendings and the result both nil
2017-08-24 11:23:51 -07:00
Huamin Chen 8a38cf1b1b generated files
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-08-24 14:53:00 +00:00
Huamin Chen 4525446af2 azure file volume: add secret namespace api
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-08-24 14:49:58 +00:00
Kubernetes Submit Queue 2c214baefc Merge pull request #51208 from simo5/pshfatal
Automatic merge from submit-queue (batch tested with PRs 47115, 51196, 51204, 51208, 51206)

Add an OrDie version for AddPostStartHook

Simplifies usage and consolidate the error message so it is always
the same everywhere.

```release-note
NONE
```
2017-08-24 07:20:13 -07:00
Kubernetes Submit Queue 761fb34e3d Merge pull request #51204 from nikhita/fix-roundtrip-errors
Automatic merge from submit-queue (batch tested with PRs 47115, 51196, 51204, 51208, 51206)

roundtrip: fix error messages

The error messages had some typos due to which it generated false positives. (encountered in #47263) 

**Release note**:

```release-note
NONE
```

/cc @sttts
2017-08-24 07:20:10 -07:00
Kubernetes Submit Queue 5fb38a325e Merge pull request #51154 from RenaudWasTaken/gRPC-updated-1-3-0
Automatic merge from submit-queue (batch tested with PRs 51193, 51154, 42689, 51189, 51200)

Bumped gRPC version to 1.3.0

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

This PR bumps down the version of the vendored version of gRPC from v1.5.1 to v1.3.0
This is needed as part of the Device Plugin API where we expect client and server to use the Keep alive feature in order to detect an error.

Unfortunately I had to also bump the version of `golang.org/x/text` and `golang.org/x/net`.

- Design document: kubernetes/community#695
- PR tracking: [kubernetes/features#368](https://github.com/kubernetes/features/issues/368#issuecomment-321625420)

**Which issue this PR fixes**: fixes #51099
Which was caused by my previous PR updating to 1.5.1

**Special notes for your reviewer**:
@vishh @jiayingz @shyamjvs

**Release note**:
```
Bumped gRPC to v1.3.0
```
2017-08-24 04:38:04 -07:00
Kubernetes Submit Queue c041567b5a Merge pull request #46597 from dixudx/implement_proposal_34058
Automatic merge from submit-queue (batch tested with PRs 51113, 46597, 50397, 51052, 51166)

implement proposal 34058: hostPath volume type

**What this PR does / why we need it**:
implement proposal #34058

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

**Special notes for your reviewer**:
cc @thockin @luxas @euank PTAL
2017-08-23 23:16:27 -07:00
Kubernetes Submit Queue 9b8cb7510a Merge pull request #51070 from NickrenREN/ephemeral-storage-name
Automatic merge from submit-queue (batch tested with PRs 50489, 51070, 51011, 51022, 51141)

Add ephemeral local storage resource name first

Since finally decided the ephemeral local storage resource name, send this PR to add the resource name first, and then i will rebase all my PRs about local storage isolation

**Special notes for your reviewer**:
related to: #50818 

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

/assign @jingxu97
2017-08-23 19:54:25 -07:00
Kubernetes Submit Queue c418e1b8cc Merge pull request #50764 from nikhita/crd-update-status-strategy
Automatic merge from submit-queue (batch tested with PRs 51047, 48573, 50764, 51092, 50578)

apiextensions: update CRD strategy

This PR adds the following changes:

1. Clear the status of the CRD and set the Generation before creation.
2. While updating the CRD:
    - ignore changes on status.
    - increase Generation if spec changes.
3. Don't update objectmeta (except finalizers) when status is updated.

**Release note**:

```release-note
CRDs support metadata.generation and implement spec/status split
```

/cc @sttts @deads2k
2017-08-23 17:56:04 -07:00
Simo Sorce 15c54ffa77 Add an OrDie version for AddPostStartHook
Simplifies usage and consolidate the error message so it is always
the same everywhere.

Signed-off-by: Simo Sorce <simo@redhat.com>
2017-08-23 16:08:27 -04:00
Morgan Bauer efa66227d4 basic logging for healthz installer
- InstallHandler is the public interface through which all interaction
   occurs.
 - It is good to know whether the default ping is occurring to know due
   to manual installation or automatic installation.
 - It is good to know how many handlers are installed to see whether
   code changes are taking effect.
 - It is good to know the names of the handlers that are installed to
   make sure that a handler a user thinks is installed is being
   installed at runtime.
 - Print all the checkers once
2017-08-23 13:04:32 -07:00
Brian Grant 4c34358c5e Add liggitt as an API approver. Note that bgrant0607 is an approver, but
shouldn't be auto-assigned.
2017-08-23 11:32:05 -07:00
Renaud Gaubert 1daaeb352f Bumped gRPC version to 1.3.0 2017-08-23 09:55:55 -07:00
Nikhita Raghunath dab5075ee3 roundtrip: fix error messages 2017-08-23 21:58:47 +05:30
David Eads 9002dfcd0a provide a default field selector for name and namespace 2017-08-23 10:40:02 -04:00
Kubernetes Submit Queue baed0e78b9 Merge pull request #50257 from diegs/merge-fix
Automatic merge from submit-queue (batch tested with PRs 50257, 50247, 50665, 50554, 51077)

Remove incorrect patch-merge directives.

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

Directives were misplaced for the following types:

- MatchExpressions
- Taints
- Tolerations

Per the discussion in #46547, we cannot fix these because it would cause backwards-compatibility problems. Instead, remove the incorrect ones so they don't mislead users. This has no impact on behavior.

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

**Special notes for your reviewer**:

Takes over from #46547 by @aaronlevy

**Release note**:

```release-note
NONE
```
2017-08-23 02:35:03 -07:00
Di Xu 504f89e3ac auto-gen 2017-08-23 15:23:34 +08:00
Kubernetes Submit Queue b0ad3a1c5d Merge pull request #51109 from kubernetes/revert-50531-gRPC-keep-alive-godeps
Automatic merge from submit-queue

Revert "Updated gRPC vendoring to support Keep Alive"

Reverts kubernetes/kubernetes#50531

Ref - https://github.com/kubernetes/kubernetes/issues/51099

/cc @wojtek-t @RenaudWasTaken
2017-08-23 00:04:13 -07:00
Di Xu d0a4af133b set default HostPathType to empty 2017-08-23 14:05:21 +08:00
Di Xu 5c45db564f implement proposal 34058: hostPath volume type 2017-08-23 14:05:21 +08:00
Kubernetes Submit Queue d235fa3f1c Merge pull request #48789 from mtanino/issue/47311
Automatic merge from submit-queue (batch tested with PRs 50806, 48789, 49922, 49935, 50438)

iSCSI volume plugin: iSCSI initiatorname support

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

This PR adds iSCSI initiatorname parameter to ISCSIVolumeSource to enable automatic configuration of initiator name per volume. This would allow for more fine grained configuration, and remove the need to configure the initiator name on the host by administrator.

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

**Special notes for your reviewer**:

/cc @rootfs @jsafrane @msau42

**Release note**:

```
iSCSI volume plugin: Support customization of iSCSI initiator name per volume
```
2017-08-22 19:45:29 -07:00
Dan Mace c845c444d5 Clarify finalizer function 2017-08-22 16:18:35 -04:00
Dan Mace ed5b5bb94e Enable finalizers independent of GC enablement
Decouple finalizer processing from garbage collection configuration.
Finalizers should be effective even when garbage collection is disabled
for a given store.

Fixes https://github.com/kubernetes/kubernetes/issues/50528.
2017-08-22 15:58:44 -04:00
Shyam JVS 3b014e103b Revert "Updated gRPC vendoring to support Keep Alive" 2017-08-22 15:16:52 +02:00
Kubernetes Submit Queue c13e9d14cd Merge pull request #50893 from CaoShuFeng/fuzzer
Automatic merge from submit-queue (batch tested with PRs 50893, 50913, 50963, 50629, 50640)

[advanced audit api] fuzz Event with random value

This is an error import by me:
https://github.com/kubernetes/kubernetes/pull/49115

We need to fuzz other parts of Event with random value, otherwise
this round trip test will not make too much sense.
@sttts 
@ericchiang is also researching this.

**Release note**:
```
NONE
```
2017-08-22 05:31:04 -07:00
Chao Xu f2993b810c add merge key to initializers.pending 2017-08-21 23:05:01 -07:00
NickrenREN 82ce7eccba Add ephemeral local storage resource name first 2017-08-22 13:53:37 +08:00
Kubernetes Submit Queue 07dea6b447 Merge pull request #51030 from ncdc/ncdc-owners
Automatic merge from submit-queue

Add ncdc to client-go/tools/cache OWNERS

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>

@kubernetes/sig-api-machinery-misc @lavalamp @smarterclayton @deads2k @sttts @liggitt @caesarxuchao @cheftako any objections?
2017-08-21 19:10:23 -07:00
Tim Hockin 2d55332250 Add debug logs to conversion-gen 2017-08-21 16:00:15 -07:00
Kubernetes Submit Queue 967c19df49 Merge pull request #50531 from NVIDIA/gRPC-keep-alive-godeps
Automatic merge from submit-queue (batch tested with PRs 50531, 50853, 49976, 50939, 50607)

Updated gRPC vendoring to support Keep Alive

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

This PR bumps the version of the vendored version of gRPC from v1.0.4 to v1.5.1
This is needed as part of the Device Plugin API where we expect client and server to use the Keep alive feature in order to detect an error.

Unfortunately I had to also bump the version of `golang.org/x/text` and `golang.org/x/net`.

- Design document: kubernetes/community#695
- PR tracking: [kubernetes/features#368](https://github.com/kubernetes/features/issues/368#issuecomment-321625420)

**Special notes for your reviewer**:
@vishh @jiayingz 

**Release note**:
```
Bumped gRPC from v1.0.4 to v1.5.1
```
2017-08-21 15:46:14 -07:00
Andy Goldstein 49bef684d3 Add ncdc to client-go/tools/cache OWNERS
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-08-21 17:42:59 -04:00
Kubernetes Submit Queue 5c03d3759d Merge pull request #50871 from liyinan926/lister-v1beta2
Automatic merge from submit-queue (batch tested with PRs 50693, 50831, 47506, 49119, 50871)

Added lister expansions for DaemonSet, Deployment, ReplicaSet, and StatefulSet for apps/v1beta2

**What this PR does / why we need it**:
This PR copies list expansions for  `DaemonSet`, `Deployment`, `ReplicaSet`, and `StatefulSet` to `apps/v1beta2` from `extensions/v1beta1` and `apps/v1beta1`.

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

**Special notes for your reviewer**:
@kow3ns @janetkuo 

**Release note**:
```release-note
NONE
```
2017-08-21 14:30:06 -07:00
mtanino b0d4664a27 Autogenerated files 2017-08-21 12:29:32 -04:00
Mitsuhiro Tanino a6e523f2e7 iSCSI volume plugin: iSCSI initiatorname support
This PR adds iSCSI initiatorname parameter to ISCSIVolumeSource
to enable automatic configuration of initiator name per volume.
This would allow for more fine grained configuration, and remove
the need to configure the initiator name on the host by
administrator.

fixes: #47311
2017-08-21 11:26:56 -04:00
Kubernetes Submit Queue d852b8aad9 Merge pull request #50631 from luxas/kubeadm_dryrun_apiclient
Automatic merge from submit-queue (batch tested with PRs 47896, 50678, 50620, 50631, 51005)

kubeadm: Adds dry-run support for kubeadm using the `--dry-run` option

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

Adds dry-run support to kubeadm by creating a fake clientset that can get totally fake values (like in the init case), or delegate GETs/LISTs to a real API server but discard all edits like POST/PUT/PATCH/DELETE

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

fixes: https://github.com/kubernetes/kubeadm/issues/389

**Special notes for your reviewer**:

This PR depends on https://github.com/kubernetes/kubernetes/pull/50626, first three commits are from there
This PR is a dependency for https://github.com/kubernetes/kubernetes/pull/48899 (kubeadm upgrades)

I have some small things to fixup and I'll yet write unit tests, but PTAL if you think this is going in the right direction

**Release note**:

```release-note
kubeadm: Adds dry-run support for kubeadm using the `--dry-run` option
```
cc @kubernetes/sig-cluster-lifecycle-pr-reviews @kubernetes/sig-api-machinery-pr-reviews
2017-08-21 08:26:26 -07:00
Kubernetes Submit Queue b59ad9cbff Merge pull request #50146 from gmarek/deepcopyinto
Automatic merge from submit-queue (batch tested with PRs 46512, 50146)

Make metav1.(Micro)?Time functions take pointers

Is there any reason for those functions not to be on pointers?
2017-08-19 11:28:15 -07:00
Renaud Gaubert faee6d6d5d Updated gRPC version to support Keep Alive 2017-08-18 15:26:38 -07:00
Eric Chiang 1f8ee7fe13 oidc auth: make the OIDC claims prefix configurable
Add the following flags to control the prefixing of usernames and
groups authenticated using OpenID Connect tokens.

	--oidc-username-prefix
	--oidc-groups-prefix
2017-08-18 09:49:32 -07:00
Lucas Käldström 0bf84aa182
kubeadm: Adds dry-run support for kubeadm using the '--dry-run' option 2017-08-18 16:05:12 +03:00
Kubernetes Submit Queue afabd09889 Merge pull request #50876 from enj/enj/f/owners_reviewer
Automatic merge from submit-queue

Add enj as reviewer to OWNERS

Adding myself as a reviewer for the following areas:

- API
- auth
- registry
- storage (etcd)

Signed-off-by: Monis Khan <mkhan@redhat.com>

**Release note**:

```release-note
NONE
```

@kubernetes/sig-api-machinery-pr-reviews
@kubernetes/sig-auth-pr-reviews
2017-08-18 05:42:07 -07:00
Kubernetes Submit Queue c3a39f763e Merge pull request #48263 from CaoShuFeng/useless_argument
Automatic merge from submit-queue

remove useless argument "name"

**Release note**:

```
NONE
```
2017-08-18 05:41:45 -07:00
Kubernetes Submit Queue 2ba796fe47 Merge pull request #50885 from CaoShuFeng/webhook_dead_code
Automatic merge from submit-queue (batch tested with PRs 50255, 50885)

remove dead code for cloner

I found some dead code in audit webhook backend.
This change do some clean work for: 2bbe72d4e0

**Release note**:
```
NONE
```
2017-08-18 05:22:00 -07:00
Cao Shufeng f2ec610455 [advanced audit api] fuzz Event with random value
This is an error import by me:
https://github.com/kubernetes/kubernetes/pull/49115

We need to fuzz other parts of Event with random value, otherwise
this round trip test will not make too much sense.
@sttts @ericchiang
2017-08-18 16:29:22 +08:00
Kubernetes Submit Queue d543a7c7ce Merge pull request #50765 from sttts/sttts-kube-gen-rename
Automatic merge from submit-queue

Rename k8s.io/{kube-gen -> code-generator}
2017-08-18 01:06:45 -07:00
Kubernetes Submit Queue 38053c3e44 Merge pull request #49617 from duan-yue/code_cls
Automatic merge from submit-queue

fix typo

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-17 23:21:20 -07:00
Cao Shufeng 7b5c7bb711 remove dead code for cloner
I found some dead code in audit webhook backend.
This change do some clean work for: 2bbe72d4e0
2017-08-18 11:50:27 +08:00
Di Xu b36320beb1 auto-gen 2017-08-18 11:07:35 +08:00
Di Xu 85602fd542 CollisionCount should have type int32 across controllers that use it for collision avoidance 2017-08-18 10:48:12 +08:00
Kubernetes Submit Queue f7dd477155 Merge pull request #50536 from crimsonfaith91/mark-deprecated
Automatic merge from submit-queue (batch tested with PRs 50536, 50809, 50220, 50399, 50176)

mark created-by annotation as deprecated

**What this PR does / why we need it**: This PR marks created-by annotation as deprecated in code comments.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
The `kubernetes.io/created-by` annotation is now deprecated and will be removed in v1.9. Use [ControllerRef](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md) instead to determine which controller, if any, owns an object.
```
2017-08-17 18:12:02 -07:00
Monis Khan dd06794bc2
Add enj as reviewer to OWNERS
Adding myself as a reviewer for the following areas:

- API
- auth
- registry
- storage (etcd)

Signed-off-by: Monis Khan <mkhan@redhat.com>
2017-08-17 20:42:46 -04:00
Kubernetes Submit Queue 1eb04f6a2a Merge pull request #50852 from guangxuli/fix_apiserver_register
Automatic merge from submit-queue (batch tested with PRs 50281, 50747, 50347, 50834, 50852)

fix incorrect logic in admission register

**What this PR does / why we need it**:
There is no issue for this PR, just fix incorrect logic in invocation `func (ps *Plugins) Register(name string, plugin Factory) ` after browsing the code accidentally.  And apparently, the logic exits potential panic.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
no issue
**Special notes for your reviewer**:
none
**Release note**:
none
2017-08-17 16:56:27 -07:00
Yinan Li 5cb7ddbf54 Added lister expansions for DaemonSet, Deployment, ReplicaSet, and
StatefulSet for apps/v1beta2
2017-08-17 15:51:40 -07:00
Clayton Coleman e5857b1ec0
Make generic metadata conform to documented name column convention 2017-08-17 17:41:34 -04:00
Clayton Coleman 0b0235b484
Verify TableConversion behavior in resttest 2017-08-17 17:41:33 -04:00
Kubernetes Submit Queue 9d302ecffa Merge pull request #50698 from liyinan926/cr-v1beta2
Automatic merge from submit-queue (batch tested with PRs 50563, 50698, 50796)

Add ControllerRevision to apps/v1beta2

**What this PR does / why we need it**:
This PR added `ControllerRevision` currently in `apps/v1beta1` to `apps/v1beta2`.

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

**Special notes for your reviewer**:
@kow3ns @janetkuo 

**Release note**:
```release-note
Add ControllerRevision to apps/v1beta2
```
2017-08-17 12:18:29 -07:00
Kubernetes Submit Queue 5e5b586e55 Merge pull request #50325 from p0lyn0mial/sample_server_ban_flunder_plugin_get_name
Automatic merge from submit-queue

Small improvement in ban flunder admission plugin.

**What this PR does / why we need it**:
After the changes a name will be taken directly from meta field.
Previously a name was taken via attributes.GetName() method,
which in turns derived a name from a URL address.
This didn't work as we don't allow to pass a name when POSTing a resource.

#47868

**Release note**:

```
NONE
```
2017-08-17 10:56:47 -07:00
Dr. Stefan Schimanski e3a3d108fb Fixup after k8s.io/{kube-gen -> code-generator} rename 2017-08-17 17:55:12 +02:00
guangxuli d4b41afe59 fix incorrect logic 2017-08-17 22:59:45 +08:00
p0lyn0mial 3a00be1f66 Small improvement in ban flunder admission plugin.
After the changes a name will be also taken directly from meta field.
Previously a name was taken only via attributes.GetName() method,
which in turns derived a name from a URL address.
This didn't work as we don't allow to pass a name when POSTing a resource.
2017-08-17 16:22:36 +02:00
Di Xu 84bf931580 newline to separate unimplemented elements 2017-08-17 22:19:21 +08:00
Dr. Stefan Schimanski 9af3618126 Rename k8s.io/{kube-gen -> code-generator} 2017-08-17 13:15:27 +02:00
gmarek 0504cfbc25 Make metav1.(Micro)?Time functions take pointers 2017-08-17 11:24:28 +02:00
Kubernetes Submit Queue 9c8f74e45c Merge pull request #47987 from wongma7/reclaimpolicy
Automatic merge from submit-queue (batch tested with PRs 49869, 47987, 50211, 50804, 50583)

Add ReclaimPolicy field to StorageClass

fix https://github.com/kubernetes/kubernetes/issues/38192, enough people want this imo so going ahead and adding it according to initial suggested design

some considerations:
* No Recycle allowed, Retain (& Delete) only.
* Do we need to gate the field.
* E2E test where a Retain PV is dynamically provisioned is TODO if we agree we want this & this is the way to do it.
* Need a feature repo issue to track docs and stuff for 1.8

**Release note**:

```release-note
StorageClass has a new field to configure reclaim policy of dynamically provisioned PVs.
```
2017-08-17 01:32:18 -07:00
Nikhita Raghunath 5c354615e0 update CRD strategy for status updates
1. Clear the status of the CRD and set the Generation before creation.
2. While updating the CRD:
    - ignore changes on status.
    - increase Generation if spec changes.
3. Don't update objectmeta when status is updated.
    - however, update finalizers. Without this, deletion will timeout.
2017-08-17 11:45:20 +05:30
Kubernetes Submit Queue baa6b2ff20 Merge pull request #50777 from apelisse/useful-error
Automatic merge from submit-queue (batch tested with PRs 49342, 50581, 50777)

apimachinery: Print unknown transport type

The current error message prints a pointer value rather than the actual
type, which is really not useful.

e.g.:

```
# Old:
unknown transport type: &{0xc42044a7b0 0xc4208d6dc0}

# New:
unknown transport type: *gcp.conditionalTransport
```

**What this PR does / why we need it**: Makes an error message more useful.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-16 23:08:17 -07:00
Yinan Li 3b4f263b67 Added auto-generated changes 2017-08-16 21:29:03 -07:00
Yinan Li 975257633b Add ControllerRevision to apps/v1beta2 2017-08-16 20:49:01 -07:00
Kubernetes Submit Queue ce1485c626 Merge pull request #48922 from ConnorDoyle/integer-resources-as-default
Automatic merge from submit-queue (batch tested with PRs 46317, 48922, 50651, 50230, 47599)

Resources outside the `*kubernetes.io` namespace are integers and cannot be over-committed.

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

Fixes #50473 

Rationale: since the scheduler handles all resources except CPU as integers, that could just be the default behavior for namespaced resources.

cc @RenaudWasTaken @vishh 

**Release note**:

```release-note
Resources outside the `*kubernetes.io` namespace are integers and cannot be over-committed.
```
2017-08-16 19:50:15 -07:00
Kubernetes Submit Queue 427d763a3f Merge pull request #50643 from kow3ns/enableappsv1beta2
Automatic merge from submit-queue

Enables the v1beta2 version of the apps API group by default

**What this PR does / why we need it**: Enables the v1beta2 version of the apps API group by default

fixes # #50641

```release-note
apps/v1beta2 is enabled by default. DaemonSet, Deployment, ReplicaSet, and StatefulSet have been moved to this group version.
```
2017-08-16 18:07:35 -07:00
Kubernetes Submit Queue 4032896ef1 Merge pull request #41901 from soltysh/cronjobs_beta
Automatic merge from submit-queue

Promote CronJobs to batch/v1beta1 - just the API

This PR promotes CronJobs to beta.

@erictune @kubernetes/sig-apps-api-reviews @kubernetes/api-approvers ptal

This builds on top of #41890 and needs #40932 as well

```release-note
Promote CronJobs to batch/v1beta1.
```
2017-08-16 15:59:46 -07:00
Diego Pontoriero 78e1c6fe29
Remove incorrect patch-merge directives.
Directives were misplaced for the following types:

- MatchExpressions
- Taints
- Tolerations

Per the discussion in #46547, we cannot fix these because it would cause
backwards-compatibility problems. Instead, remove the incorrect ones so
they don't mislead users. This has no impact on behavior.
2017-08-16 15:39:10 -07:00
Connor Doyle 630af5422b OIR predicate includes namespaced resources. 2017-08-16 15:29:24 -07:00
Kenneth Owens 8a466ec47b generated code 2017-08-16 12:30:26 -07:00
Kenneth Owens aa321b4915 enables apps/v1beta2 and removes WIP comments from documentation 2017-08-16 12:30:07 -07:00
Kubernetes Submit Queue 6bc0b295b5 Merge pull request #50387 from jcbsmpsn/metric-certificate-expiration
Automatic merge from submit-queue

Add metric for remaining lifetime of certificates authenticating requests

fixes #50778

When incoming requests to the API server are authenticated by a certificate, the expiration of the certificate can affect the validity of the authentication. With auto rotation of certificates, which is starting with kubelet certificates, the goal is to use shorter lifetimes and let the kubelet renew the certificate as desired. Monitoring certificates which are approaching expiration and not renewing would be an early warning sign that nodes are about to stop participating in the cluster.

**Release note**:

```release-note
Add new Prometheus metric that monitors the remaining lifetime of certificates used to authenticate requests to the API server.
```
2017-08-16 10:19:22 -07:00
Antoine Pelisse d8d16a79ee apimachinery: Print unknown transport type
The current error message prints a pointer value rather than the actual
type, which is really not useful.

e.g.:

```
unknown transport type: &{0xc42044a7b0 0xc4208d6dc0}

unknown transport type: *gcp.conditionalTransport
```
2017-08-16 09:05:18 -07:00
Kubernetes Submit Queue b68b984917 Merge pull request #50758 from jianglingxia/jlx081656
Automatic merge from submit-queue (batch tested with PRs 50758, 48057)

continue fix the typo in staging file

**What this PR does / why we need it**:
in kubernetes has left two place to modify the word of explicit,thanks
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #50680 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-16 07:57:21 -07:00
Kubernetes Submit Queue 49bee177b2 Merge pull request #49115 from CaoShuFeng/audit_beta
Automatic merge from submit-queue (batch tested with PRs 49115, 47480)

Upgrade advanced audit to version v1beta1

This change does nothing but only upgrades advanced audit to version v1beta1.
There will be following up changes which does real effect to advanced audit feature.

After this change audit policy file should contain apiVersion and kind and has such format:
```
apiVersion: audit.k8s.io/v1alpha1
kind: Policy
rules:
  - level: None
```
or use the v1beta1 policy:
```
apiVersion: audit.k8s.io/v1beta1
kind: Policy
rules:
  - level: None
```
Updates #48561

**Release note**:

```
Upgrade advanced audit to version v1beta1.
```
2017-08-16 06:27:25 -07:00
Dr. Stefan Schimanski 1dc251a160 audit: disable new v1beta1 types until incompatible changes are done 2017-08-16 19:25:16 +08:00
Cao Shufeng 0410221c3f run hack/update-all.sh 2017-08-16 19:25:11 +08:00
Cao Shufeng f4e8b8f146 upgrade advanced audit to v1beta1 2017-08-16 18:59:49 +08:00
Kubernetes Submit Queue 49ed2a3115 Merge pull request #50204 from smarterclayton/move_list_to_metav1
Automatic merge from submit-queue (batch tested with PRs 50711, 50742, 50204)

Move List (the type) into metav1 but preserve the exposed type

Make a list something that other components can use without depending on the core API. This does not change the public API exposure of `List` (it is still in `v1`) but makes the interface common across both.
2017-08-16 02:50:26 -07:00
jianglingxia 9eed07c6e9 continue fix the typo 2017-08-16 17:02:43 +08:00
Maciej Szulik 025de6a35a
Generated changes for CronJobs in batch/v1beta1 2017-08-16 08:42:21 +02:00
Maciej Szulik 43b8715d82
Promote CronJobs to batch/v1beta1 2017-08-16 08:42:21 +02:00
Clayton Coleman 1b3836d5df
Move List (the type) into metav1 but preserve the exposed type 2017-08-15 22:30:40 -04:00
crimsonfaith91 720f041985 mark created-by annotation as deprecated 2017-08-15 17:08:07 -07:00
Diego Pontoriero cbc116fa3c
Fix forkedjson.LookupPatchMetadata for pointers.
The provided test case fails without the lines added to fields.go.
2017-08-15 16:20:57 -07:00
Kubernetes Submit Queue 039f898c07 Merge pull request #50639 from simo5/setheader
Automatic merge from submit-queue (batch tested with PRs 50023, 50639)

Extend SetHeader Requests method ito accept multiple values

This allows to set headers that are multivalued directly.
The headers variable is not directly accessible and currently
SetHeaders allows to set only one value.

```release-note
NONE
```
2017-08-15 11:23:55 -07:00
Kubernetes Submit Queue eba54ef037 Merge pull request #50683 from sttts/sttts-deepcopy-calls-apiextensions
Automatic merge from submit-queue (batch tested with PRs 50626, 50683, 50679, 50684, 50460)

apiextensions: simplify deepcopy calls
2017-08-15 10:28:23 -07:00
Kubernetes Submit Queue 2d5624bb2c Merge pull request #50681 from sttts/sttts-deepcopy-calls-apiserver
Automatic merge from submit-queue

apiserver: simplify deepcopy calls
2017-08-15 08:31:07 -07:00
Kubernetes Submit Queue 28a5ecb91b Merge pull request #50682 from sttts/sttts-deepcopy-calls-apimachinery
Automatic merge from submit-queue (batch tested with PRs 50577, 50682)

apimachinery: simplify deepcopy calls
2017-08-15 07:39:09 -07:00
Kubernetes Submit Queue 3211d4dde6 Merge pull request #50577 from crassirostris/audit-graceful-shotdown
Automatic merge from submit-queue

advanced audit: shutdown batching audit webhook gracefully

Follow-up of https://github.com/kubernetes/kubernetes/pull/50439

When the `stopCh` passed to the batching audit webhook is closed, it stops accepting new events and when `Shutdown` method is called afterwards, it blocks until the last request to the webhook has finished.

/cc @tallclair @soltysh
2017-08-15 06:54:57 -07:00
Dr. Stefan Schimanski 05e10eb3fb apiextensions: simplify deepcopy calls 2017-08-15 14:42:29 +02:00
Dr. Stefan Schimanski e7424b64ce apimachinery: simplify deepcopy calls 2017-08-15 14:29:28 +02:00
Mik Vyatskov 7798d32fc7 Implement batching audit webhook graceful shutdown 2017-08-15 14:21:09 +02:00
Dr. Stefan Schimanski b2442224e7 apiserver: simplify deepcopy calls 2017-08-15 14:19:21 +02:00
Kubernetes Submit Queue 1268c1a1e0 Merge pull request #50638 from nikhita/feature-gates-doc
Automatic merge from submit-queue

FeatureGate: update comments

The godoc - https://godoc.org/k8s.io/apiserver/pkg/util/feature - does not contain descriptions of the functions. This PR adds them.

**Release note**:

```release-note
NONE
```

/cc @sttts
2017-08-15 03:58:23 -07:00
Dr. Stefan Schimanski 11b25366bc apiservers: add synchronous shutdown mechanism on SIGTERM+INT 2017-08-15 09:17:18 +02:00
Kubernetes Submit Queue 3537f8fa34 Merge pull request #49454 from dixudx/cleanup_DaemonSet_templateGeneration
Automatic merge from submit-queue

Cleanup DaemonSet templateGeneration

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

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

**Special notes for your reviewer**:

/cc @janetkuo @foxish 

~~Depends on #49071~~ (Merged) 

**Release note**:

```release-note
None
```
2017-08-15 00:01:06 -07:00
Kubernetes Submit Queue f9c861aa10 Merge pull request #50553 from m1093782566/fed-kube-apiserver
Automatic merge from submit-queue (batch tested with PRs 49129, 50436, 50417, 50553, 47587)

add validation for fed-apiserver and apiserver run options

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

Add validation for fed-apiserver and apiserver run options

**Which issue this PR fixes** 

fixes #50552

**Special notes for your reviewer**:

This is a follow-up of #50135

**Release note**:

```release-note
NONE
```
2017-08-14 19:49:03 -07:00
Kubernetes Submit Queue 9ac6e4ae6f Merge pull request #50436 from dixudx/fix_Taint_type_comment
Automatic merge from submit-queue (batch tested with PRs 49129, 50436, 50417, 50553, 47587)

Fix Type Taint comment

**What this PR does / why we need it**:
remvoe redundant words in Type `Taint`.

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

**Special notes for your reviewer**:
/assign @k82cn 

**Release note**:

```release-note
None
```
2017-08-14 19:48:59 -07:00
ymqytw 7500b55ce4 move retry to client-go 2017-08-14 14:16:26 -07:00
Nikhita Raghunath fea5a8bc8a FeatureGate: update comments 2017-08-15 02:27:48 +05:30
Simo Sorce 1f44ccd01c Extend SetHeader Requests method ito accept multiple values
This allows to set headers that are multivalued directly.
The headers variable is not directly accessible and currently
SetHeaders allows to set only one value.

Signed-off-by: Simo Sorce <simo@redhat.com>
2017-08-14 16:42:00 -04:00
Kubernetes Submit Queue 9f902fef24 Merge pull request #50094 from sttts/sttts-no-importprefix
Automatic merge from submit-queue (batch tested with PRs 50094, 48966, 49478, 50593, 49140)

apimachinery: remove pre-apigroups import path logic

Replacing #50093.
2017-08-14 12:14:55 -07:00
Matthew Wong 396e6f6eb1 Generated StorageClass.ReclaimPolicy code 2017-08-14 13:36:58 -04:00
Matthew Wong 0356a840ff Add ReclaimPolicy field to StorageClass 2017-08-14 13:34:32 -04:00
Kubernetes Submit Queue ecd28d97c8 Merge pull request #50139 from mfojtik/fix-clientgen
Automatic merge from submit-queue

codegen: skip generation of informers and listers on resources with missing verbs

This patch will prevent generation of listers and informers for resources that does not implement the required verbs (list, get, watch). Currently informers and listers are generated for those resources which cause a compilation failure.
2017-08-14 03:31:46 -07:00
Kubernetes Submit Queue 4193357272 Merge pull request #50329 from rrati/raw-unmarshal-nil
Automatic merge from submit-queue (batch tested with PRs 47034, 50329)

RawExtension unmarshal will produce empty objects if the original object was nil #50323

**What this PR does / why we need it**:
marshaled nil objects will be unmarshaled as nil objects instead of a byte array "null", which better represents the original object before marshaling

fixes #50323

@kubernetes/sig-api-machinery-bugs
2017-08-14 02:43:54 -07:00
xiangpengzhao 72f4ab70e2 Remove deprecated flag "long-running-request-regexp". 2017-08-13 00:26:52 +08:00
m1093782566 f2ea31fd92 add validation for fed-apiserver 2017-08-12 20:04:14 +08:00
Di Xu 4d3cba7740 auto-gen 2017-08-12 02:40:36 +00:00
Di Xu 34d573c977 deprecation of .spec.templateGeneration from extensions/v1beta1 DaemonSet to apps/v1beta2 2017-08-12 02:15:06 +00:00
Kubernetes Submit Queue a7ce691311 Merge pull request #49785 from FengyunPan/fix-getPortByIP
Automatic merge from submit-queue (batch tested with PRs 47724, 49984, 49785, 49803, 49618)

Fix conflict about getPortByIp

**What this PR does / why we need it**:
Currently getPortByIp() get port of instance only based on IP.
If there are two instances in diffent network and the CIDR of
their subnet are same, getPortByIp() will be conflict.
My PR gets port based on IP and Name of instance.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-08-11 18:47:19 -07:00
Kubernetes Submit Queue 42adb9ef25 Merge pull request #50258 from liggitt/token-cache
Automatic merge from submit-queue (batch tested with PRs 49488, 50407, 46105, 50456, 50258)

Enable caching successful token authentication

Resolves #50472

To support revocation of service account tokens, an etcd lookup of the token and service account is done by the token authenticator. Controllers that make dozens or hundreds of API calls per second (like the endpoints controller) cause this lookup to be done very frequently on the same objects.

This PR:
* Implements a cached token authenticator that conforms to the authenticator.Token interface
* Implements a union token authenticator (same approach as the union request authenticator, conforming to the authenticator.Token interface)
* Cleans up the auth chain construction to group all token authenticators (means we only do bearer and websocket header parsing once)
* Adds a 10-second TTL cache to successful token authentication

```release-note
API server authentication now caches successful bearer token authentication results for a few seconds.
```
2017-08-11 14:14:06 -07:00
Kubernetes Submit Queue 941ad0164d Merge pull request #50407 from ixdy/gazelle-and-kazel
Automatic merge from submit-queue (batch tested with PRs 49488, 50407, 46105, 50456, 50258)

Manage BUILD files using gazelle + kazel

**What this PR does / why we need it**: uses the upstream `gazelle` tool to manage go rules in BUILD files.
This is needed to support Bazel builds on Mac OS and Bazel cross compilation in general.

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

**Special notes for your reviewer**:
It's probably easiest to review this commit-by-commit:
* bump to latest `rules_go` (for recent `cgo_library` and `gazelle` improvements)
* update `kazel` with recent compatibility fixes (https://github.com/kubernetes/repo-infra/pull/28, https://github.com/kubernetes/repo-infra/pull/27), update `hack` scripts to download/build `gazelle`, and then run both `gazelle` and `kazel`. (Additionally make `gazelle` skip things it shouldn't touch.)
* run `hack/update-bazel.sh` to autogenerate everything
* remove the old `cgo_genrule` rules - these are now part of `go_library`
* remove the `automanaged` tags from all go rules - `gazelle` doesn't use them, and it prevents an old version of `kazel/gazel` from messing with the rules
* remove the `licenses()` rules from everywhere but `third_party/` - we don't need them, and `gazelle` won't add them on new `BUILD` files it generates.

**Release note**:

```release-note
NONE
```
for review:
/assign @mikedanese @spxtr 
for approval:
/assign @thockin
2017-08-11 14:13:57 -07:00
Kubernetes Submit Queue 984f1af5c5 Merge pull request #50308 from m1093782566/validate-apiserver
Automatic merge from submit-queue

validate kube-apiserver options

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

Create Validate() or add more checks in existing Validate() for the following files:

* vendor/k8s.io/apiextensions-apiserver/pkg/cmd/server/start.go:80

* vendor/k8s.io/kube-aggregator/pkg/cmd/server/start.go:104

* vendor/k8s.io/sample-apiserver/pkg/cmd/server/start.go:82

* cmd/kube-apiserver/app/options/validation.go:49

**Which issue this PR fixes**: 

fixes #50301

**Special notes for your reviewer**:

This PR follows #50135 

**Release note**:

```release-note
NONE
```
2017-08-11 12:56:00 -07:00
Jacob Simpson 49a19c6011 Add metric for remaining life of authenticating certificates
When incoming requests to the API server are authenticated by a
certificate, the expiration of the certificate can affect the validity
of the authentication. With auto rotation of certificates, which is
starting with kubelet certificates, the goal is to use shorter lifetimes
and let the kubelet renew the certificate as desired. Monitoring
certificates which are approaching expiration and not renewing would be
an early warning sign that nodes are about to stop participating in the
cluster.
2017-08-11 11:18:34 -07:00
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton 33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Jeff Grafton cf55f9ed45 Autogenerate BUILD files 2017-08-11 09:30:23 -07:00
Kubernetes Submit Queue 868fef189c Merge pull request #49752 from bsalamat/priority_scheduler
Automatic merge from submit-queue

Add a heap to client-go. Heap orders items with heap invariant ordering.

**What this PR does / why we need it**:
Heap is useful in implementing priority queues. Some components may need such ordering to process their highest priority objects first. Scheduler is going to be the first user of the heap. It will store pending pods ordered by their priority, so that the highest priority pods are popped first to be scheduled.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

ref/ #47604
ref/ #48646

@kubernetes/api-reviewers @kubernetes/sig-scheduling-pr-reviews @davidopp 
/assign @caesarxuchao
2017-08-11 08:27:22 -07:00
Dr. Stefan Schimanski 87c9f89cb1 apimachinery: remove misleading NewDefaultRESTMapper 2017-08-11 16:47:02 +02:00
Kubernetes Submit Queue d40bfff297 Merge pull request #50135 from m1093782566/fed-apiserver-validation
Automatic merge from submit-queue

add some checks for fedration-apiserver options

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

I find there is a TODO, see https://github.com/kubernetes/kubernetes/blob/master/federation/cmd/federation-apiserver/app/options/validation.go#L30

This PR add some checks for fedration-apiserver options

@sttts 

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-11 01:33:00 -07:00
Kubernetes Submit Queue 524a0e04c4 Merge pull request #50224 from xiangpengzhao/remove-beta-annotations
Automatic merge from submit-queue

Remove deprecated ESIPP beta annotations

**What this PR does / why we need it**:
Remove deprecated ESIPP beta annotations.

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

**Special notes for your reviewer**:
/assign @MrHohn
/sig network

**Release note**:

```release-note
Beta annotations `service.beta.kubernetes.io/external-traffic` and `service.beta.kubernetes.io/healthcheck-nodeport` have been removed. Please use fields `service.spec.externalTrafficPolicy` and `service.spec.healthCheckNodePort` instead.
```
2017-08-10 22:55:54 -07:00
Kubernetes Submit Queue d72ffcd89f Merge pull request #49983 from liyinan926/master
Automatic merge from submit-queue

Added field CollisionCount to StatefulSetStatus

**What this PR does / why we need it**:
This PR added a new field `CollisionCount` into `StatefulSetStatus`, similarly in terms of both name and semantics to the existing `CollisionCount` field in `DaemonSetStatus`.  The field will be used for collision avoidance when the `StatefulSet` controller creates name for the newest ControllerRevision, which will be done in another PR.

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

**Special notes for your reviewer**:
A second PR will include logic that actually uses the field for collision avoidance.

**Release note**:
```release-note
Added field CollisionCount to StatefulSetStatus in both apps/v1beta1 and apps/v1beta2
```
2017-08-10 19:35:15 -07:00
Kubernetes Submit Queue 87d1de667f Merge pull request #49530 from dixudx/pod_affinity_legacy_todo
Automatic merge from submit-queue

add newline for  unimplemented RequiredDuringSchedulingRequiredDuringExecution

**What this PR does / why we need it**:
Unimplemented `RequiredDuringSchedulingRequiredDuringExecution` should not be treated as  comments of `RequiredDuringSchedulingIgnoredDuringExecution`

* [pkg/api/types.go#L1937](https://github.com/kubernetes/kubernetes/blob/master/pkg/api/types.go#L1937)

* [staging/src/k8s.io/api/core/v1/types.go#L2155](https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/api/core/v1/types.go#L2155)

>  // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.

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

**Special notes for your reviewer**:

* Add an empty line to separate them. 

/cc @aveshagarwal @bsalamat @gyliu513 @k82cn @timothysc

**Release note**:

```release-note
None
```
2017-08-10 18:45:38 -07:00
Bobby (Babak) Salamat 68926a22ac autogenerated files 2017-08-10 11:14:59 -07:00
Bobby (Babak) Salamat 6cad5bbff9 Add a heap data store to client-go 2017-08-10 11:14:59 -07:00
mtanino 422ce036e7 Autogenerated files 2017-08-10 10:37:08 -04:00
mtanino 03e28476c4 FC plugin: Support WWID for volume identifier
This PR adds World Wide Identifier (WWID) parameter to
FCVolumeSource as an unique volume identifier.

fixes #48639
2017-08-10 09:59:31 -04:00
Kubernetes Submit Queue 52b82eda20 Merge pull request #50444 from nikhita/fix-jsonpath-comment-typos
Automatic merge from submit-queue (batch tested with PRs 50386, 50374, 50444, 50382)

jsonpath: fix comments

Minor fix to the comments. And avoid a named return value.

**Release note**:

```release-note
NONE
```

/cc @sttts
2017-08-10 05:33:58 -07:00
Kubernetes Submit Queue 267d13a474 Merge pull request #50374 from p0lyn0mial/sample_server_wire_admission
Automatic merge from submit-queue (batch tested with PRs 50386, 50374, 50444, 50382)

wires ban flunder admission plugin to the sample server

**What this PR does / why we need it**:
this PR wires ban flunder admission plugin to the sample server.

**Release note**:

```
NONE
```
2017-08-10 05:33:56 -07:00
Dr. Stefan Schimanski 8728576236 apimachinery: remove pre-apigroups import prefix logic 2017-08-10 13:07:54 +02:00
Nikhita Raghunath 77e347b8d0 jsonpath: fix comments
avoid named return errors

fix compile error
2017-08-10 15:04:28 +05:30
Kubernetes Submit Queue 85e2e5dd9a Merge pull request #49642 from liggitt/rbac-v1
Automatic merge from submit-queue (batch tested with PRs 49642, 50335, 50390, 49283, 46582)

Add rbac.authorization.k8s.io/v1

xref https://github.com/kubernetes/features/issues/2

Promotes the rbac.authorization.k8s.io/v1beta1 API to v1 with no changes

```release-note
The `rbac.authorization.k8s.io/v1beta1` API has been promoted to `rbac.authorization.k8s.io/v1` with no changes.
The `rbac.authorization.k8s.io/v1alpha1` version is deprecated and will be removed in a future release.
```
2017-08-10 00:53:17 -07:00
Di Xu f873da91f3 auto-gen 2017-08-10 15:36:52 +08:00
Di Xu f557ba1b09 remvoe redundant words in Type Taint 2017-08-10 15:16:50 +08:00
Kubernetes Submit Queue f6d90eaa45 Merge pull request #49321 from dgoodwin/export-wiring
Automatic merge from submit-queue (batch tested with PRs 49615, 49321, 49982, 49788, 50355)

Fix unused Secret export logic.

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

The strategy used for the secret store defined custom export logic, and
had accompanying unit tests. However the secret storage did not actually
wire this up by setting an ExportStrategy and thus the code was never
used in the real world.

This change fixes the missing assignment and adds testing at a higher
level to ensure any uses of the generic registry.Store that we expect to
have an ExportStrategy do, and no others.

Several other strategies in the RBAC package also appeared to have
unwired Export logic, however their implementations were all empty
leading me to believe that these are not considered exportable. The
empty methods have now been removed.

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

**Release note**:

```release-note
```
2017-08-09 23:56:00 -07:00
Kubernetes Submit Queue 9466dbb4ab Merge pull request #50328 from shiywang/selflink
Automatic merge from submit-queue (batch tested with PRs 50300, 50328, 50368, 50370, 50372)

Add unit tests for GenerateLink

Fixes https://github.com/kubernetes/kubernetes/issues/48321
cc @lavalamp 

```release-note
NONE
```
2017-08-09 22:58:23 -07:00
Jordan Liggitt 4fd8196cf5
Add union token authenticator 2017-08-09 23:37:04 -04:00
Jordan Liggitt 1670ba58d5
Add token cache component 2017-08-09 23:36:43 -04:00
Jordan Liggitt 15d8509a71
Add token group adder component 2017-08-09 23:36:12 -04:00
Kenneth Owens 8fb609ba78 generated code 2017-08-09 15:19:47 -07:00
Kenneth Owens 509af53cbd Adds v1.Service.PublishUnreadyAddresses and deprecates service.alpha.kubernetes.io/tolerate-unready-endpoints 2017-08-09 15:17:56 -07:00
Kubernetes Submit Queue 458cc04330 Merge pull request #46254 from mtaufen/dkcfg
Automatic merge from submit-queue (batch tested with PRs 50016, 49583, 49930, 46254, 50337)

Alpha Dynamic Kubelet Configuration

Feature: https://github.com/kubernetes/features/issues/281

This proposal contains the alpha implementation of the Dynamic Kubelet Configuration feature proposed in ~#29459~ [community/contributors/design-proposals/dynamic-kubelet-configuration.md](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/dynamic-kubelet-configuration.md). 

Please note:
- ~The proposal doc is not yet up to date with this implementation, there are some subtle differences and some more significant ones. I will update the proposal doc to match by tomorrow afternoon.~
- ~This obviously needs more tests. I plan to write several O(soon). Since it's alpha and feature-gated, I'm decoupling this review from the review of the tests.~ I've beefed up the unit tests, though there is still plenty of testing to be done.
- ~I'm temporarily holding off on updating the generated docs, api specs, etc, for the sake of my reviewers 😄~ these files now live in a separate commit; the first commit is the one to review.

/cc @dchen1107 @vishh @bgrant0607 @thockin @derekwaynecarr 

```release-note
Adds (alpha feature) the ability to dynamically configure Kubelets by enabling the DynamicKubeletConfig feature gate, posting a ConfigMap to the API server, and setting the spec.configSource field on Node objects. See the proposal at https://github.com/kubernetes/community/blob/master/contributors/design-proposals/dynamic-kubelet-configuration.md for details.
```
2017-08-09 14:14:32 -07:00
Kubernetes Submit Queue 212928ad14 Merge pull request #49930 from soltysh/remove_scheduledjobs
Automatic merge from submit-queue (batch tested with PRs 50016, 49583, 49930, 46254, 50337)

Remove scheduledjobs

This is a prerequisite for promoting CronJobs to beta.

**Release note**:
```release-note
Remove deprecated ScheduledJobs endpoints, use CronJobs instead.
```
2017-08-09 14:14:30 -07:00
Jordan Liggitt 06c49423ed
Generated files 2017-08-09 17:04:54 -04:00
Jordan Liggitt dd7be70a4a
Add rbac.authorization.k8s.io/v1 2017-08-09 17:04:54 -04:00
Kubernetes Submit Queue da549596c4 Merge pull request #49534 from smarterclayton/separate_proxy
Automatic merge from submit-queue

Support exec/attach/portforward in `kubectl proxy`

Use the UpgradeAwareProxy shared code in kubectl proxy. Provide a separate transport for those requests that does not have HTTP/2 enabled. Refactor the code to be a bit cleaner in places and to better separate changes.

Fixes #32026

```release-note
`kubectl proxy` will now correctly handle the `exec`, `attach`, and `portforward` commands.  You must pass `--disable-filter` to the command in order to allow these endpoints.
```
2017-08-09 09:53:35 -07:00
Yinan Li 7ec391ebb1 Merge branch 'master' of github.com:kubernetes/kubernetes 2017-08-09 09:07:21 -07:00
Yinan Li f4d596356a Added changes as a result of running make update 2017-08-09 08:44:19 -07:00
p0lyn0mial 760f9d1c0b wires ban flunder admission plugin to the sample server 2017-08-09 16:35:39 +02:00
Devan Goodwin 855a1c1713 Fix unused Secret export logic.
The strategy used for the secret store defined custom export logic, and
had accompanying unit tests. However the secret storage did not actually
wire this up by setting an ExportStrategy and thus the code was never
used in the real world.

This change fixes the missing assignment and adds testing at a higher
level to ensure any uses of the generic registry.Store that we expect to
have an ExportStrategy do, and no others.

Several other strategies in the RBAC package also appeared to have
unwired Export logic, however their implementations were all empty
leading me to believe that these are not considered exportable. The
empty methods have now been removed.
2017-08-09 11:07:51 -03:00
Kubernetes Submit Queue 3d91ba577d Merge pull request #50175 from foxish/update-strategies
Automatic merge from submit-queue

Change default update strategy to rolling update

Fixes https://github.com/kubernetes/kubernetes/issues/49604
Change default update strategy to rolling update for daemonset and statefulset in v1beta2

cc @kubernetes/sig-apps-pr-reviews @lukaszo @kargakis 

**Release note**:

```release-note
Make rolling update the default update strategy for v1beta2.DaemonSet and v1beta2.StatefulSet
```
2017-08-09 00:00:21 -07:00
Kubernetes Submit Queue 2bd2127390 Merge pull request #49340 from janetkuo/apps-v1beta2-dep-rollback
Automatic merge from submit-queue

Deprecate Deployment .spec.rollbackTo field 

~Depends on #48746~ (merged)
xref: #46934, #49135

1. Deprecate Deployment field `.spec.rollbackTo` in `extensions/v1beta1` and `apps/v1beta1`, and remove the same field and `/rollback` endpoint from `apps/v1beta2` Deployment. 
1. Add an annotation `deprecated.deployment.rollback.to` in `apps/v1beta2` for conversion to/from other versions. 

Note: `apps/v1beta2` is new in 1.8 (and WIP), so it is okay to make breaking changes to it. 

```release-note
Deprecate Deployment .spec.rollbackTo field 
```
2017-08-08 18:15:38 -07:00
Robert Rati 69e6e5aec7 RawExtension unmarshal will produce empty objects if the original object was nil #50323 2017-08-08 18:36:37 -04:00
Anirudh 37091c3744 Autogenerated 2017-08-08 15:24:12 -07:00
Anirudh 27e6ceed88 Change default update strategy to rolling update 2017-08-08 15:24:09 -07:00
Kubernetes Submit Queue 9b6e6f5327 Merge pull request #50291 from liggitt/restmapper-flake
Automatic merge from submit-queue

Change test to work around restmapper pluralization bug

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

Works around the pluralization bug to unblock the queue.
Once the restmapper bug is fixed in https://github.com/kubernetes/kubernetes/pull/50012, we should add tests specifically for unconventional singular/plural word endings.
2017-08-08 14:46:39 -07:00
Michael Taufen 378544362c core generated files 2017-08-08 12:21:37 -07:00
Michael Taufen 6f0bd47fd8 additional generated files 2017-08-08 12:21:37 -07:00
Michael Taufen 443d58e40a Dynamic Kubelet Configuration
Alpha implementation of the Dynamic Kubelet Configuration feature.
See the proposal doc in #29459.
2017-08-08 12:21:37 -07:00
Shiyang Wang a835d5bdd2 Add unittests for GenerateLink 2017-08-09 00:47:40 +08:00
m1093782566 de406f83cf validate kube-apiserver options 2017-08-09 00:24:37 +08:00
FengyunPan ba463062ca Update gophercloud to support list interfaces of OpenStack instance 2017-08-08 23:29:37 +08:00
Maciej Szulik e465962bf7
Remove ScheduledJobs support 2017-08-08 15:22:26 +02:00
Kubernetes Submit Queue f6cb2fce00 Merge pull request #49587 from ryanmcnamara/rm/improve-error-message
Automatic merge from submit-queue (batch tested with PRs 48068, 49587)

DNS name error message improvement

**What this PR does / why we need it**:
Small error message fix. The error message misled me slightly / would have saved time if correct

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
n/a
**Special notes for your reviewer**:
n/a
**Release note**:

n/a
2017-08-08 05:29:51 -07:00
Kubernetes Submit Queue b80ce17b40 Merge pull request #48063 from zouyee/obc
Automatic merge from submit-queue

complete and correct code comment

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-08-08 04:03:19 -07:00
Kubernetes Submit Queue 187e6ab0bc Merge pull request #50254 from liggitt/revert-disk-cache
Automatic merge from submit-queue (batch tested with PRs 50254, 50174, 50179)

Revert "Merge pull request #47353 from apelisse/http-cache"

Some issues were discovered with the caching merged in #47353:
* uses a disk-based cache that is not safe between processes (does not use atomic fs operations)
* writes get/list responses to disk that should not be cached (like `kubectl get secrets`)
* is vulnerable to partially written cache responses being used as responses to future requests
* breaks uses of the client transport that make use of websockets
* defaults to enabling the cache for any client builder using RecommendedConfigOverrideFlags or DefaultClientConfig which affects more components than just kubectl

This reverts commit fc89743dca, reversing changes made to 29ab38e898.
2017-08-08 04:02:51 -07:00
Kubernetes Submit Queue 243e655161 Merge pull request #48986 from timoreimann/relax-env-var-naming-restrictions
Automatic merge from submit-queue (batch tested with PRs 50208, 50259, 49702, 50267, 48986)

Relax restrictions on environment variable names.

Fixes #2707

The POSIX standard restricts environment variable names to uppercase letters, digits, and the underscore character in shell contexts only. For generic application usage, it is stated that all other characters shall be tolerated. (Reference [here](http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html), my prose reasoning [here](https://github.com/kubernetes/kubernetes/issues/2707#issuecomment-285309156).)

This change relaxes the rules to some degree. Namely, we stop requiring environment variable names to be strict `C_IDENTIFIERS` and start permitting lowercase, dot, and dash characters.

Public container images using environment variable names beyond the shell-only context can benefit from this relaxation. Elasticsearch is one popular example.
2017-08-08 01:53:08 -07:00
Jordan Liggitt b10df4e221
Change test to work around restmapper pluralization bug 2017-08-08 01:20:30 -04:00
Kubernetes Submit Queue 3900e36d62 Merge pull request #50124 from k82cn/k8s_49103
Automatic merge from submit-queue

Removed un-used InodePressure condition.

**What this PR does / why we need it**:
Removed un-used InodePressure condition; kubelet did not report it anymore, so remove it.

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

**Release note**:

```release-note
The node condition 'NodeInodePressure' was removed, as kubelet did not report it.
```
2017-08-07 21:36:48 -07:00
m1093782566 172ab88ce8 add some checks for fedration-apiserver options 2017-08-08 10:20:22 +08:00
Janet Kuo e245fbc2b2 Autogen 2017-08-07 19:11:39 -07:00
Janet Kuo 5473d56373 Remove some apps/v1beta2 generated files so that codegen works 2017-08-07 19:11:39 -07:00
Janet Kuo 0d239605a9 Conversion code for apps/v1beta2 Deployment
Need to convert deprecated .spec.rollbackTo field into
an annotation in apps/v1beta2 Deployment for roundTrip
2017-08-07 19:11:39 -07:00
Janet Kuo e7930520e4 Deprecate Deployment rollbackTo field and remove rollback endpoint
1. Deprecate `.spec.rollbackTo` field in extensions/v1beta1 and
   apps/v1beta1 Deployments
2. Remove the same field from apps/v1beta2 Deployment, and remove
   its rollback subresource and endpoint
2017-08-07 18:35:49 -07:00
Kubernetes Submit Queue 96064570d2 Merge pull request #49834 from guoshimin/fixprematurerturn
Automatic merge from submit-queue

Fix premature return

**What this PR does / why we need it**: Fixes a bug where the loop is prematurely terminated.

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

**Special notes for your reviewer**:

**Release note**: 

NONE
2017-08-07 18:26:29 -07:00
Kubernetes Submit Queue 4e2b905916 Merge pull request #50166 from DirectXMan12/bug/fix-aggregator-with-no-openapi
Automatic merge from submit-queue (batch tested with PRs 49524, 46760, 50206, 50166, 49603)

Handle missing OpenAPI specs on aggregated servers

Previously, the aggregator would fail to actually set up the aggregator
proxy for an API server that was missing an OpenAPI spec.  It would show
up in discovery, but the actual proxying would fail to occur.

Now, we simply log an error if we can't fetch an OpenAPI spec for a
particular aggregated server, and continue on.

Fixes #50165

```release-note
NONE
```
2017-08-07 13:52:03 -07:00
Jordan Liggitt 4ee72eb300
Revert "Merge pull request #47353 from apelisse/http-cache"
This reverts commit fc89743dca, reversing
changes made to 29ab38e898.
2017-08-07 16:20:34 -04:00
Kubernetes Submit Queue 59b8fa32f1 Merge pull request #39587 from zhouhaibing089/openstack-auth-provider
Automatic merge from submit-queue (batch tested with PRs 50087, 39587, 50042, 50241, 49914)

plugin/pkg/client/auth: add openstack auth provider

This is an implementation of auth provider for OpenStack world, just like python-openstackclient, we read the environment variables of a list `OS_*`, and client will cache a token to interact with each components, we can do the same here, the client side can cache a token locally at the first time, and rotate automatically when it expires.

This requires an implementation of token authenticator at server side, refer:

1.  [made by me] https://github.com/kubernetes/kubernetes/pull/25536, I can carry this on when it is fine to go.
2.  [made by @kfox1111] https://github.com/kubernetes/kubernetes/pull/25391

The reason why I want to add this is due to the `client-side` nature, it will be confusing to implement it downstream, we would like to add this support here, and customers can get `kubectl` like they usually do(`brew install kubernetes-cli`), and it will just work.

When this is done, we can deprecate the password keystone authenticator as the following reasons:

1.  as mentioned at some other places, the `domain` is another parameters which should be provided.
2.  in case the user supplies `apikey` and `secrets`, we might want to fill the `UserInfo` with the real name which is not implemented for now.

cc @erictune @liggitt 

```
add openstack auth provider
```
2017-08-07 10:58:57 -07:00
Solly Ross 17eb58131a Handle missing OpenAPI specs on aggregated servers
Previously, the aggregator would fail to actually set up the aggregator
proxy for an API server that was missing an OpenAPI spec.  It would show
up in discovery, but the actual proxying would fail to occur.

Now, we simply log an error if we can't fetch an OpenAPI spec for a
particular aggregated server, and continue on.
2017-08-07 11:04:41 -04:00
Kubernetes Submit Queue 654de23cbf Merge pull request #50145 from gmarek/micro-equality
Automatic merge from submit-queue (batch tested with PRs 49868, 50143, 49377, 50141, 50145)

Add MicroTime to DeepEquals overrides
2017-08-07 04:05:02 -07:00
Kubernetes Submit Queue a0826e1d89 Merge pull request #49377 from CaoShuFeng/audit_id_http_response_header
Automatic merge from submit-queue (batch tested with PRs 49868, 50143, 49377, 50141, 50145)

Return Audit-Id http response header for trouble shooting

Users can use Audit-Id http response header to grep the audit events in log.
This provides a fast way to find the events in audit.
**Release note**:

```
Audit-Id HTTP header is included in the apiserver responses for audited requests, except some cases when it's not possible, e.g. pods/exec.
```
@sttts @tallclair
2017-08-07 04:04:57 -07:00