Commit Graph

3446 Commits (64f56764d5ba7d06cf60e2e5013dcf5e9a453a3c)

Author SHA1 Message Date
chenguoyan01 a7d2a2bef4 fix build vendor
Change-Id: I4ec11639d5f8e8611322ac901afdada3f6aa1180
2017-10-18 14:57:59 +08:00
chenguoyan01 4cff9dab46 add unit tests in /pkg/api/v1helper
Change-Id: I97b1c1d5521d6db6b96bc3659d0484f5527cb6cc
2017-10-18 00:24:35 +08:00
Jeff Grafton aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Davanum Srinivas 21fdd1c5ed Add import-boss directives
The pkg/api/testing can be removed whem kubeadm splits into
its own repository.
The pkg/kubemark probably will remain as is for the foreseeable
future.
2017-10-13 07:06:22 -04:00
Kubernetes Submit Queue 7c75723867 Merge pull request #52383 from dixudx/quote_field_valid_string
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

quote valid strings for field validation

**What this PR does / why we need it**:
Some of the declared const vars are empty string `""`, such as

* [`NamespaceAll`, `NamespaceNone`](https://github.com/kubernetes/kubernetes/blob/master/pkg/api/types.go#L197-L200)
* [`HostPathUnset`](https://github.com/kubernetes/kubernetes/blob/master/pkg/api/types.go#L631)

When validating such supported fields, empty string will be printed without quotes, which is kind of ugly.

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

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

**Release note**:

```release-note
None
```
2017-10-12 20:25:10 -07:00
Di Xu 7508afedd3 quote valid strings for field validation 2017-10-13 07:52:16 +08:00
Dr. Stefan Schimanski a6f0cd01ee Get rid of pkg/api/util 2017-10-12 16:36:32 +02:00
Dr. Stefan Schimanski 9488150762 SimpleNameGenerator: unify to use k8s.io/apiserver/pkg/storage/names 2017-10-11 16:05:52 +02:00
Dr. Stefan Schimanski b926ca40de pkg/api: move *_test.go -> pkg/api/testing 2017-10-11 16:04:50 +02:00
Dr. Stefan Schimanski 509df603b1 apimachinery: mechanical removal of ObjectCopier plumbing 2017-10-06 19:21:03 +02:00
Janet Kuo 9813a5278f Add API version apps/v1
Add a new API version apps/v1.
apps/v1 has a copy of apps/v1beta2.DaemonSet API.
2017-10-05 10:43:11 -07:00
Jordan Liggitt bed6d0f5ea
Use pointer for PSP allow escalation 2017-10-04 13:55:06 -04:00
Kubernetes Submit Queue 731f42172b Merge pull request #51266 from resouer/not-ready
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Refactor node taint conditions

**What this PR does / why we need it**:
We should use `not-ready` etc as node condition taint key.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Use `not-ready` to replace `notReady` in node condition taint keys.
```
2017-10-04 06:56:44 -07:00
Di Xu a1cee9ab3b fix some typos in api types 2017-09-26 10:56:44 +08:00
Kubernetes Submit Queue 3090fe5662 Merge pull request #52803 from jessfraz/AllowPrivilegeEscalation
Automatic merge from submit-queue (batch tested with PRs 51067, 52319, 52803, 52961, 51972). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

AllowPrivilegeEscalation: add validations

Fixes #52454
2017-09-25 14:50:54 -07:00
Jess Frazelle 0ad51ed763
AllowPrivilegeEscalation: add validations for caps and privileged
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2017-09-25 13:22:02 -04:00
Kubernetes Submit Queue 7c9e614cbb Merge pull request #52873 from ixdy/bazel-cleanup
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

bazel: build/test almost everything

**What this PR does / why we need it**: Miscellaneous cleanups and bug fixes. The main motivating idea here was to make `bazel build //...` and `bazel test //...` mostly work. (There's a few reasons these still don't work, but we're a lot closer.)

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/assign @BenTheElder @mikedanese @spxtr
2017-09-24 00:04:36 -07:00
Kubernetes Submit Queue 6e9012c94c Merge pull request #52137 from aveshagarwal/master-scheduler-resources-consolidation
Automatic merge from submit-queue (batch tested with PRs 51902, 52718, 52687, 52137, 52697). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Consolidate extended resources and hugepages in Scheduler

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

@bsalamat @derekwaynecarr @sjenning @kubernetes/sig-scheduling-pr-reviews
2017-09-23 19:49:54 -07:00
Kubernetes Submit Queue 1c0f22ea01 Merge pull request #43016 from liggitt/time-added-pointer
Automatic merge from submit-queue (batch tested with PRs 43016, 50503, 51281, 51518, 51582). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Omit timeAdded from taint when empty

Fixes omitempty portion of https://github.com/kubernetes/kubernetes/issues/42394
2017-09-22 23:35:52 -07:00
Jeff Grafton 532bd482df Use buildozer to remove deprecated automanaged tags 2017-09-21 15:53:22 -07:00
Kubernetes Submit Queue 6808e800c9 Merge pull request #51877 from kargakis/add-tnozicka
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Remove kargakis from OWNERS, add tnozicka

/assign @smarterclayton 
/cc @janetkuo @tnozicka
2017-09-21 13:03:49 -07:00
Kubernetes Submit Queue 158f6b78da Merge pull request #52246 from dixudx/suspect_hostpathtype_nil_ptr
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

suspect nil HostPathType

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

Nil `HostPathType` is suspicious. @luxas Will help re-verify.

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

**Special notes for your reviewer**:
/assign @luxas @thockin 

**Release note**:

```release-note
None
```
2017-09-20 22:22:45 -07:00
Michail Kargakis a702742d31
Remove kargakis from OWNERS, add tnozicka
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-09-19 11:05:23 +02:00
Avesh Agarwal ae05a6da34 Consolidate extended resources and hugepages in Scheduler. 2017-09-18 09:32:16 -04:00
Avesh Agarwal 3e8a8286d8 Bugfix to check overcommit for hugepages. 2017-09-15 10:40:27 -04:00
Harry Zhang 221db2bd6b Refactor node taint conditions 2017-09-15 14:34:11 +08:00
Kubernetes Submit Queue a91c8939b7 Merge pull request #51601 from caesarxuchao/minor-test-fix
Automatic merge from submit-queue (batch tested with PRs 51601, 52153, 52364, 52362, 52342)

Minor fixes to validation test

Some test cases confuse the new object with the old object. This PR fixed that. Also added a test to verify that deletionTimestamp cannot be added (via the REST endpoints).
2017-09-13 09:30:01 -07:00
stewart-yu 7a49841bf1 Add testcase for SelfLink function 2017-09-13 20:20:01 +08:00
andyzhangx 7d4e049ea1 allow windows mount path
fix according to review comments

fix according to review comments
2017-09-13 05:35:56 +00:00
Di Xu 29249e0891 suspect nil pointer for HostPathType 2017-09-10 22:57:10 +08:00
Kubernetes Submit Queue e821e531db Merge pull request #50877 from dixudx/taint_unimplemented_comment
Automatic merge from submit-queue

newline to separate unimplemented TaintEffectNoScheduleNoAdmit

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

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

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

**Release note**:

```release-note
None
```
2017-09-09 02:30:05 -07:00
Kubernetes Submit Queue d6df4a5127 Merge pull request #52063 from mtaufen/dkcfg-e2enode
Automatic merge from submit-queue (batch tested with PRs 52047, 52063, 51528)

Improve dynamic kubelet config e2e node test and fix bugs

Rather than just changing the config once to see if dynamic kubelet
config at-least-sort-of-works, this extends the test to check that the
Kubelet reports the expected Node condition and the expected configuration
values after several possible state transitions.

Additionally, this adds a stress test that changes the configuration 100
times. It is possible for resource leaks across Kubelet restarts to
eventually prevent the Kubelet from restarting. For example, this test
revealed that cAdvisor's leaking journalctl processes (see:
https://github.com/google/cadvisor/issues/1725) could break dynamic
kubelet config. This test will help reveal these problems earlier.

This commit also makes better use of const strings and fixes a few bugs
that the new testing turned up.

Related issue: #50217

I had been sitting on this until the cAdvisor fix merged in #51751, as these tests fail without that fix.

**Release note**:

```release-note
NONE
```
2017-09-08 16:06:56 -07:00
Michael Taufen a846ba191c Improve dynamic kubelet config e2e node test and fix bugs
Rather than just changing the config once to see if dynamic kubelet
config at-least-sort-of-works, this extends the test to check that the
Kubelet reports the expected Node condition and the expected configuration
values after several possible state transitions.

Additionally, this adds a stress test that changes the configuration 100
times. It is possible for resource leaks across Kubelet restarts to
eventually prevent the Kubelet from restarting. For example, this test
revealed that cAdvisor's leaking journalctl processes (see:
https://github.com/google/cadvisor/issues/1725) could break dynamic
kubelet config. This test will help reveal these problems earlier.

This commit also makes better use of const strings and fixes a few bugs
that the new testing turned up.

Related issue: #50217
2017-09-07 15:50:17 -07:00
Jordan Liggitt fe6af20910
Generated files 2017-09-07 14:18:40 -04:00
Jordan Liggitt 3cf760c57e
Change TimeAdded to pointer 2017-09-07 14:13:09 -04:00
Kubernetes Submit Queue 3168bd4b12 Merge pull request #50708 from DirectXMan12/versions/autoscaling-v2beta1
Automatic merge from submit-queue (batch tested with PRs 51956, 50708)

Move autoscaling/v2 from alpha1 to beta1

This graduates autoscaling/v2alpha1 to autoscaling/v2beta1.  The move is more-or-less just a straightforward rename.

Part of kubernetes/features#117

```release-note
v2 of the autoscaling API group, including improvements to the HorizontalPodAutoscaler, has moved from alpha1 to beta1.
```
2017-09-06 15:46:24 -07:00
Chao Xu c5a9237416 Fix pod update test descriptions to match the test cases 2017-09-06 10:30:18 -07:00
Kubernetes Submit Queue 6430a2732f Merge pull request #51351 from cmluciano/cml/addegressrule
Automatic merge from submit-queue (batch tested with PRs 51984, 51351, 51873, 51795, 51634)

Add EgressRule to NetworkPolicy

**What this PR does / why we need it**:
Add EgressRule to NetworkPolicy

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

**Special notes for your reviewer**:
- Please take a look at the comments for the various types. I tried to mimic some of the language used in the Ingress comments, but I may have mangled some sentences.
- Let me know if I should add some test cases for validation. I have 2-3, and did not think it was necessary to replicate each case already covered in ingress.

**Release note**:
```
Add egress policies to NetworkPolicy
```
2017-09-05 18:40:25 -07:00
Solly Ross b0af402475 Move Autoscaling v2{alpha1 --> beta1}
This commit renames autoscaling/v2alpha1 to autoscaling/v2beta1.
Only the API-related code is moved in this commit.
2017-09-05 17:49:30 -04:00
Christopher M. Luciano 90b139897e
Add PolicyTypes to NetworkPolicy Spec
Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>
2017-09-05 12:16:19 -04:00
PiotrProkop 59a86e4cbc Adding getHugePagesMountOptions function and tests 2017-09-05 17:15:49 +02:00
Michał Stachowski 2dba8f1715 Support for hugetlbfs in empty dir volume plugin 2017-09-05 17:15:49 +02:00
Derek Carr 38d5dee677 Node validation restricts pre-allocated hugepages to single page size 2017-09-05 10:34:30 -04:00
Derek Carr 41a4e2ccad Scheduler support for hugepages 2017-09-05 09:46:08 -04:00
Derek Carr afd8045ed7 HugePage changes in API and server 2017-09-05 09:46:08 -04:00
Kubernetes Submit Queue 58fe20f0e6 Merge pull request #51893 from jsafrane/clear-alpha-mount-propagation
Automatic merge from submit-queue (batch tested with PRs 51180, 51893)

Clear alpha MountPropagation fields.

This is leftover from #50924, mount propagation introduced a new field that needs to be cleared.

**Which issue this PR fixes**
fixes #51738

**Release note**:

```release-note
NONE
```


@k8s-mirror-api-machinery-pr-reviews 
/assign @liggitt
2017-09-04 19:42:18 -07:00
Jan Safranek 876109a53c Clear alpha MountPropagation fields.
According to api_changes.md, alpha fields must be cleared when corresponding
feature is disabled.
2017-09-04 10:40:54 +02:00
Hemant Kumar 84029c2c1a Update generated files - api, bazel, json
Update all generated files json, protocolbuffers,
documentation
2017-09-04 09:02:35 +02:00
Hemant Kumar e78d433150 Implement necessary API changes
Introduce feature gate for expanding PVs
Add a field to SC
Add new Conditions and feature tag pvc update
Add tests for size update via feature gate
register the resize admission plugin
Update golint failures
2017-09-04 09:02:34 +02:00
Kubernetes Submit Queue 6ec80eac1b Merge pull request #51816 from liggitt/xiangpengzhao-remove-initc-anno
Automatic merge from submit-queue

Remove deprecated init-container in annotations

fixes #50655
fixes #51816 
closes #41004
fixes #51816 

Builds on #50654 and drops the initContainer annotations on conversion to prevent bypassing API server validation/security and targeting version-skewed kubelets that still honor the annotations

```release-note
The deprecated alpha and beta initContainer annotations are no longer supported. Init containers must be specified using the initContainers field in the pod spec.
```
2017-09-03 17:35:11 -07:00
Kubernetes Submit Queue f9a82dd3b7 Merge pull request #50924 from liggitt/alpha-fields
Automatic merge from submit-queue (batch tested with PRs 51682, 51546, 51369, 50924, 51827)

Clear values for disabled alpha fields

Fixes #51831

Before persisting new or updated resources, alpha fields that are disabled by feature gate must be removed from the incoming objects.

This adds a helper for clearing these values for pod specs and calls it from the strategies of all in-tree resources containing pod specs.

Addresses https://github.com/kubernetes/community/pull/869
2017-09-03 15:54:22 -07:00
Kubernetes Submit Queue a31bc44b38 Merge pull request #51500 from m1093782566/fix-kube-proxy-panic
Automatic merge from submit-queue (batch tested with PRs 51819, 51706, 51761, 51818, 51500)

fix kube-proxy panic because of nil sessionAffinityConfig

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

fix kube-proxy panic because of nil sessionAffinityConfig

**Which issue this PR fixes**: closes #51499 

**Special notes for your reviewer**:

I apology that this bug is introduced by #49850 :(

@thockin @smarterclayton @gnufied 

**Release note**:

```release-note
NONE
```
2017-09-03 15:00:15 -07:00
Kubernetes Submit Queue 3c621d6ee6 Merge pull request #51761 from karataliu/ccmupdatenode
Automatic merge from submit-queue (batch tested with PRs 51819, 51706, 51761, 51818, 51500)

Fix providerID update validation

**What this PR does / why we need it**:
Cloud controller manager supports updating providerID in #50730, but the node updating was blocked by 
validation rule.

This is to propose a fix for updating the validation rule by allowing altering spec.providerID if not set.

Please check #51596 for detail

**Which issue this PR fixes**
fixes #51596

**Special notes for your reviewer**:

**Release note**:
```release-note
```
2017-09-03 15:00:07 -07:00
Kubernetes Submit Queue bee221cca9 Merge pull request #51638 from mfojtik/client-gen-custom-methods
Automatic merge from submit-queue (batch tested with PRs 51805, 51725, 50925, 51474, 51638)

Allow custom client verbs to be generated using client-gen

This change will allow to define custom verbs for resources using the following new tag:

```
// +genclient:method=Foo,verb=create,subresource=foo,input=Bar,output=k8s.io/pkg/api.Blah
```

This will generate client method `Foo(bar *Bar) (*api.Blah, error)` (format depends on the particular verb type)

With this change we can add `UpdateScale()` and `GetScale()` into all scalable resources. Note that intention of this PR is not to fix the Scale(), but that is used as an example of this new capability.
Additionally this will also allow us to get rid of `// +genclient:noStatus` and fix guessing of the "updateStatus" subresource presence based on the existence of '.Status' field.
Basically you will have to add following into all types you want to generate `UpdateStatus()` for:

```
// +genclient:method=UpdateStatus,verb=update,subresource=status
```

This allows further extension of the client without writing an expansion (which proved to be pain to maintain and copy...). Also allows to customize native CRUD methods if needed (input/output types).

```release-note
NONE
```
2017-09-03 11:10:09 -07:00
Kubernetes Submit Queue bd813ce089 Merge pull request #51058 from thockin/codegen-dbg
Automatic merge from submit-queue (batch tested with PRs 51666, 49829, 51058, 51004, 50938)

Add debugging to the codegen process

This was useful when debugging a different problem.
2017-09-02 22:52:06 -07:00
Jan Safranek c49e34fd17 Add API for mount propagation.
In fact, this is one annotation + its parsing & validation. Appropriate
kubelet logic that uses this annotation is in following patches.
2017-09-01 21:36:32 +02:00
Jordan Liggitt 525254a3d1
Drop alpha/beta init containers annotations on conversion 2017-09-01 14:45:08 -04:00
Jordan Liggitt 02281898f8
Clear values for disabled alpha fields 2017-09-01 14:34:01 -04:00
Michal Fojtik 7d2be1c521
generate UpdateScale and GetScale verbs for scalable resources 2017-09-01 14:25:46 +02:00
m1093782566 1faa6f56b9 fix kube-proxy panic 2017-09-01 16:18:03 +08:00
Tim Hockin 9e2fccd1de Remove generated JSON code 2017-08-31 23:31:12 -07:00
Tim Hockin 5728b1970a Use json-iterator for JSON, kill off codecgen 2017-08-31 23:30:45 -07:00
Dong Liu 032a6d9441 Fix providerID update validation 2017-09-01 11:01:26 +08: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 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 374e631626 Merge pull request #50757 from NickrenREN/local-storage-limitrange
Automatic merge from submit-queue

Add local ephemeral storage support in LimitRange

**Special notes for your reviewer**:
For a single local ephemeral storage resource

xref #43607 

**Release note**:
```release-note
Add local ephemeral storage support to LimitRange
```

/assign @jingxu97 
cc @ddysher
2017-08-30 13:12:23 -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
Slava Semushin 227236bd0c Fix typo in docs. 2017-08-30 12:33:37 +02:00
Dr. Stefan Schimanski 362439db64 pkg/api: simplify deepcopy calls 2017-08-29 20:04:05 +02:00
NickrenREN 370e0becb2 Add feature gate and validate test for local storage limitrange 2017-08-29 20:55:20 +08: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 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 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
Kubernetes Submit Queue fe365b88e3 Merge pull request #49610 from NickrenREN/local-isolation
Automatic merge from submit-queue (batch tested with PRs 50932, 49610, 51312, 51415, 50705)

Add local storage support in Quota

Add local storage(scratch, overlay) support in quota

**Release note**:
```release-note
Add local ephemeral storage support to Quota
```

/cc @ddysher  @jingxu97
2017-08-29 01:17:34 -07:00
Chao Xu b642c9afbb remove failure policy from intializer configuration 2017-08-28 15:24:50 -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
Kubernetes Submit Queue 3b2417a7f8 Merge pull request #51305 from hzxuzhonghu/validation-fix
Automatic merge from submit-queue (batch tested with PRs 49861, 50933, 51380, 50688, 51305)

fix v1 validation return error

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-27 22:20:57 -07:00
NickrenREN 50c6fa9171 Remove previous local storage resource name 'scratch" and "overlay" 2017-08-27 12:03:31 +08: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
NickrenREN bc393e3f8b Add feature gate for local storage quota 2017-08-26 14:14:26 +08:00
Kubernetes Submit Queue 6650bbe0dd Merge pull request #50582 from dixudx/support_fieldSelector_spec.schedulerName
Automatic merge from submit-queue (batch tested with PRs 50889, 51347, 50582, 51297, 51264)

support fieldSelector spec.schedulerName

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

**Special notes for your reviewer**:
/assign @davidopp  @bsalamat
/cc @lavalamp

**Release note**:

```release-note
add fieldSelector spec.schedulerName
```
2017-08-25 22:43:32 -07:00
Kubernetes Submit Queue 76c520cea3 Merge pull request #50889 from NickrenREN/local-storage-eviction
Automatic merge from submit-queue (batch tested with PRs 50889, 51347, 50582, 51297, 51264)

Change eviction manager to manage one single local storage resource

**What this PR does / why we need it**:
We decided to manage one single resource name, eviction policy should be modified too.

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

**Release note**:
```release-note
Change eviction manager to manage one single local ephemeral storage resource
```

/assign @jingxu97
2017-08-25 22:43:26 -07:00
NickrenREN 194418986f Add local storage to downwards API 2017-08-26 11:58:21 +08: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
NickrenREN 9730e3d302 Change validation for local ephemeral storage 2017-08-26 05:15:16 +08:00
Tim Hockin e73b27cbce Add debugging to the codegen process 2017-08-25 14:08:42 -07:00
Kubernetes Submit Queue cd908f3e59 Merge pull request #51257 from NickrenREN/validation-bugfix
Automatic merge from submit-queue (batch tested with PRs 51038, 50063, 51257, 47171, 51143)

Fix validation return value

Errors returned by some validation functions may be wrong

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


**Release note**:
```release-note
NONE
```
2017-08-25 12:31:05 -07:00
Jordan Liggitt c7defb806f
Generated files 2017-08-25 15:01:08 -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
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
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
xiangpengzhao 8719b4a8ea Remove deprecated init-container in annotations 2017-08-25 13:39:29 +08:00
Kubernetes Submit Queue 657db0eae7 Merge pull request #51258 from dixudx/fix_hostpath_fuzzer
Automatic merge from submit-queue

fix fuzzer for hostpath type that the path can be an empty string

**What this PR does / why we need it**:
It seems the path of `HostPath` generated by fuzzer can be an empty string. This is causing [pull-kubernetes-unit](https://k8s-gubernator.appspot.com/builds/kubernetes-jenkins/pr-logs/directory/pull-kubernetes-unit) failing.

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

**Special notes for your reviewer**:
/assign @thockin @luxas @ixdy 

**Release note**:

```release-note
None
```
2017-08-24 19:05:55 -07:00
hzxuzhonghu 2e0156ad83 fix validation return error 2017-08-25 10:01:21 +08:00
NickrenREN a975ee1301 Fix validation return value 2017-08-25 09:25:43 +08:00