Commit Graph

2318 Commits (8cbbbac27d427668a655fd704c6db17904520e42)

Author SHA1 Message Date
Tim Hockin 5728b1970a Use json-iterator for JSON, kill off codecgen 2017-08-31 23:30:45 -07:00
Kubernetes Submit Queue 58aa139f99 Merge pull request #48836 from ericchiang/audit-policy-subresource-resource-name
Automatic merge from submit-queue (batch tested with PRs 51574, 51534, 49257, 44680, 48836)

audit policy: support subresources and resource names

Updates #48561

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

/cc @sttts @soltysh @crassirostris @ihmccreery @timstclair
2017-08-31 23:13:26 -07:00
Kubernetes Submit Queue 1a3a0713b2 Merge pull request #51381 from mengqiy/debug_kubectl_get_cm
Automatic merge from submit-queue (batch tested with PRs 50719, 51216, 50212, 51408, 51381)

Surface reasonable error when connection closed

Try to detect connection closure when API server closed the connection due to timeout.
Surface reasonable error when connection closed.

Further improvement may be retrying when detect connection closure

related to #51353

```release-note
Surface reasonable error when client detects connection closed.
```

/assign @mml @caesarxuchao
2017-08-31 21:09:19 -07:00
Kubernetes Submit Queue 393778375b Merge pull request #50212 from jhorwit2/jah/psp-hostpath
Automatic merge from submit-queue (batch tested with PRs 50719, 51216, 50212, 51408, 51381)

Allow PSP's to specify a whitelist of allowed paths for host volume

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

Reverts the revert for the allowed host path feature that was moved from v1.7 to v1.8. This PR also changes the api as discussed in https://github.com/kubernetes/kubernetes/pull/47811.

Original pr: https://github.com/kubernetes/kubernetes/pull/43946
revert: https://github.com/kubernetes/kubernetes/pull/47851

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

**Special notes for your reviewer**:

cc @liggitt @ericchiang @php-coder 

It seems the api build process has changed. Hopefully I did it right 👼 .

**Release note**:

```release-note
Allow PSP's to specify a whitelist of allowed paths for host volume
```
2017-08-31 21:09:14 -07:00
Cao Shufeng 1c3dc52531 audit real impersonated user info
Log the newest impersonated user info in the second audit event. This
will help users to debug rbac problems.
2017-09-01 11:27:23 +08:00
Kubernetes Submit Queue 0f2c2bd847 Merge pull request #50404 from apelisse/http-cache
Automatic merge from submit-queue (batch tested with PRs 51480, 49616, 50123, 50846, 50404)

Kubectl to use http caching to cache openapi responses from the server

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

This PR is trying to address the problems raised in #50254 

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

All of these points are addressed by this pull-request:
1. It now uses atomic fs operations
2. Doesn't cache by default, only if requested by the client (and it's only done by openapi client)
3. Fixed because of atomic fs operations
4. Found the reason for the bug: Cache wrapper couldn't be unwrapped. I implemented the `WrappedRoundTripper` interface.
5. Since 2. is fixed, I think that should be fine

@smarterclayton @liggitt 

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Allows kubectl to use http caching mechanism for the OpenAPI schema. The cache directory can be configured through `--cache-dir` command line flag to kubectl. If set to empty string, caching will be disabled.
```
2017-08-31 20:08:46 -07:00
Kubernetes Submit Queue 00846fc794 Merge pull request #50123 from WIZARD-CXY/fixlog
Automatic merge from submit-queue (batch tested with PRs 51480, 49616, 50123, 50846, 50404)

make get pod log with follow option as CONNECT verb

**What this PR does / why we need it**:
Don't make the get log with follow option request mix with GET pods request. Make it reported as a WATCH pod log request.
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
Fixes #49998 

```release-note
Pod log attempts are now reported in apiserver prometheus metrics with verb `CONNECT` since they can run for very long periods of time.
```
2017-08-31 20:08:40 -07:00
Kubernetes Submit Queue 8679a8f5fe Merge pull request #50163 from jingxu97/Aug/sizeLimit
Automatic merge from submit-queue (batch tested with PRs 51707, 51662, 51723, 50163, 51633)

Change SizeLimit to a pointer

This PR fixes issue #50121

```release-note
The `emptyDir.sizeLimit` field is now correctly omitted from API requests and responses when unset.
```
2017-08-31 18:43:38 -07:00
Kubernetes Submit Queue cd004bb14c Merge pull request #51707 from liggitt/unit-race
Automatic merge from submit-queue (batch tested with PRs 51707, 51662, 51723, 50163, 51633)

Make feature gate threadsafe

Fixes #51548 caused by #51436
2017-08-31 18:43:31 -07:00
Edmund Rhudy 0d0591046c Update Bazel configuration for flag.go and overrides_test.go 2017-08-31 11:11:38 -04:00
Edmund Rhudy 33dff7275d Add tests for stripping "namespaces/" from passed-in namespace 2017-08-31 11:11:30 -04:00
Nikhita Raghunath 6750d38e9b apiextensions: add maximum for validation 2017-08-31 20:07:41 +05:30
Jordan Liggitt d3546434b7
Make feature gate threadsafe 2017-08-31 10:11:11 -04:00
Chenxingyu e49315f2db make api request verb can be overrided and make "GET" pod log request reported as "CONNECT" pod log request for metrics 2017-08-31 21:39:10 +08:00
David Eads de4006b810 generated 2017-08-31 08:05:00 -04:00
deads2k 462a657e48 add information for subresource kind determination: 2017-08-31 08:05:00 -04:00
Maciej Szulik 9fef244d4c
Allow audit to log authorization failures 2017-08-31 12:33:52 +02:00
huangjiuyuan 67f276125f fixing a typo in staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go 2017-08-30 20:06:35 -07:00
Cao Shufeng f94ca49e63 run hack/update-codecgen.sh and hack/update-bazel.sh 2017-08-31 10:04:33 +08:00
Cao Shufeng c57eebfe2f Split APIVersion into APIGroup and APIVersion in audit events
audit.Event.ObjectRef.APIVersion currently holds both the the API group and
version, separated by a /. This change break these out into separate fields.

This is part of:
https://github.com/kubernetes/kubernetes/issues/48561
2017-08-31 09:58:50 +08:00
Kubernetes Submit Queue bc35234269 Merge pull request #51536 from php-coder/fix_typo_in_api_doc
Automatic merge from submit-queue (batch tested with PRs 50775, 51397, 51168, 51465, 51536)

Fix typo in API docs

Typo fix for https://github.com/kubernetes/kubernetes/pull/47019#discussion_r135780591

xref #47019

CC @jessfraz @simo5
2017-08-30 15:14:36 -07:00
Kubernetes Submit Queue 3019daa1dc Merge pull request #51168 from smarterclayton/fix_transport_wrap
Automatic merge from submit-queue (batch tested with PRs 50775, 51397, 51168, 51465, 51536)

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.

Fixes #50466

@liggitt no tests yet, but works locally
2017-08-30 15:14:29 -07:00
Kubernetes Submit Queue a9cceacdae Merge pull request #50775 from apelisse/fail-gke-failing-test
Automatic merge from submit-queue

client-go: Make conditionalTransport a WrapperRoundTripper

**What this PR does / why we need it**:
Fixes broken GKE test: https://k8s-gubernator.appspot.com/builds/kubernetes-jenkins/logs/ci-kubernetes-e2e-gke/

**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-30 15:08:19 -07:00
Antoine Pelisse a804d440c3 client-go cache: Make caching layer Unwrappable 2017-08-30 15:01:46 -07:00
Antoine Pelisse e58da7bb7c c-go cache: Use diskv TempDir to get atomic write 2017-08-30 15:01:46 -07:00
Antoine Pelisse a97a1ba14e c-go cache: Only cache discovery requests
Only cache discovery requests, and only for kubectl.
2017-08-30 15:01:46 -07:00
Kenneth Owens 313a8b304a Adds the rand.SafeEncodeString function and uses this function to
generate names for ReplicaSets and ControllerRevisions.
2017-08-30 14:01:11 -07:00
Jing Xu e1460efcf2 Generated files
generated files
2017-08-30 12:45:41 -07:00
Jing Xu 4d6da1fd9a Change SizeLimit to a pointer
This PR fixes issue #50121
2017-08-30 11:50:35 -07:00
Jordan Liggitt 666e4be37b Allow -n namespaces/<ns> 2017-08-30 10:48:01 -04:00
Slava Semushin 227236bd0c Fix typo in docs. 2017-08-30 12:33:37 +02:00
Kubernetes Submit Queue 583c4a442a Merge pull request #51228 from wongma7/mount-options-sc
Automatic merge from submit-queue

Add storageClass.mountOptions and use it in all applicable plugins

split off from https://github.com/kubernetes/kubernetes/pull/50919 and still dependent on it. cc @gnufied


issue: https://github.com/kubernetes/features/issues/168

```release-note
Add mount options field to StorageClass. The options listed there are automatically added to PVs provisioned using the class.
```
2017-08-29 23:48:32 -07:00
Kubernetes Submit Queue aa9417ce91 Merge pull request #49927 from huangjiuyuan/fix-kubelet-option-validation
Automatic merge from submit-queue (batch tested with PRs 49961, 50005, 50738, 51045, 49927)

adding validations on kubelet starting configurations

**What this PR does / why we need it**:
I found some validations of kubelet starting options were missing when I was creating a custom cluster from scratch. The kubelet does not check invalid configurations on `--cadvisor-port`, `--event-burst`, `--image-gc-high-threshold`, etc. I have added some validations in kubelet like validations in `cmd/kube-apiserver/app/options/validation.go`.

**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
Adds additional validation for kubelet in `pkg/kubelet/apis/kubeletconfig/validation`.
```
2017-08-29 21:43:42 -07:00
Kubernetes Submit Queue 4457e43e7b Merge pull request #47263 from nikhita/crd-01-validation-types
Automatic merge from submit-queue

apiextensions: validation for customresources

- [x] Add types for validation of CustomResources
- [x] Fix conversion-gen: #49747
- [x] Fix defaulter-gen: kubernetes/gengo#61
- [x] Convert to OpenAPI types
- [x] Validate CR using go-openapi
- [x] Validate CRD Schema
- [x] Add integration tests
- [x] Fix round trip tests: #51204 
- [x] Add custom fuzzer functions
- [x] Add custom conversion functions
- [x] Fix data race while updating CRD: #50098 
- [x] Add feature gate for CustomResourceValidation
- [x] Fix protobuf generation

Proposal: https://github.com/kubernetes/community/pull/708
Additional discussion: https://github.com/kubernetes/kubernetes/issues/49879, https://github.com/kubernetes/kubernetes/pull/50625

**Release note**:

```release-note
Add validation for CustomResources via JSON Schema.
```

/cc @sttts @deads2k
2017-08-29 18:37:10 -07:00
Tim Hockin 478ce3453e Add v1 API as a default conversion peer
Some of the APIs call do not this out, and a partial build produces
wrong results.
2017-08-29 17:19:38 -07:00
Kubernetes Submit Queue 0d17e9deb7 Merge pull request #48574 from sakshamsharma/kms-transformer
Automatic merge from submit-queue

Add Google cloud KMS service for envelope encryption transformer

This adds the required pieces which will allow addition of KMS based encryption providers (envelope transformer).

For now, we will be implementing it using Google Cloud KMS, but the code should make it easy to add support for any other such provider which can expose Decrypt and Encrypt calls.

Writing tests for Google Cloud KMS Service may cause a significant overhead to the testing framework. It has been tested locally and on GKE though.

Upcoming after this PR:
* Complete implementation of the envelope transformer, which uses LRU cache to maintain decrypted DEKs in memory.
* Track key version to assist in data re-encryption after a KEK rotation.

Development branch containing the changes described above: https://github.com/sakshamsharma/kubernetes/pull/4

Envelope transformer used by this PR was merged in #49350 

Concerns #48522 

Planned configuration:
```
kind: EncryptionConfig
apiVersion: v1
resources:
  - resources:
    - secrets
    providers:
    - kms:
        cachesize: 100
        configfile: gcp-cloudkms.conf
        name: gcp-cloudkms
    - identity: {}
```

gcp-cloudkms.conf:
```
[GoogleCloudKMS]
    kms-location: global
    kms-keyring: google-container-engine
    kms-cryptokey: example-key
```
2017-08-29 11:11:10 -07:00
Kubernetes Submit Queue ce55939465 Merge pull request #51511 from huangjiuyuan/fix-func-comment
Automatic merge from submit-queue (batch tested with PRs 51298, 51510, 51511)

modifying the comment of BeforeDelete function to improve readability

**What this PR does / why we need it**:
modifying the comment of `BeforeDelete` function in `staging/src/k8s.io/apiserver/pkg/registry/rest/delete.go` to improve readability.

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

**Special notes for your reviewer**:

**Release note**:

`NONE`
2017-08-29 10:38:19 -07:00
Nikhita Raghunath 6ba1523a8e Add feature gate for CustomResourceValidation
update feature gates for generic apiserver

Add apiextensions-apiserver features to golint_failures

Ignore alpha feature if gate is disabled
2017-08-29 21:35:12 +05:30
Nikhita Raghunath ccb8554dd8 Update godeps 2017-08-29 21:35:12 +05:30
Nikhita Raghunath b1e16bff17 Add integration tests
Update test schema

Add polling for TestCRValidationOnCRDUpdate

Add tests for forbidden fields

Enable featureGate for CustomResourceValidation
2017-08-29 21:35:12 +05:30
Nikhita Raghunath fd09c3dbb6 Validate CustomResource
* convert our types to openAPI types
* update strategy to include crd
* use strategy to validate customresource
* add helper funcs
* Fix conversion of empty ref field
* add validation for forbidden fields
* add defaulting for schema field
* Validate CRD Schema
2017-08-29 21:35:12 +05:30
Nikhita Raghunath 64948dfc80 Add generated code
update generated proto
2017-08-29 21:35:12 +05:30
Nikhita Raghunath 6133d84835 Add types for validation of CustomResources
Remove protobuf generation because of the interface type

Add custom fuzzer funcs

Add custom marshalling

Add custom conversion functions

move jsonschema types to separate file
2017-08-29 21:35:12 +05:30
Matthew Wong ca98b8e756 Generated storageClass.mountOptions code 2017-08-29 11:37:36 -04:00
Matthew Wong 5e772b8e4b Add storageClass.mountOptions and use it in all applicable plugins 2017-08-29 11:37:36 -04:00
Kubernetes Submit Queue 777343261d Merge pull request #51504 from huangjiuyuan/fix-comment
Automatic merge from submit-queue (batch tested with PRs 51425, 51404, 51459, 51504, 51488)

fixing package comment of v1

**What this PR does / why we need it**:
fixing package comment of v1 in `staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go`.

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

**Special notes for your reviewer**:

**Release note**:

`NONE`
2017-08-29 04:15:34 -07:00
Kubernetes Submit Queue a9b60b4aa9 Merge pull request #51425 from NickrenREN/remove-scratch-overlay
Automatic merge from submit-queue (batch tested with PRs 51425, 51404, 51459, 51504, 51488)

Remove previous local storage resource name 'scratch" and "overlay"

Remove previous local storage resource name 'scratch" and "overlay"

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

**Special notes for your reviewer**:
Now local ephemeral storage resource name is "ResourceEphemeralStorage",  remove previous names as @vishh  suggested in PR #51070

**Release note**:
```release-note
Remove previous local ephemeral storage resource names: "ResourceStorageOverlay" and "ResourceStorageScratch"
```
2017-08-29 04:15:24 -07:00
Kubernetes Submit Queue 80ea31fcbf Merge pull request #50296 from mengqiy/addApplyTestForReplacekeys
Automatic merge from submit-queue (batch tested with PRs 50919, 51410, 50099, 51300, 50296)

Add `retainKeys` to patchStrategy for v1 Volumes and extentions/v1beta1 DeploymentStrategy

Add `retainKeys` to patchStrategy for v1 Volumes and extentions/v1beta1 DeploymentStrategy.

With the new value in `patchStrategy`, the patch will include an optional directive that will tell the apiserver to clear defaulted fields and update. This will resolve issue like https://github.com/kubernetes/kubernetes/issues/34292#issue-181572469 and similar issue caused by defaulting in volume.

The change is [backward compatible](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/add-new-patchStrategy-to-clear-fields-not-present-in-patch.md#version-skew).

The proposal for this new patch strategy is in https://github.com/kubernetes/community/blob/master/contributors/design-proposals/add-new-patchStrategy-to-clear-fields-not-present-in-patch.md

The implementation to support the new patch strategy's logic is in #44597 and has been merged in 1.7.

```release-note
Add `retainKeys` to patchStrategy for v1 Volumes and extentions/v1beta1 DeploymentStrategy.
```

/assign @apelisse 
/assign @janetkuo for deployment change
/assign @saad-ali for volume change
2017-08-29 03:20:10 -07:00
Kubernetes Submit Queue 79d0c2d554 Merge pull request #51300 from caesarxuchao/remove-failure-policy
Automatic merge from submit-queue (batch tested with PRs 50919, 51410, 50099, 51300, 50296)

Remove failure policy from initializer configuration

A few reasons:
* Implementing fail open initializers increases complexity a lot
* We haven't seen strong use cases
* We can always add it back
2017-08-29 03:20:08 -07:00
Kubernetes Submit Queue ae17c1f2bf Merge pull request #50919 from wongma7/mount-options
Automatic merge from submit-queue (batch tested with PRs 50919, 51410, 50099, 51300, 50296)

Take mount options to GA by adding PV.spec.mountOptions

**What this PR does / why we need it**: Implements https://github.com/kubernetes/community/pull/771

issue: https://github.com/kubernetes/features/issues/168

**Special notes for your reviewer**:

TODO:
- ~StorageClass mountOptions~

As described in proposal, this adds PV.spec.mountOptions + mountOptions parameter to every plugin that is both provisionable & supports mount options.

(personally, even having done all the work already, i don't agree w/ the proposal that mountOptions should be SC parameter but... :))

**Release note**:

```release-note
Add mount options field to PersistentVolume spec
```
2017-08-29 03:20:00 -07:00
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