Commit Graph

1976 Commits (63c90bb47ec99247cbf29542edfc443ffda7298b)

Author SHA1 Message Date
Kubernetes Submit Queue 6b03a43b76
Merge pull request #57214 from gnufied/remove-mutation-from-pvc-validation
Automatic merge from submit-queue (batch tested with PRs 55977, 56198, 57202, 57254, 57214). 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 mutation from pvc validation

Remove mutation from pvc validation. pvc status is already being reset back in `PrepareForUpdate` function.

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

cc @kubernetes/sig-storage-bugs 

@liggitt @deads2k
2017-12-17 08:26:55 -08:00
Kubernetes Submit Queue 62c89368db
Merge pull request #57040 from liggitt/sort-by-group
Automatic merge from submit-queue (batch tested with PRs 56858, 57040, 56979, 57051, 57052). 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>.

Display apiGroups before resources in PolicyRule

This lets them sort logically into groups by string

"" "pods"
"" "configmaps"
"apps" "deployments"
"apps" "daemonsets"
etc

```release-note
NONE
```
2017-12-16 16:34:42 -08:00
Kubernetes Submit Queue 493dcce813
Merge pull request #56881 from islinwb/remove_unused_code
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 unused code in pkg/api/,pkg/apis/

**What this PR does / why we need it**:
Remove unused code in pkg/api/,pkg/apis/

**Release note**:
```release-note
NONE
```
2017-12-16 11:04:56 -08:00
Kubernetes Submit Queue 51371b19b1
Merge pull request #56715 from MrHohn/service-validation-cleanup
Automatic merge from submit-queue (batch tested with PRs 56639, 56746, 56715, 56673, 56726). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Cleanup for service API validation

**What this PR does / why we need it**:
- Replace the hardcoded kubelet port number.
- Change couple invalid field errors to forbidden field errors.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-12-16 06:39:45 -08:00
Kubernetes Submit Queue 94795b3931
Merge pull request #54998 from tengqm/autoscale-api-doc
Automatic merge from submit-queue (batch tested with PRs 56410, 56707, 56661, 54998, 56722). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix autoscaling API documentation

**What this PR does / why we need it**:
This PR fixes the API documentation generated for HorizontalPodAutoscaler resource.

**Which issue(s) this PR fixes**:
The current API doc for `MetricSpec` and `MetricStatus` is confusing. Users get no idea what can be used as the value for the `type` field, because the doc says this:

```
type is the type of metric source. It should match one of the fields below.
```

While acceptable in the source code, it makes no senses when reading the API doc, especially when the "`type`" field is listed as the last row in a table (see: https://kubernetes.io/docs/api-reference/v1.8/#metricspec-v2beta1-autoscaling )

**Special notes for your reviewer**:
This PR makes no changes to the code behavior.

**Release note**:
```release-note
NONE
```
2017-12-16 05:46:37 -08:00
Kubernetes Submit Queue abc73363bd
Merge pull request #56538 from tianshapjq/cleanup-useless-func
Automatic merge from submit-queue (batch tested with PRs 56579, 55236, 56512, 56549, 56538). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

cleanup useless functions

cleanup some useless functions, for they get no references from others during my search. Please remind me if I'm wrong.
2017-12-15 21:19:44 -08:00
Kubernetes Submit Queue d9b45d08c0
Merge pull request #56460 from liggitt/flex-pv-secret
Automatic merge from submit-queue (batch tested with PRs 56413, 56322, 56490, 56460, 56487). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Allow FlexVolume PV secret namespaces

Completes the secret namespace PV refactor, so all PV volume sources that specify secrets can reference them outside the PVC namespace.

Finished the secret-related aspect of https://github.com/kubernetes/kubernetes/issues/32131

```release-note
PersistentVolume flexVolume sources can now reference secrets in a namespace other than the PersistentVolumeClaim's namespace.
```
2017-12-15 16:43:55 -08:00
Kubernetes Submit Queue c6955c96c5
Merge pull request #56324 from CaoShuFeng/optional
Automatic merge from submit-queue (batch tested with PRs 56161, 56324, 55685, 56409, 55296). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix comment about PodAffinityTerm in api

**Release note**:
```release-note
NONE
```
2017-12-15 04:33:41 -08:00
Jordan Liggitt 61369863b2
Generated files 2017-12-15 00:29:38 -05:00
Hemant Kumar b33aaa0df4 Remove mutation from pvc validation 2017-12-14 16:54:32 -05:00
Kubernetes Submit Queue 126cb5eab9
Merge pull request #55935 from mindprince/remove-incorrect-dead-code
Automatic merge from submit-queue (batch tested with PRs 54604, 55781, 55806, 55935, 55991). 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 incorrect dead code.

TolerationToleratesTaint was incorrect: if the toleration.Key is empty and
taint is non-empty, it should not return false. It was also not used anywhere.

The correct implementations are in staging/src/k8s.io/api/core/v1/toleration.go
and pkg/apis/core/v1/helper/helpers.go

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

/sig scheduling
/sig api-machinery
/kind bug
2017-12-13 22:25:58 -08:00
Kubernetes Submit Queue 6145ea1e4f
Merge pull request #54604 from stewart-yu/issues#10
Automatic merge from submit-queue (batch tested with PRs 54604, 55781, 55806, 55935, 55991). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add unit test for pkg/apis/core/toleration.go

**What this PR does / why we need it**:
improve coverage for function

**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/56753](https://github.com/kubernetes/kubernetes/issues/56753)

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-12-13 22:25:50 -08:00
Jordan Liggitt d073c10dbc
Refactor flex pv to allow secret namespace 2017-12-13 23:32:16 -05:00
Chakravarthy Nelluri 18c5234b3a Mark Flexvolume as GA 2017-12-12 14:53:40 -05:00
Jordan Liggitt 16d4fb7e52
Display apiGroups before resources in PolicyRule 2017-12-11 09:53:31 -05:00
linweibin 96a8ff6bd6 Remove unused code in pkg/api/,pkg/apis/ 2017-12-07 13:35:47 +08:00
Chao Xu f02c8de7ca Update the comments on webhook failure policy. 2017-12-05 16:26:19 -08:00
Zihong Zheng 38f4f9b303 Cleanup for service API validation 2017-12-01 12:10:49 -08:00
Seth Jennings 7b6aa09046 validate container state transitions 2017-11-29 09:25:16 -06:00
tianshapjq 38de5581b4 cleanup useless functions 2017-11-29 10:47:25 +08:00
xiangpengzhao cf699b6519 Use full gopath for externalTypes of missing API groups. 2017-11-26 00:12:45 +08:00
Maciej Szulik f8ea46e8fe Use full gopath for externalTypes 2017-11-26 00:12:32 +08:00
Cao Shufeng 26bd052ce2 fix comment about PodAffinityTerm in api 2017-11-24 15:05:06 +08:00
Haoran Wang e297a819ef generated 2017-11-23 16:23:53 +08:00
Haoran Wang 98faf6b39c support flexvlome in psp 2017-11-23 16:06:51 +08:00
Kubernetes Submit Queue 60c2090191
Merge pull request #49112 from gmarek/eventAPI
Automatic merge from submit-queue (batch tested with PRs 55952, 49112, 55450, 56178, 56151). 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>.

New API group for Events.

Fix kubernetes/features#383

cc @shyamjvs 

```release-note
Add events.k8s.io api group with v1beta1 API containing redesigned Event type.
```
2017-11-22 21:48:42 -08:00
Kubernetes Submit Queue 83e46f0a9e
Merge pull request #55902 from yguo0905/annotations
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>.

Expose single annotation/label via downward API

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

https://github.com/kubernetes/community/blob/master/contributors/design-proposals/node/annotations-downward-api.md

Support exposing single annotation via both env and volume downward API using the following syntax:

```
metadata.annotations['key']
metadata.labels['key']
```

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

#31218

**Special notes for your reviewer**:

This PR takes over the work in https://github.com/kubernetes/kubernetes/pull/41648.

**Release note**:

```
A single value in metadata.annotations/metadata.labels can be passed into the containers via Downward API
```

/assign @thockin @vishh
2017-11-22 18:54:29 -08:00
tanshanshan a90b4c8c41 HugePages require cpu or memory 2017-11-23 09:57:51 +08:00
Yang Guo c74b97b29d Validate key subscript for metadata.annotations and metadata.labels separately 2017-11-22 15:50:40 -08:00
Yang Guo 34a7b3dea8 Create a separate conversion function for the field labels used by downward API 2017-11-22 11:02:20 -08:00
Marek Grabowski ef6f0b8c6e generated 2017-11-22 18:40:09 +00:00
gmarek 69e2a9cb48 Add new Events API group 2017-11-22 18:40:09 +00:00
Kubernetes Submit Queue 2a18a2aadf
Merge pull request #55103 from ConnorDoyle/remove-oir
Automatic merge from submit-queue (batch tested with PRs 55103, 56036, 56186). 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>.

Removed opaque integer resources (deprecated in v1.8)

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

* Remove opaque integer resources (OIR) support from the code base. This feature was deprecated in v1.8 and replaced by Extended Resources (ER).

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

**Release note**:

```release-note
Remove opaque integer resources (OIR) support (deprecated in v1.8.)
```
2017-11-22 00:27:27 -08:00
yuexiao-wang 400f5545bf add more test case in TestValidateStatefulSet
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2017-11-22 16:00:38 +08:00
Yang Guo 82c9eec164 Expose single annotation/label via downward API 2017-11-21 19:21:10 -08:00
Kubernetes Submit Queue 277d866111
Merge pull request #50984 from timothysc/checkpoint
Automatic merge from submit-queue (batch tested with PRs 55812, 55752, 55447, 55848, 50984). 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>.

Initial basic bootstrap-checkpoint support

**What this PR does / why we need it**:
Adds initial support for Pod checkpointing to allow for controlled recovery of the control plane during self host failure conditions. 

fixes #49236
xref https://github.com/kubernetes/features/issues/378

**Special notes for your reviewer**:

Proposal is here: https://docs.google.com/document/d/1hhrCa_nv0Sg4O_zJYOnelE8a5ClieyewEsQM6c7-5-o/edit?ts=5988fba8#

1. Controlled tests work, but I have not tested the self hosted api-server recovery, that requires validation and logs.  /cc @luxas 
2. In adding hooks for checkpoint manager much of the tests around basicpodmanager appears to be stub'd.  This has become an anti-pattern in the code and should be avoided.  
3. I need a node-e2e to ensure consistency of behavior. 

**Release note**:
```
Add basic bootstrap checkpointing support to the kubelet for control plane recovery
```

/cc @kubernetes/sig-cluster-lifecycle-misc @kubernetes/sig-node-pr-reviews
2017-11-21 17:57:40 -08:00
Kubernetes Submit Queue 8a5cf788b0
Merge pull request #55848 from MrHohn/custom-pod-dns-api
Automatic merge from submit-queue (batch tested with PRs 55812, 55752, 55447, 55848, 50984). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add Custom Pod DNS to Kubernetes API

**What this PR does / why we need it**:
Ref:
- Feature issue: https://github.com/kubernetes/features/issues/504
- Proposal: https://github.com/kubernetes/community/pull/1276

This PR adds the relevant APIs, validation check and the underlying kubelet changes.

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

**Special notes for your reviewer**:
/sig network 
@kubernetes/sig-network-api-reviews 
/assign @bowei @thockin 

**Release note**:

```release-note
Add DNSConfig field to PodSpec and support "None" mode for DNSPolicy (Alpha).
```
2017-11-21 17:57:37 -08:00
Chao Xu fcf4f15c89 update-all generated 2017-11-21 13:00:40 -08:00
Chao Xu 7945ae68d0 remove reference to v1alpha1 2017-11-21 13:00:40 -08:00
Chao Xu 951962512b Graduate admission API to v1beta1; graduate webhook related
admissionregistration API to v1beta1
2017-11-21 09:41:01 -08:00
Kubernetes Submit Queue 27295d5e01
Merge pull request #54292 from lichuqiang/resourceQuotaForHugepage
Automatic merge from submit-queue (batch tested with PRs 54811, 54292, 56103). 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>.

ResourceQuota support for Hugepages

**What this PR does / why we need it**:
Hugepage resourceQuota support

**Which issue this PR fixes** 
fixes #53672 ResourceQuota part

**Special notes for your reviewer**:
What I'm concerned most is the change in quota evaluator:
Rather than add check especially for resource hugage, I would prefer add a check list, that could be easily extended by adding corresponding prefix into the list (As far as I know, pluginResources  will also support ResourceQuota in later versions)
@derekwaynecarr What's your opinion?

/cc @derekwaynecarr 

**Release note**:

```release-note
NONE
```
2017-11-21 00:02:39 -08:00
Timothy St. Clair ed4401c126 Addition of bootstrap checkpointing 2017-11-20 21:54:15 -06:00
MrHohn 44b5cf3e12 Autogenerated codes for Custom Pod DNS API 2017-11-20 16:18:05 -08:00
Zihong Zheng af7208047a Add validation check for PodDNSConfig and 'None' DNSPolicy 2017-11-20 16:01:11 -08:00
Zihong Zheng ddb5b63832 Add 'None' option to DNSPolicy and define DNSConfig field in Pod API 2017-11-20 14:01:01 -08:00
Kubernetes Submit Queue 920a5b3128
Merge pull request #51530 from rootfs/iscsi-pv-ns
Automatic merge from submit-queue (batch tested with PRs 55757, 55741, 55817, 55834, 51530). 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 iSCSI PV spec to use SecretReference 

**What this PR does / why we need it**:
Use SecretReference in iSCSI PV spec
**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/321

**Special notes for your reviewer**:
@liggitt 
**Release note**:

```release-note
iSCSI Persistent Volume Sources can now reference CHAP Secrets in namespaces other than the namespace of the bound Persistent Volume Claim
```
2017-11-18 16:38:36 -08:00
Kubernetes Submit Queue 7910099e91
Merge pull request #55741 from adnavare/bug/clarify_externalname
Automatic merge from submit-queue (batch tested with PRs 55757, 55741, 55817, 55834, 51530). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Clarify ExternalNames are hostnames

Updates the documentation for ExternalName to clarify
that they adhere RFC-1123 hostname and are not DNS names.

Fixes #52266

**Release note**:

```release-note

```
2017-11-18 16:38:27 -08:00
Huamin Chen 56ec6e1028 generated files
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-11-18 20:05:40 +00:00
Huamin Chen bb34a0b7ef use SecretObject to reference iSCSI CHAP secret
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-11-18 20:02:44 +00:00
Scott Creeley de4138d828 generated code for VolumeMode api change 2017-11-18 12:03:33 -05:00
Scott Creeley 36f30bc689 Add VolumeType api to PV and PVC 2017-11-18 11:25:27 -05:00
Kubernetes Submit Queue 928c85fc99
Merge pull request #55204 from vladimirvivien/k8s-csi-volume-source
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>.

Kubernetes CSI - Persistent Volume Source Type

**What this PR does / why we need it**:
This PR is to track the addition of new API type `CSIPersistentVolumeSource` that will be used as PersistentVolume for storage sources managed by CSI drivers. 

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
xref https://github.com/kubernetes/features/issues/178

**Special notes for your reviewer**:
- Implements API `PersistentVolume` type `CSIPersistentVolumeSource`
- Part of implementation for https://github.com/kubernetes/features/issues/178
- Designed at https://github.com/kubernetes/community/pull/1258

Other CSI Volume Plugin PRs:
- Plugin Mounter/Unmounter https://github.com/kubernetes/kubernetes/pull/54529
- Plugin Attacher/Detacher https://github.com/kubernetes/kubernetes/pull/55809

**Release note**:

```release-note
NONE
```
2017-11-17 22:18:30 -08:00
Kubernetes Submit Queue 01c74145c7
Merge pull request #55665 from brendandburns/path
Automatic merge from submit-queue (batch tested with PRs 55908, 55829, 55293, 55653, 55665). 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>.

If mountPath is missing, prefix with root dir.

If `mountPath` is not absolute, add the os-specific root directory as a prefix.

Ref: https://github.com/kubernetes/kubernetes/pull/51240
https://groups.google.com/forum/#!topic/kubernetes-sig-storage/k_0Wr2kYkpU

@thockin @saad-ali @andyzhangx 

Note to @thockin I left the validation in place, in seems like it is a net win, since it will give a decent
error message to most people, but the fall-back defaulting is there if it doesn't catch 'c:'

I'm happy to rip out the validation if that is preferable to everyone.  Let me know.

```release-note
If a non-absolute mountPath is passed to the kubelet, prefix it with the appropriate root path.
```
2017-11-17 17:11:16 -08:00
Vladimir Vivien c4a17304d5 CSI - Generated source code
This commit tracks all auto-generated sources.
2017-11-17 19:17:51 -05:00
Vladimir Vivien af0c2bda94 CSI - API change for CSI volume source type
This commit tracks source code update to support the CSI volume source type additionn.
2017-11-17 19:17:42 -05:00
cheftako dac3c2e168 Admission request/response handling
AdmissionResponse allows mutating webhook to send apiserver a json patch
to mutate the object.
This reflects the imperative nature of AdmissionReview. It adds
AdmissionRequest and AdmissionResponse in place of status/spec.
The AdmissionResponse the allows the mutating webhook
to send back a json path with the mutated version of the requested
object.
Fixed the integration test to clean up properly.
Switched test image to 1.8v5 to reflect API changes.
Make sure to cache test framework client for cleaup test code.
Switched to pointer for patch type.
Factored in @liggitt's feedback.
Factored in @lavalamp's feedback.
2017-11-17 14:22:55 -08:00
Rohit Agarwal 03969fe0ed Remove incorrect dead code.
TolerationToleratesTaint was incorrect: if the toleration.Key is empty and
taint is non-empty, it should not return false. It was also not used anywhere.

The correct implementations are in staging/src/k8s.io/api/core/v1/toleration.go
and pkg/apis/core/v1/helper/helpers.go
2017-11-17 01:29:11 -08:00
Kubernetes Submit Queue 8413f36aa3
Merge pull request #55392 from sttts/sttts-remove-policy-v1alpha1
Automatic merge from submit-queue (batch tested with PRs 55392, 55491, 51914, 55831, 55836). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove unused pkg/apis/policy/v1alpha1
2017-11-17 00:18:17 -08:00
Brendan Burns 6fa527869c update API, remove validation. 2017-11-17 00:21:38 +00:00
Connor Doyle 80ac705ef3 Removed opaque integer resources. 2017-11-16 10:47:40 -08:00
Kubernetes Submit Queue 3c51f53960
Merge pull request #49579 from deads2k/server-34-default
Automatic merge from submit-queue (batch tested with PRs 55798, 49579, 54862, 55188, 51990). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add back defaulting for parameter decoding

At the beginning of 1.7, we removed the last "conversion causes defaulting".  This broke the "default to true" behavior for exec and attach options, but we didn't notice.  This removes the broken defaulter (you can default a non-point bool to true on an object) and adds back defaulting to parameter codecs.

@k8s-mirror-api-machinery-misc @lavalamp @smarterclayton
2017-11-16 03:09:12 -08:00
Klaus Ma da33d6f34f Added nodeAffinity in validation error msg. 2017-11-16 11:30:18 +08:00
Kubernetes Submit Queue 5c59d66a41
Merge pull request #54436 from msau42/sc-api
Automatic merge from submit-queue (batch tested with PRs 54436, 53148, 55153, 55614, 55484). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add VolumeBindingMode to StorageClass API

**What this PR does / why we need it**:
Adds a new field `VolumeBindingMode` to `StorageClass`, as specified in kubernetes/community#1168

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

**Special notes for your reviewer**:
API changes only.  The scheduler and PV controller work will be submitted as a separate PR.

**Release note**:
NONE

@kubernetes/sig-storage-pr-reviews
2017-11-15 12:57:53 -08:00
Anup Navare c8d5310098 Clarify ExternalNames are hostnames
Updates the documentation for ExternalName to clarify
that they adhere RFC-1123 hostname and are not DNS names.

Fixes #52266
2017-11-15 10:54:09 -08:00
Michelle Au 207d13ff23 Add defaulting to VolumeBindingMode 2017-11-15 10:54:06 -08:00
Kubernetes Submit Queue c339a54b53
Merge pull request #55659 from CaoShuFeng/duplicated_import
Automatic merge from submit-queue (batch tested with PRs 53780, 55663, 55321, 52421, 55659). 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 duplicated import

**Release note**:
```release-note
NONE
```
2017-11-15 09:30:40 -08:00
Kubernetes Submit Queue b96c1dc560
Merge pull request #55321 from xiangpengzhao/remove-1.5thing
Automatic merge from submit-queue (batch tested with PRs 53780, 55663, 55321, 52421, 55659). 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 the comparison of ReadyReplicas to zero.

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

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

**Special notes for your reviewer**:
AFAIK, we have already stopped supporting upgrades from 1.5.
cc @fejta @krzyzacy 

**Release note**:

```release-note
NONE
```
2017-11-15 09:30:32 -08:00
Michelle Au 86dd5e8d98 generated files 2017-11-15 09:19:48 -08:00
Michelle Au b60bd37114 StorageClass API changes for VolumeBindingMode 2017-11-15 09:19:47 -08:00
Kubernetes Submit Queue 86480fc0af
Merge pull request #55578 from xiangpengzhao/validatePodCidr
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>.

Validate podCIDR of node spec.

**Release note**:

```release-note
NONE
```
2017-11-14 23:12:58 -08:00
Kubernetes Submit Queue ebe8ea73fd
Merge pull request #54463 from saad-ali/volumeAttachmentAPI
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>.

Introduce new `VolumeAttachment` API Object

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

Introduce a new `VolumeAttachment` API Object. This object will be used by the CSI volume plugin to enable external attachers (see design [here](https://github.com/kubernetes/community/pull/1258). In the future, existing volume plugins can be refactored to use this object as well.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*:  Part of issue https://github.com/kubernetes/features/issues/178

**Special notes for your reviewer**:
None

**Release note**:

```release-note
NONE
```
2017-11-14 22:05:27 -08:00
stewart-yu 5311e9d95e add UT for apk/apis/core/toleration.go 2017-11-15 09:44:27 +08:00
Saad Ali 9f294c1ad0 Generated files for new VolumeAttachemnt object 2017-11-14 17:08:49 -08:00
Saad Ali d96c105d71 Introduce storage v1alpha1 and VolumeAttachment
Introduce the v1alpha1 version to the Kubernetes storage API. And add a
new VolumeAttachment object to that version. This object will initially
be used only by the new CSI Volume Plugin. Eventually existing volume
plugins can be refactored to use it too.
2017-11-14 17:08:48 -08:00
deads2k 149e5a23f0 remove bad defaulting for exec and attach options 2017-11-14 12:02:49 -05:00
Dr. Stefan Schimanski 3ba9d1d0e0 Remove unused pkg/apis/policy/v1alpha1 2017-11-14 13:47:29 +01:00
Cao Shufeng 86968e44d0 remove duplicated import 2017-11-14 17:18:17 +08:00
Kubernetes Submit Queue 3479549a62
Merge pull request #55532 from ianchakeres/validate-greater-than-zero-pv-pvc
Automatic merge from submit-queue (batch tested with PRs 55009, 55532, 55601, 52569, 55533). 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>.

Validate that PV capacity and PVC capacity requests are positive, greater than 0

**What this PR does / why we need it**:  Zero (0) capacity PVs cause related pods to fail, and zero (0) capacity PVCs create zero (0) capacity PVs.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Validate positive capacity for PVs and PVCs.
```
2017-11-14 00:09:48 -08:00
Kubernetes Submit Queue 2fc108b8b2
Merge pull request #53850 from dougm/api-fixed-int
Automatic merge from submit-queue (batch tested with PRs 54005, 55127, 53850, 55486, 53440). 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>.

Enforce use of fixed size int types in the API

Changes 'int' to 'int32', enforced by import_known_versions_test

Follow up to PR #53402



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

This PR changes a few fields within the API from 'int' to 'int32' and is now enforced by import_known_versions_test.  We need this so integer fields are the same size regardless of $GOARCH.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-11-13 16:45:26 -08:00
Kubernetes Submit Queue f575c55589
Merge pull request #54005 from deads2k/rbac-02-aggregation
Automatic merge from submit-queue (batch tested with PRs 54005, 55127, 53850, 55486, 53440). 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>.

aggregate cluster roles

xref https://github.com/kubernetes/community/pull/1219 https://github.com/kubernetes/features/issues/502

This is a pull with API types, a controller, and a demonstration of how to move admin, edit, and view.  Once we agree on the shape, I'll 


I added 
```yaml
aggregationRule:
  clusterRoleSelectors:
  - matchLabels:
      rbac.authorization.k8s.io/aggregate-to-admin: true
```
to the `ClusterRole`.  A controller then goes and gathers all the matching ClusterRoles and sets the `rules` to the union of matching cluster roles.

@kubernetes/sig-auth-pr-reviews 

```release-note
RBAC ClusterRoles can now select other roles to aggregate
```
2017-11-13 16:45:20 -08:00
Kubernetes Submit Queue fb9eadb391
Merge pull request #53576 from xiangpengzhao/revert-47284
Automatic merge from submit-queue (batch tested with PRs 54826, 53576, 55591, 54946, 54825). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Revert "Validate if service has duplicate targetPort"

**What this PR does / why we need it**:
Services allow duplicate targetPort. This reverts commit ce54d9072b.

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

**Special notes for your reviewer**:
/cc @thockin @jhorwit2 

**Release note**:

```release-note
NONE
```
2017-11-13 14:46:58 -08:00
Doug MacEachern 7950609b31 Enforce use of fixed size int types in the API
Changes 'int' to 'int32', enforced by import_known_versions_test

Follow up to PR #53402
2017-11-13 11:28:59 -08:00
Ian Chakeres 98e2c8cdee Validate that PV capacity and PVC capacity requests are greater than zero 2017-11-13 08:57:01 -08:00
David Eads a53e5de3db generated 2017-11-13 08:18:00 -05:00
David Eads 0f0a5223df rbac api changes for aggregation 2017-11-13 08:14:37 -05:00
xiangpengzhao f903b7a85c Validate podCIDR of node spec. 2017-11-13 15:42:07 +08:00
Kubernetes Submit Queue 28e0c3bef2
Merge pull request #55164 from NickrenREN/validation-not-zero
Automatic merge from submit-queue (batch tested with PRs 49258, 55164). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make sure that storage request of pvc is not zero

I do not know whether we should add the checking zero logic to `ValidateResourceQuantityValue`.
But at lease we should do this when validate PVC.  If PVC requests 0Gi storage,it does not make sense to provision that volume. 
Volume plugins will not check whether the request of PVC is 0 when they run `CreateVolume` or `CreateImage` called by `Provision()`

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-11-12 23:17:37 -08:00
Kubernetes Submit Queue 9ce5d67088
Merge pull request #53580 from xiangpengzhao/deprecated-beta-sc
Automatic merge from submit-queue (batch tested with PRs 53580, 55568). 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>.

Mark BetaStorageClassAnnotation as deprecated

**What this PR does / why we need it**:
Mark BetaStorageClassAnnotation as deprecated.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
ref: #51440
https://github.com/kubernetes/kubernetes/pull/51440#issuecomment-329594284

**Special notes for your reviewer**:
/cc @wongma7 @msau42 

**Release note**:

```release-note
action required: The `storage.k8s.io/v1beta1` API  and `volume.beta.kubernetes.io/storage-class` annotation are deprecated. They will be removed in a future release. Please use v1 API and field `v1.PersistentVolumeClaim.Spec.StorageClassName`/`v1.PersistentVolume.Spec.StorageClassName` instead.
```
2017-11-12 21:07:34 -08:00
NickrenREN 3a22b5f5e0 Make sure that storage request of pvc is not zero 2017-11-13 11:37:29 +08:00
lichuqiang 1029b54770 update unit test for hugepage resourceQuota support 2017-11-13 09:37:20 +08:00
lichuqiang e9ff036e8a ResourceQuota support for hugepages 2017-11-13 09:37:06 +08:00
Kubernetes Submit Queue 95038553d7
Merge pull request #53911 from tallclair/psp-docs
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Clarify DefaultAddCapabilities behavior

Clarify that capabilities listed in `DefaultAddCapabilities` in the `PodSecurityPolicySpec` need not be repeated in `AllowedCapabilities`.

**Release note**:

```release-note
NONE
```
2017-11-12 12:17:54 -08:00
Kubernetes Submit Queue 2db28383e1
Merge pull request #55534 from lavalamp/wh-api-fixes
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>.

Tighten webhook client config validation

ref https://github.com/kubernetes/features/issues/492

Fix up some nits left from #54889.

```release-note
NONE
```
2017-11-12 06:04:50 -08:00
Kubernetes Submit Queue 381cfee8cd
Merge pull request #55137 from andyzhangx/add-mountpath-tests
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add windows mount path test

**What this PR does / why we need it**:
add windows mount path test, this PR is for https://github.com/kubernetes/kubernetes/pull/51240, which should include some tests.

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

**Special notes for your reviewer**:

**Release note**:

```
none
```
2017-11-12 04:04:18 -08:00
Daniel Smith e73fd87844 fix docs and validation 2017-11-11 18:42:48 -08:00
Daniel Smith fc0924cd4b generated 2017-11-11 16:25:27 -08:00
Daniel Smith a0cb2ce697 Add URL beside service 2017-11-11 16:09:34 -08:00
Chao Xu 2f83748068 generated 2017-11-10 13:44:21 -08:00
Chao Xu 7006d224be add NamespaceSelector to the api
business logic in webhook plugin and unit test

add a e2e test for namespace selector
2017-11-10 13:40:16 -08:00
Dr. Stefan Schimanski 1e79dfb959 Update generated code 2017-11-10 18:26:46 +01:00
Dr. Stefan Schimanski 72809a08b9 deepcopy: remove deepcopy register tags 2017-11-10 18:25:26 +01:00
Kubernetes Submit Queue 4793b714d8
Merge pull request #55308 from liangxia/persistentVolumeValidate
Automatic merge from submit-queue (batch tested with PRs 53047, 54861, 55413, 55395, 55308). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add several validation to persistent volume

**What this PR does / why we need it**:
Add several unit test for persistent volume validation

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-11-10 07:00:49 -08:00
Kubernetes Submit Queue ae2edc439e
Merge pull request #55413 from liggitt/internal-autoscaling
Automatic merge from submit-queue (batch tested with PRs 53047, 54861, 55413, 55395, 55308). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Switch internal scale type to autoscaling, enable apps/v1 scale subresources

xref #49504

* Switch workload internal scale type to autoscaling.Scale (internal-only change)
* Enable scale subresources for apps/v1 deployments, replicasets, statefulsets

```release-note
NONE
```
2017-11-10 07:00:44 -08:00
andyzhangx 544a09b30f add windows mount path test 2017-11-10 14:43:09 +00:00
Kubernetes Submit Queue 61f210859d
Merge pull request #55282 from mbohlool/webhooks
Automatic merge from submit-queue (batch tested with PRs 55268, 55282, 55419, 48340, 54829). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Add MutatingWebhookConfiguration type

As part of Mutating Webhook support, this PR adds the configuration for Mutating webhooks. It also renames existing ReadOnly webhook configurations from ExternalAdmissionHookConfiguration to ValidatingWebhookConfiguration. As part of the process some sub-types are also renamed.

Lastly, the mutating webhook configurations are sorted by name to make the serial executing of them deterministic.

ref: https://github.com/kubernetes/features/issues/492
2017-11-09 21:39:23 -08:00
xiangpengzhao d1efdc40ee Mark BetaStorageClassAnnotation as deprecated 2017-11-10 10:46:45 +08:00
xiangpengzhao 117edceadc Revert "Validate if service has duplicate targetPort"
This reverts commit ce54d9072b.
2017-11-10 10:38:38 +08:00
liangxia 890f4b7e2e Add several validation to persistentvolume 2017-11-10 10:31:44 +08:00
mbohlool 4568e0530c Update generated files for MutatingWebhookConfiguration 2017-11-09 15:33:50 -08:00
mbohlool fc5a613c17 Add MutatingWebhookConfiguration type 2017-11-09 14:00:14 -08:00
Anirudh 45ab57fddc Autogenerated 2017-11-09 12:48:23 -08:00
Anirudh 825821610c Added conditions to statefulset 2017-11-09 12:28:49 -08:00
mbohlool cb43840492 Update generated files 2017-11-09 11:39:52 -08:00
mbohlool 9ddea83a2c Rename ExternalAdmissionHookConfiguration to ValidatingWebhookConfiguration 2017-11-09 11:39:50 -08:00
Jordan Liggitt f927f2ab89
generated files 2017-11-09 13:42:15 -05:00
Jordan Liggitt 9c1be33ee1
Switch to autoscaling.Scale internally 2017-11-09 13:42:14 -05:00
Dr. Stefan Schimanski bec617f3cc Update generated files 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski 6da115287f pkg/apis/core: restrict imports 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski 012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski d13b936a2a pkg/apis/core: fixup conversion func names in dependencies 2017-11-09 12:14:07 +01:00
Dr. Stefan Schimanski 33b20f22ee pkg/apis/core: fixup package names 2017-11-09 12:14:07 +01:00
Dr. Stefan Schimanski 3848e0a478 Move core api to pkg/apis/core 2017-11-09 12:08:42 +01:00
Kubernetes Submit Queue f644681a80
Merge pull request #55272 from janetkuo/ds-conditions
Automatic merge from submit-queue (batch tested with PRs 55331, 55272, 55228, 49763, 55242). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add DaemonSet conditions

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

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
xref https://github.com/kubernetes/features/issues/353, #7856

**Special notes for your reviewer**: 
A `conditions` field is added to DaemonSetStatus for consistency. No valid DaemonSet condition type is supported yet. 
@kubernetes/sig-apps-api-reviews 

**Release note**:

```release-note
DaemonSet status now has a new field named "conditions", making it consistent with other workloads controllers.
```
2017-11-08 17:13:19 -08:00
xiangpengzhao 3eada458d7 Remove the comparison of ReadyReplicas to zero. 2017-11-08 22:51:41 +08:00
Janet Kuo b0c086eeb9 Autogen 2017-11-07 21:49:24 -08:00
Janet Kuo dc0167bd7f Add conditions to DaemonSet API 2017-11-07 21:49:24 -08:00
Kubernetes Submit Queue 84f2bf3a68
Merge pull request #54920 from tengqm/improve-cronjob-doc
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Improve cronjob concurrency policy doc

**What this PR does / why we need it**:
The CronJob API documentation (https://kubernetes.io/docs/api-reference/v1.8/#cronjobspec-v1beta1-batch) did not clearly state what can be used as `concurrencyPolicy`. Instead, it only says that the default value is "Raw".

**Which issue(s) this PR fixes**:

**Special notes for your reviewer**:
This patch is not changing any code logic but it involves generated "code".

**Release note**:
```release-note
NONE
```
2017-11-07 21:34:11 -08:00
tengqm 3b93d6a061 Fix autoscaling API documentation 2017-11-08 09:43:38 +08:00
Tim Allclair 72196b9a33
Clarify DefaultAddCapabilities behavior 2017-11-07 12:38:24 -08:00
Kubernetes Submit Queue e1de2ad507
Merge pull request #52562 from ironcladlou/kube-scheduler-config
Automatic merge from submit-queue (batch tested with PRs 53592, 52562, 55175, 55213). 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 kube-scheduler config API, command, and server setup

Refactor the kube-scheduler configuration API, command setup, and server setup according to the guidelines established in #32215 and using the kube-proxy refactor (#34727) as a model of a well factored component adhering to said guidelines.

* Config API: clarify meaning and use of algorithm source by replacing modality derived from bools and string emptiness checks with an explicit AlgorithmSource type hierarchy.
* Config API: consolidate client connection config with common structs.
* Config API: split and simplify healthz/metrics server configuration.
* Config API: clarify leader election configuration.
* Config API: improve defaulting.
* CLI: deprecate all flags except `--config`.
* CLI: port all flags to new config API.
* CLI: refactor to match kube-proxy Cobra command style.
* Server: refactor away configurator.go to clarify application wiring.
* Server: refactor to more clearly separate wiring/setup from running.

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

@kubernetes/api-reviewers 
@kubernetes/sig-cluster-lifecycle-pr-reviews 
@kubernetes/sig-scheduling-pr-reviews 

/cc @ncdc @timothysc @bsalamat

```release-note
The kube-scheduler command now supports a `--config` flag which is the location of a file containing a serialized scheduler configuration. Most other kube-scheduler flags are now deprecated.
```
2017-11-07 11:21:19 -08:00
Kubernetes Submit Queue d33077526a
Merge pull request #53273 from mikedanese/authtristate
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add support for short-circuit deny in union authorizer

This change has no behavioral changes.

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

```release-note
Add support for the webhook authorizer to make a Deny decision that short-circuits the union authorizer and immediately returns Deny. 
```
2017-11-07 09:25:37 -08:00
Dan Mace efb2bb71cd Refactor scheduler config API
Refactor the kube-scheduler configuration API, command setup, and server
setup according to the guidelines established in #32215 and using the
kube-proxy refactor (#34727) as a model of a well factored component
adhering to said guidelines.

* Config API: clarify meaning and use of algorithm source by replacing
modality derived from bools and string emptiness checks with an explicit
AlgorithmSource type hierarchy.
* Config API: consolidate client connection config with common structs.
* Config API: split and simplify healthz/metrics server configuration.
* Config API: clarify leader election configuration.
* Config API: improve defaulting.
* CLI: deprecate all flags except `--config`.
* CLI: port all flags to new config API.
* CLI: refactor to match kube-proxy Cobra command style.
* Server: refactor away configurator.go to clarify application wiring.
* Server: refactor to more clearly separate wiring/setup from running.

Fixes #52428.
2017-11-07 09:41:39 -05:00
Dan Mace 25ca287707 Update generated files 2017-11-07 09:41:35 -05:00
Kubernetes Submit Queue bdeda2fcbd
Merge pull request #53866 from guangxuli/fix_redundant_code
Automatic merge from submit-queue (batch tested with PRs 53866, 54852, 55178, 55185, 55130). 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 duplicated Hairpin constant definition

**What this PR does / why we need it**:
Clean up the hairpin definition in conponent config since it has been remove to [kubelet config](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/apis/kubeletconfig/types.go#L36)

**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, just clean up the code

**Special notes for your reviewer**:
none

**Release note**:
none
2017-11-06 22:20:20 -08:00
xiangpengzhao 75b9fb28bf auto generated files 2017-11-04 11:38:57 +08:00
xiangpengzhao 5c8c1f43fa move KubeProxyConfiguration out of componentconfig API group 2017-11-04 11:38:57 +08:00
Kubernetes Submit Queue 2ecb368026
Merge pull request #53679 from kow3ns/workloadsv1
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>.

Workloads V1

**What this PR does / why we need it**: This PR promotes the Deployment, ReplicaSet, and DaemonSet StatefulSet, ControllerRevision kinds to the apps/v1 group version.

https://github.com/kubernetes/features/issues/353

**Special notes for your reviewer**:
There will be at least two followups to this PR. The first to add a scale sub-resource when the correct location is resolved, and the second to deal with Conditions in the workloads API.

While it would have been preferable to move the kinds individually providing a lesser burden on reviewers, this proved impracticable due to the intricacies of version resolution in kubectl for objects of the different kinds in the same group.  

```release-note
DaemonSet, Deployment, ReplicaSet, and StatefulSet have been promoted to GA and are available in the apps/v1 group version.
```
2017-11-03 15:17:16 -07:00
Mike Danese 90d551a0de autogenerated 2017-11-03 13:46:29 -07:00
Mike Danese 096da12fc4 add deny to SAR API 2017-11-03 13:46:29 -07:00
Kenneth Owens 7c772ab2ad autogenerated code 2017-11-03 10:16:43 -07:00
Nikhita Raghunath 6a87d99a38 generated files: remove tpr 2017-11-03 21:16:10 +05:30
Nikhita Raghunath 3b0b95ecbf Remove TPR remnants
There are still TPR types and generated client
in the extensions group. It is better to clean
that up, now that it has been removed from master.
2017-11-03 21:15:58 +05:30
Kenneth Owens 26bf978c07 Promotes the StatefulSet, ControllerRevision, Deployment, and ReplicaSet kinds to the apps/v1 group version. 2017-11-02 14:19:04 -07:00
xiangpengzhao b0ebcaf8f0 Add unit test coverage for network policy validation. 2017-11-01 22:01:22 +08:00
tengqm d87f3c6cc1 Improve cronjob concurrency policy doc 2017-11-01 14:55:46 +08:00
Dr. Stefan Schimanski ce6ecbbc54 Remove all api.Scheme references by using explicit package aliases 2017-10-30 19:54:02 +01:00
Dr. Stefan Schimanski 2b201ead11 Fix and update comment with api.Scheme 2017-10-30 19:54:02 +01:00
Kubernetes Submit Queue 878814b550
Merge pull request #53973 from m1093782566/validate-sheduler
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>.

validate ipvs scheduler

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

validate ipvs scheduler options

**Which issue this PR fixes**: 

closes #53975

**Special notes for your reviewer**:

It depends on work of #53780.

**Release note**:

```release-note
NONE
```

/sig network

/area kube-proxy
2017-10-29 23:52:08 -07:00
Kubernetes Submit Queue 93e6f08772 Merge pull request #53946 from ghostcloud-cn/initializer
Automatic merge from submit-queue (batch tested with PRs 53946, 53993, 54315, 54143, 54532). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update many misspelled word initializer

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

fix misspelled word initalizer

**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-10-25 21:20:25 -07:00
Kubernetes Submit Queue e02d4a9855 Merge pull request #52897 from huzhengchuan/fix/incorrect_links_api
Automatic merge from submit-queue (batch tested with PRs 52556, 52897, 54342). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix broken links in api after moving proposals to subdirs

**What this PR does / why we need it**:
fix incorrect links in api after kubernetes/community#1010

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

**Special notes for your reviewer**:
CC @bgrant0607
**Release note**:

```
NONE
```
2017-10-23 19:34:02 -07:00
Kubernetes Submit Queue ca8d97d673 Merge pull request #53743 from DirectXMan12/feature/polymorphic-scale-client
Automatic merge from submit-queue (batch tested with PRs 53743, 53564). 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>.

Polymorphic Scale Client

This PR introduces a polymorphic scale client based on discovery information that's able to scale scalable resources in arbitrary group-versions, as long as they present the scale subresource in their discovery information.

Currently, it supports `extensions/v1beta1.Scale` and `autoscaling/v1.Scale`, but supporting other versions of scale if/when we produce them should be fairly trivial.

It also updates the HPA to use this client, meaning the HPA will now work on any scalable resource, not just things in the `extensions/v1beta1` API group.

**Release note**:
```release-note
Introduces a polymorphic scale client, allowing HorizontalPodAutoscalers to properly function on scalable resources in any API group.
```

Unblocks #29698
Unblocks #38756
Unblocks #49504 
Fixes #38810
2017-10-23 13:39:07 -07:00
Kubernetes Submit Queue c9151459a4 Merge pull request #52965 from CaoShuFeng/clean_time_go
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>.

clean up pkg/apis/meta/v1/time.go

This file has been moved to staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/time.go

**Release note**:
```
NONE
```
/assign @sttts
2017-10-21 15:42:10 -07:00
Solly Ross d2b41120ea Make HPA controller use polymorphic scale client
This updates the HPA controller to use the polymorphic scale client from
client-go.  This should enable HPAs to work with arbitrary scalable
resources, instead of just those in the extensions API group (meaning we
can deprecate the copy of ReplicationController in extensions/v1beta1).
It also means that the HPA controller now pays attention to the
APIVersion field in `scaleTargetRef` (more specifically, the group part
of it).

Note that currently, discovery information on which resources are
available where is only fetched once (the first time that it's
requested).  In the future, we may want a refreshing discovery REST
mapper.
2017-10-19 13:21:02 -04:00
Solly Ross 3f51babdd1 Update extensions fuzzer to use selector fuzzer
This removes the override on the extensions fuzzer so that
extensions.Scale will use the full label selector fuzzer.
2017-10-19 11:01:45 -04:00
David Eads 730d42011a generated 2017-10-19 08:06:38 -04:00
David Eads 33deaedaf6 add url path for admission webhooks 2017-10-19 08:06:38 -04:00
Lion-Wei ee3fbf9c5a add ProxyModeIPVS in proxy mode validation 2017-10-19 14:34:37 +08:00
Kubernetes Submit Queue b3a9b802da Merge pull request #53823 from deads2k/admission-01-allow-fail
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>.

allow fail close webhook admission

Webhook admission needs to allow failing closed.  Even in an alpha state, I don't want to be one DDOS away from having an exposed cluster.

/assign caesarxuchao
/assign sttts
2017-10-18 14:49:54 -07:00
Kubernetes Submit Queue 900c0761e3 Merge pull request #53722 from deads2k/rbac-01-allow-star
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>.

allow */subresource in rbac policy rules

xref #29698
xref #38756
xref #49504
xref #38810

Allow `*/subresource` format in RBAC policy rules to support polymorphic subresources like `*/scale` for HPA.

@DirectXMan12 fyi

```release-note
RBAC PolicyRules now allow resource=`*/<subresource>` to cover `any-resource/<subresource>`.   For example, `*/scale` covers `replicationcontroller/scale`.
```
2017-10-18 14:02:05 -07:00
David Eads f81b6004de allow fail close webhook admission 2017-10-18 14:28:02 -04:00
Kubernetes Submit Queue 2d914ee703 Merge pull request #53984 from sttts/sttts-legacyscheme
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>.

pkg/api: extract Scheme/Registry/Codecs into pkg/api/legacyscheme

This serves as

- a preparation for the pkg/api->pkg/apis/core move
- and makes the dependency to the scheme explicit when vizualizing
  left depenncies.

The later helps with our our efforts to split up the monolithic repo
into self-contained sub-repos, e.g. for kubectl, controller-manager
and kube-apiserver in the future.
2017-10-18 10:49:10 -07:00
Dr. Stefan Schimanski cad0364e73 Update bazel 2017-10-18 17:24:04 +02:00
Dr. Stefan Schimanski 7773a30f67 pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
Jordan Liggitt d9149506f7
Ensure network policy conversion round trips nil from field 2017-10-17 20:04:50 -04:00
Kubernetes Submit Queue 7acb055aa2 Merge pull request #53535 from php-coder/psp_update_fuzzer
Automatic merge from submit-queue (batch tested with PRs 51416, 53535). 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>.

PodSecurityPolicy: teach fuzzer about fsGroup/supplementalGroups strategies

**What this PR does / why we need it**:
At present, fuzzer for PSP doesn't take into account `fsGroup`/`supplementalGroups` strategies. This PR teach fuzzer about these strategies in order to have ability to catch more possible errors.

**Special notes for your reviewer**:
Let me know if you think that we need to cover more (all?) fields in the PSP.

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

PTAL @pweil- @sttts 
CC @simo5
2017-10-17 08:44:15 -07:00
Kubernetes Submit Queue 1d8f1e268f Merge pull request #47699 from supereagle/fix-typos
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix typos: remove duplicated word in comments

**What this PR does / why we need it**: Remove the duplicated word `the` in comments

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

**Special notes for your reviewer**:

```release-note
NONE
```
2017-10-17 02:35:52 -07:00
m1093782566 518936fb5f validate ipvs scheduler 2017-10-17 09:45:28 +08:00
Kubernetes Submit Queue 03cb11f020 Merge pull request #52275 from mattjmcnaughton/mattjmcnaughton/18155-hpa-tolerance-should-be-flag
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make HPA tolerance a flag

**What this PR does / why we need it**:
Make HPA tolerance configurable as a flag. This change allows us to use
different tolerance values in production/testing.

**Which issue this PR fixes**: 
Fixes #18155

**Release note:**
```release-note
Control HPA tolerance through the `horizontal-pod-autoscaler-tolerance` flag.
```

Signed-off-by: mattjmcnaughton <mattjmcnaughton@gmail.com>
2017-10-16 16:47:43 -07:00
David Eads e8a703b651 allow */subresource in rbac policy rules 2017-10-16 16:17:51 -04:00
Cao Shufeng 52e292afe7 clean up pkg/apis/meta/v1/time.go
This file has been moved to staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/time.go
2017-10-16 16:36:44 +08:00
Kubernetes Submit Queue 77b83e446b Merge pull request #53839 from ixdy/update-bazel-workspace
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Update rules_go, repo-infra, and rules_docker dependencies

**What this PR does / why we need it**: several of our bazel dependencies were getting pretty old, since they required bazel 0.5.4+ but there were various failures if we tried to use them with bazel 0.5.4.

Now that bazel 0.6.0 (and 0.6.1) have been out for a while, we can bump our dependencies and get a number of fixes and new functionality.

x-ref #52677 and others

**Special notes for your reviewer**:
* This will now explicitly require bazel 0.6.0+ to build kubernetes.
* Our staging directories are causing some issues for `gazelle`; it wants to set `importpath = "k8s.io/kubernetes/staging/src/k8s.io/blah"` instead of `importpath = "k8s.io/blah"`. I'm not sure what is the correct way to fix this; what we're doing here is pretty weird and nonstandard. I've used a `sed` substitution for now.
* The `-proto=default` option of `gazelle` has a number of bugs right now (https://github.com/bazelbuild/rules_go/issues/888, https://github.com/bazelbuild/rules_go/issues/900, https://github.com/bazelbuild/rules_go/issues/907), so I am forcing the legacy behavior.

**Release note**:

```release-note
NONE
```

/assign @mikedanese @spxtr @BenTheElder
2017-10-15 21:50:13 -07:00
Kubernetes Submit Queue 9ba01e5e78 Merge pull request #50729 from allencloud/remove-redundant-error-test-case
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 redundant error test case in autoscaling validation

Signed-off-by: allencloud <allen.sun@daocloud.io>



**What this PR does / why we need it**:
I think the error test case I removed is the same as https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/autoscaling/validation/validation_test.go#L393-L412 .
So maybe removal of this part is proper, since it would reduce the codes and save a little bit time in testing.

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

**Special notes for your reviewer**:
NONE

**Release note**:

```release-note
NONE
```
2017-10-15 20:19:51 -07:00
Jeff Grafton aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Xingcai Zhang 70f47a7975 Update many misspelled word initializer 2017-10-15 22:09:26 +08:00
Gavin 468badd178 remove hairpin constant 2017-10-13 11:47:59 +08: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
zhengchuan hu f50e0e7c50 Fix incorrect link in api 2017-10-12 22:50:17 +08:00
Kubernetes Submit Queue aaf14d4619 Merge pull request #53525 from sttts/sttts-scheme-copier-romoval
Automatic merge from submit-queue (batch tested with PRs 53525, 53652). 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>.

apimachinery: remove ObjectCopier interface(s)

The big commit is a mechanical, transitive removal of the copier interfaces in all structs and function calls.
2017-10-10 08:31:41 -07:00
allencloud fd82adb012 validate kube-proxy options
Signed-off-by: allencloud <allen.sun@daocloud.io>
Signed-off-by: Allen Sun <allen.sun@daocloud.io>
2017-10-09 14:12:15 +08:00
Slava Semushin b88a640ef8 PSP: teach fuzzer about fsGroup/supplementalGroups strategies. 2017-10-06 18:00:23 +02:00
Dr. Stefan Schimanski ed586da147 apimachinery: remove Scheme.DeepCopy 2017-10-06 14:59:17 +02:00
Janet Kuo fd48a4a895 Autogen 2017-10-05 15:01:52 -07:00
Janet Kuo 48cb110c38 Fix typo in apps/v1beta2 default test 2017-10-05 10:43:11 -07: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
Kubernetes Submit Queue b0eb7d884d Merge pull request #53443 from liggitt/psp-allow-escalation
Automatic merge from submit-queue (batch tested with PRs 53454, 53446, 52935, 53443, 52917). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Use pointer for PSP allow escalation

Fixes #53437 

The `AllowPrivilegeEscalation` field was added to PodSpec and PodSecurityPolicySpec in 1.8.0.

In order to remain compatible with pre-1.8.0 behavior, PodSecurityPolicy objects created against a previous release must not restrict this field, which means the field must default to true in PodSecurityPolicySpec. However, the field was added as a `bool`, not a `*bool`, which means that no defaulting is possible.

We have two options:
1. Require all pre-existing PodSecurityPolicy objects that intend to allow privileged permissions to update to set this new field to true
2. Change the field to a `*bool` and default it to true.

This PR does the latter. With this change, we have the following behavior:

A 1.8.1+ client/server now has three ways to serialize:
* `nil` values are dropped from serialization (because `omitempty`), which is interpreted correctly by other 1.8.1+ clients/servers, and is interpreted as false by 1.8.0
* `false` values are serialized and interpreted correctly by all clients/servers
* `true` values are serialized and interpreted correctly by all clients/servers

A 1.8.0 client/server has two ways to serialize:
* `false` values are dropped from serialization (because `omitempty`), which is interpreted as `false` by other 1.8.0 clients/servers, but as `nil` (and therefore defaulting to true) by 1.8.1+ clients/servers
* `true` values are serialized and interpreted correctly by all clients/servers

The primary concern is the 1.8.0 server dropping the `false` value from serialization, but I consider the compatibility break with pre-1.8 behavior to be more severe, especially if we can resolve the regression in an immediate point release.

```release-note
PodSecurityPolicy: Fixes a compatibility issue that caused policies that previously allowed privileged pods to start forbidding them, due to an incorrect default value for `allowPrivilegeEscalation`. PodSecurityPolicy objects defined using a 1.8.0 client or server that intended to set `allowPrivilegeEscalation` to `false` must be reapplied after upgrading to 1.8.1.
```
2017-10-05 05:06:30 -07:00
Kubernetes Submit Queue c1703a4998 Merge pull request #53343 from p0lyn0mial/move_newAdmissionReview_method_to_webhook
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>.

moves admission.v1alpha1.NewAdmissionReview method to webhook plugin

**What this PR does / why we need it**:
this is necessary, because the webhook plugin will be moved down to apiserver.

**Release note**:

```
NONE
```
2017-10-05 02:24:14 -07:00
Jordan Liggitt bed6d0f5ea
Use pointer for PSP allow escalation 2017-10-04 13:55:06 -04:00
p0lyn0mial 187171284a moves admission.v1alpha1.NewAdmissionReview to webhook plugin
this is necessary, because the webhook plugin will be moved down to apiserver.
2017-10-04 19:50:27 +02:00
Kubernetes Submit Queue 029ed12b33 Merge pull request #49205 from dixudx/fix_api_type_typos
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix some typos in api/types

**What this PR does / why we need it**:
Fix some typos in api/types

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

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2017-10-03 20:17:43 -07:00
Ryan Roden-Corrent 53939c4433 Improve explanation of ReplicaSet.
"ReplicaSet represents the configuration of a ReplicaSet" does not tell
you much. I took the explanation from
https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/#when-to-use-a-replicaset
2017-10-03 16:22:12 -04:00
Kubernetes Submit Queue aa7d9b1da9 Merge pull request #52950 from liggitt/persist-rbac-v1
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>.

Change RBAC storage version to v1 for 1.9

v1 was introduced in 1.8, but storage version remained at v1beta1 to accommodate HA rolling upgrades. in 1.9, we can change the persisted and preferred version to v1

```release-note
RBAC objects are now stored in etcd in v1 format. After completing an upgrade to 1.9, RBAC objects (Roles, RoleBindings, ClusterRoles, ClusterRoleBindings) should be migrated to ensure all persisted objects are written in `v1` format, prior to `v1alpha1` support being removed in a future release.
```
2017-10-03 00:24:31 -07:00
Kubernetes Submit Queue 884c6f9146 Merge pull request #52644 from surajnarwade/remove_unused_var_const
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 unused variables and constant from pkg/apis/componentconfig/v1…

…alpha1/defaults.go

This commit will remove variables `zeroDuration`, `defaultNodeAllocatableEnforcement` and
constants `defaultIPTablesMasqueradeBit` and `defaultIPTablesDropBit` as they are unused.



```release-note
NONE
```
2017-10-02 09:28:10 -07:00
Monis Khan 5eb5b3e402
Correct APIGroup for RoleBindingBuilder Subjects
This change corrects RoleBindingBuilder to use the RBAC API group
with users and groups as subjects (service accounts use the empty
string since they are in the legacy core group).  This is based on
the defaulting in pkg/apis/rbac/v1/defaults.go#SetDefaults_Subject.
This is required because the bootstrap RBAC data is built with these
helpers and does not go through defaulting, whereas the data
retrieved from the server has already gone through defaulting.  This
can lead to the reconciliation code incorrectly adding duplicate
subjects because it believes that they are missing (since the API
groups do not match).

Signed-off-by: Monis Khan <mkhan@redhat.com>
2017-09-30 12:15:43 -04:00
mattjmcnaughton abd46684d4 Make HPA tolerance a flag
Fix #18155

Make HPA tolerance configurable as a flag. This change allows us to use
different tolerance values in production/testing.

Signed-off-by: mattjmcnaughton <mattjmcnaughton@gmail.com>
2017-09-28 22:01:51 -04:00
Di Xu a1cee9ab3b fix some typos in api types 2017-09-26 10:56:44 +08:00
Jordan Liggitt 232db3b888
Change RBAC storage version to v1 for 1.9 2017-09-25 10:02:21 -04:00
Jordan Liggitt b8155e107c
Limit 52-character cronjob name validation to create 2017-09-24 23:56:27 -04:00
Kubernetes Submit Queue b7c36dc7f7 Merge pull request #52898 from jianglingxia/jlx-92216
Automatic merge from submit-queue (batch tested with PRs 52751, 52898, 52633, 52611, 52609). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

fix error of func TestValidateStatefulSet that updateStrategy

**What this PR does / why we need it**:
spec.updateStrategy.rollingUpdate.partition,but spec.updateStrategy.rollingUpate need "d"
**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-09-24 05:27:48 -07: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 ebb488f3ab Merge pull request #52597 from smarterclayton/roundtrip_options
Automatic merge from submit-queue (batch tested with PRs 52485, 52443, 52597, 52450, 51971). 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>..

Some kubelet flags do not accept their default values

Correct the flags and add a round trip test that ensure these do not
break again in the future.

@deads2k as observed when we tried to turn flags into args.
2017-09-23 18:48:55 -07:00
Kubernetes Submit Queue 1c0c83d245 Merge pull request #51777 from m1093782566/ipvs-sync-period
Automatic merge from submit-queue (batch tested with PRs 52240, 48145, 52220, 51698, 51777). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Add ipvs default sync period

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

If sync period <=0, it will cause kube-proxy panic, see: https://github.com/kubernetes/kubernetes/blob/master/pkg/proxy/ipvs/proxier.go#L728

That is, the input parameter for `time.NewTicker()` must be >0.

Unfortunately, current default value of sync period is 0.

**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-09-23 09:14:05 -07:00
Kubernetes Submit Queue d85f4c26e0 Merge pull request #52733 from julia-stripe/validate-cronjob-name-length
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>..

Validate that cronjob names are 52 characters or less

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

Right now when you create a cronjob with a name longer than 52 characters, creation will succeed but the cronjob controller will create Job objects with names longer than 63 characters. Jobs cannot have names longer than 63 characters, so the cronjob will never be able to run any jobs.

**Which issue this PR fixes** : Fixes #50850 

**Special notes for your reviewer**:

**Release note**:
```release-note
Validate that cronjob names are 52 characters or less
```
2017-09-22 19:22:20 -07:00
Kubernetes Submit Queue 7760d9e240 Merge pull request #51959 from cmluciano/cml/updatenpowners
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Add cmluciano to NetworkPolicy reviewers

**Release note**:
```
NONE
```
2017-09-22 18:25:28 -07:00
jianglingxia abd1ea86fb fix error of func TestValidateStatefulSet that updateStrategy 2017-09-22 16:33:30 +08:00
Jeff Grafton 02fb4200dc Use buildozer to delete licenses() rules 2017-09-21 15:53:22 -07:00
Jeff Grafton 532bd482df Use buildozer to remove deprecated automanaged tags 2017-09-21 15:53:22 -07:00
Kubernetes Submit Queue 9a7818a2e0 Merge pull request #52533 from soltysh/cronjob_beta_defaults
Automatic merge from submit-queue (batch tested with PRs 52500, 52533). 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>..

Cronjob beta defaults

**What this PR does / why we need it**:
I forget to set the defaults in beta for (successful|failed)JobsHistoryLimit so doing this now. It's already too late for 1.8 so this goes into 1.9.

**Release note**:
```release-note
Set defaults for successfulJobsHistoryLimit (3) and failedJobsHistoryLimit (1) in batch/v1beta1.CronJobs
```
2017-09-19 20:38:37 -07:00
Kubernetes Submit Queue fb994df7e0 Merge pull request #51337 from php-coder/psp_star_in_allowed_caps
Automatic merge from submit-queue (batch tested with PRs 51337, 47080, 52646, 52635, 52666). 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>..

PodSecurityPolicy.allowedCapabilities: add support for * to allow to request any capabilities

**What this PR does / why we need it**:
Prior this change there was no way to allow to pods to request any capabilities. Cluster admin had always specify a full list of capabilities explicitly. Because there are many of them, it gets tedious. This PR makes possible to use `*` to allow all possible capabilities. Non-paranoid (and lazy) cluster admins can use it. Those who are super strict and paranoid of course won't use it because `*` allows capabilities that don't exist today but may be introduced in the future.

"privileged" PSP in examples was modified to allow privileged users to use this feature.

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

**Special notes for your reviewer**:
This functional is already present in OpenShift: https://github.com/openshift/origin/pull/12875 and https://github.com/openshift/origin/pull/15135

**Release note**:
```release-note
PSP: add support for using `*` as a value in `allowedCapabilities` to allow to request any capabilities
```

CC @simo5 @pweil- @gyliu513 @liqlin2015
2017-09-19 17:31:04 -07:00
Julia Evans e30237b869 Validate that cronjob names are less than 52 characters 2017-09-19 13:39:33 -07:00
Suraj Narwade 62fb675f84 Remove unused variables and constant from pkg/apis/componentconfig/v1alpha1/defaults.go
This commit will remove variables `zeroDuration`, `defaultNodeAllocatableEnforcement` and
constants `defaultIPTablesMasqueradeBit` and `defaultIPTablesDropBit` as they are unused.
2017-09-18 15:03:13 +05:30
Kubernetes Submit Queue 1a44e26670 Merge pull request #48216 from kargakis/update-pds-api-comment
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>..

api: update progressdeadlineseconds comment for deployments

@kubernetes/sig-apps-api-reviews we may never end up doing autorollback - this drops the comment from the pds field for now
2017-09-16 15:33:18 -07:00
Clayton Coleman 748172f94e
Some kubelet flags do not accept their default values
Correct the flags and add a round trip test that ensure these do not
break again in the future.
2017-09-16 16:20:00 -04:00
supereagle 87c29a08e1 fix typos: remove duplicated word in comments 2017-09-16 14:38:10 +08:00
Maciej Szulik 7e96fc66e1
Update defaults (successful|failed)JobsHistoryLimit in batch/v1beta1 2017-09-15 14:56:50 +02:00
Tim Allclair 49a38728aa
'*' is valid for allowed seccomp profiles 2017-09-11 11:47:03 -07: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
Slava Semushin 9015a82692 PodSecurityPolicy.allowedCapabilities: add support for using * to allow to request any capabilities.
Also modify "privileged" PSP to use it and allow privileged users to use
any capabilities.
2017-09-06 12:18:09 +02: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 b94b8fb28a
Add cmluciano to NetworkPolicy reviewers 2017-09-05 14:14:27 -04:00
Christopher M. Luciano 84290ce35c
EgressRule generated code 2017-09-05 12:48:55 -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
Christopher M. Luciano b03302f905
Add EgressRule to NetworkPolicy
Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>
2017-09-05 12:01:07 -04: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 0dedd13ad7 Merge pull request #51734 from soltysh/cronjobs_beta
Automatic merge from submit-queue

Enable batch/v1beta1.CronJobs by default

This PR re-applies the cronjobs->beta back (https://github.com/kubernetes/kubernetes/pull/51720)  with the fix from @shyamjvs.

Fixes #51692

@apelisse @dchen1107 @smarterclayton ptal
@janetkuo @erictune fyi
2017-09-03 18:22:27 -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
Maciej Szulik 6962427b35
Enable batch/v1beta1.CronJobs by default 2017-09-03 11:17:33 +02: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
Kubernetes Submit Queue 12f96e2e35 Merge pull request #51283 from caesarxuchao/fix-initializer-validate
Automatic merge from submit-queue (batch tested with PRs 51583, 51283, 51374, 51690, 51716)

Unify initializer name validation

Unify the validation rules on initializer names. Fix https://github.com/kubernetes/kubernetes/issues/51843.

```release-note
Action required: validation rule on metadata.initializers.pending[x].name is tightened. The initializer name needs to contain at least three segments separated by dots. If you create objects with pending initializers, (i.e., not relying on apiserver adding pending initializers according to initializerconfiguration), you need to update the initializer name in existing objects and in configuration files to comply to the new validation rule.
```
2017-09-02 20:35:22 -07:00
Kubernetes Submit Queue 73ed961b8e Merge pull request #48075 from clamoriniere1A/feature/job_failure_policy
Automatic merge from submit-queue (batch tested with PRs 51335, 51364, 51130, 48075, 50920)

[API] Feature/job failure policy

**What this PR does / why we need it**: Implements the Backoff policy and failed pod limit defined in https://github.com/kubernetes/community/pull/583

**Which issue this PR fixes**: 
fixes #27997, fixes #30243

**Special notes for your reviewer**:
This is a WIP PR, I updated the api batchv1.JobSpec in order to prepare the backoff policy implementation in the JobController.

**Release note**:
```release-note
Add backoff policy and failed pod limit for a job
```
2017-09-02 18:18:54 -07:00
Kubernetes Submit Queue 11a836078d Merge pull request #46444 from jsafrane/node-mount-propagation
Automatic merge from submit-queue (batch tested with PRs 45724, 48051, 46444, 51056, 51605)

Mount propagation in kubelet

Together with #45724 it implements mount propagation as proposed in https://github.com/kubernetes/community/pull/659

There is:

- New alpha annotation that allows user to explicitly set propagation mode for each `VolumeMount` in pod containers (to be replaced with real `VolumeMount.Propagation` field during beta) + validation + tests. "Private" is the default one (= no change to existing pods).

  I know about proposal for real API fields for alpha feature in https://docs.google.com/document/d/1wuoSqHkeT51mQQ7dIFhUKrdi3-1wbKrNWeIL4cKb9zU/edit, but it seems it's not implemented yet. It would save me quite lot of code and ugly annotation.

- Updated CRI API to transport chosen propagation to Docker.

- New `kubelet --experimental-mount-propagation` option to enable the previous bullet without modifying types.go (worked around with changing `KubeletDeps`... not nice, but it's better than adding a parameter to `NewMainKubelet` and removing it in the next release...)

```release-note
kubelet has alpha support for mount propagation. It is disabled by default and it is there for testing only. This feature may be redesigned or even removed in a future release.
```

@derekwaynecarr @dchen1107 @kubernetes/sig-node-pr-reviews
2017-09-02 12:11:07 -07:00
Kubernetes Submit Queue c84b3132a2 Merge pull request #48051 from xilabao/add-selfsubjectrulesreview-api
Automatic merge from submit-queue (batch tested with PRs 45724, 48051, 46444, 51056, 51605)

Add selfsubjectrulesreview in authorization

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

**Which issue this PR fixes**: fixes #47834 #31292

**Special notes for your reviewer**:

**Release note**:

```release-note
Add selfsubjectrulesreview API for allowing users to query which permissions they have in a given namespace.
```
/cc @deads2k @liggitt
2017-09-02 12:11:04 -07:00
Kubernetes Submit Queue 5c8d6ea5ea Merge pull request #48217 from kargakis/unavailable-replicas-comment
Automatic merge from submit-queue (batch tested with PRs 51590, 48217, 51209, 51575, 48627)

api: clarify d.status.unavailableReplicas

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

@kubernetes/sig-apps-api-reviews
2017-09-02 11:12:07 -07:00
Kubernetes Submit Queue 5f405b7f47 Merge pull request #49645 from dixudx/v1beta2_conversion_test
Automatic merge from submit-queue (batch tested with PRs 50381, 51307, 49645, 50995, 51523)

add apps/v1beta2 conversion tests

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

add apps/v1beta2 conversion test

Depend on ~~#49751~~(Merged), ~~#49719~~(Merged)

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

**Release note**:

```release-note
add apps/v1beta2 conversion test
```
2017-09-01 16:34:02 -07:00
Michail Kargakis 3988a37361
Update d.spec.progressDeadlineSeconds comment 2017-09-01 22:00:47 +02: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
Michail Kargakis b1d99e9f7e
Update d.status.unavailableReplicas api comment 2017-09-01 21:19:12 +02:00
cedric lamoriniere 228693622b Generate files from v1.JobSpec modification
This commit contains the new version of generated api files linked
to the v1.JobSpec modifications in the previous commit after
"make update"
2017-09-01 21:01:48 +02:00
cedric lamoriniere 3989b18586 update API v1 Job object
Add new fields in api v1.JobSpec object for backoff policy
- BackoffLimit
- FailedPodsLimit

fixes: https://github.com/kubernetes/community/pull/583
2017-09-01 21:01:29 +02:00
Michal Fojtik 7d2be1c521
generate UpdateScale and GetScale verbs for scalable resources 2017-09-01 14:25:46 +02:00
Chen Rong ed8adf6e51 generated 2017-09-01 19:11:19 +08:00
xilabao f14c138438 add selfsubjectrulesreview api 2017-09-01 19:09:43 +08:00
m1093782566 b29c8f32bf add ipvs default sync period 2017-09-01 16:24:48 +08: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
Antoine Pelisse d7eec6b51d Revert "Enable batch/v1beta1.CronJobs by default" 2017-08-31 09:54:16 -07:00
Di Xu a76f538304 add tests for apps/v1beta2 conversion 2017-08-31 16:23:19 +08:00
Kubernetes Submit Queue ffcd6d1dce Merge pull request #51465 from soltysh/cronjob_beta
Automatic merge from submit-queue (batch tested with PRs 50775, 51397, 51168, 51465, 51536)

Enable batch/v1beta1.CronJobs by default

This PR moves to CronJobs beta entirely, enabling `batch/v1beta1` by default.

Related issue: #41039 

@erictune @janetkuo ptal

```release-note
Promote CronJobs to batch/v1beta1.
```
2017-08-30 15:14:32 -07: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
m1093782566 5ed2b44ca7 implement ipvs mode of kube-proxy
Conflicts:
	pkg/util/ipvs/ipvs_unsupported.go
2017-08-30 10:03:02 +08:00
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 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
Maciej Szulik 2de214b044
Enable batch/v1beta1.CronJobs by default 2017-08-29 09:31:39 +02:00
Chao Xu c33de9f204 unify the validation rules on initializer name 2017-08-28 16:17:05 -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
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
Tim Hockin e73b27cbce Add debugging to the codegen process 2017-08-25 14:08:42 -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 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
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 4a4c194bbd Merge pull request #51024 from fisherxu/UTautoscaler
Automatic merge from submit-queue (batch tested with PRs 51114, 51233, 51024, 51053, 51197)

add UT for pkg/apis/autoscaling/v2alpha1/defaults.go

**What this PR does / why we need it**:
add UT for pkg/apis/autoscaling/v2alpha1/defaults.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
None
```
2017-08-25 06:22:14 -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
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 54a058f792
Add networking fuzzer
Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>
2017-08-24 16:20:13 -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
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
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
David Eads 9daf55e173 remove unnecessary field conversions 2017-08-23 10:52:22 -04:00
Di Xu 504f89e3ac auto-gen 2017-08-23 15:23:34 +08:00
fisherxu 28880ee0eb add UT for pkg/apis/autoscaling/v2alpha1/defaults.go 2017-08-22 19:34:30 +08:00
Janet Kuo ad0c6b66b5 Fix StatefulSet update validation 2017-08-21 15:28:08 -07:00
Kubernetes Submit Queue 5c351c282a Merge pull request #50678 from xiangpengzhao/remove-cm-flag
Automatic merge from submit-queue (batch tested with PRs 47896, 50678, 50620, 50631, 51005)

Remove deprecated lookup cache flags.

**What this PR does / why we need it**:
Remove deprecated lookup cache flags: `replication-controller-lookup-cache-size, replicaset-lookup-cache-size, daemonset-lookup-cache-size`

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

**Special notes for your reviewer**:
/cc @enisoc

**Release note**:

```release-note
The following deprecated flags have been removed from `kube-controller-manager`: `replication-controller-lookup-cache-size`, `replicaset-lookup-cache-size`, and `daemonset-lookup-cache-size`. Make sure you no longer attempt to set them.
```
2017-08-21 08:26:20 -07: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
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
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 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 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
Yinan Li 3b4f263b67 Added auto-generated changes 2017-08-16 21:29:03 -07: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
allencloud dafdd01af3 remove redundant error test case in autoscaling validation
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-08-16 11:31:08 +08:00
Michael Taufen 24bab4c20f move KubeletConfiguration out of componentconfig API group 2017-08-15 08:12:42 -07:00
xiangpengzhao 6ee6b17719 Remove deprecated lookup cache flags. 2017-08-15 20:03:11 +08:00
Kubernetes Submit Queue 6dc567abb9 Merge pull request #50327 from sttts/sttts-unify-network-types
Automatic merge from submit-queue

Drop extensions internal Network* types

Fixes #46626
2017-08-15 04:57:42 -07:00
Kubernetes Submit Queue 55160e7cc1 Merge pull request #49322 from bsalamat/priority_admission
Automatic merge from submit-queue

Add Priority admission controller

**What this PR does / why we need it**: Add Priority admission controller. This admission controller checks creation and update of PriorityClasses. It also resolves a PriorityClass name of a pod to its integer value.

**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
Add Priority admission controller for monitoring and resolving PriorityClasses.
```

ref/ #47604
ref/ #48646
2017-08-15 03:13:15 -07:00
Dr. Stefan Schimanski 6bc9f3fba6 Update generated files 2017-08-15 11:56:46 +02:00
Dr. Stefan Schimanski b0b5de6eaf Port internal extensions/Network* to networking.k8s.io API group 2017-08-15 11:56:46 +02:00
Kubernetes Submit Queue 3537f8fa34 Merge pull request #49454 from dixudx/cleanup_DaemonSet_templateGeneration
Automatic merge from submit-queue

Cleanup DaemonSet templateGeneration

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

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

**Special notes for your reviewer**:

/cc @janetkuo @foxish 

~~Depends on #49071~~ (Merged) 

**Release note**:

```release-note
None
```
2017-08-15 00:01:06 -07:00
Kubernetes Submit Queue 9f902fef24 Merge pull request #50094 from sttts/sttts-no-importprefix
Automatic merge from submit-queue (batch tested with PRs 50094, 48966, 49478, 50593, 49140)

apimachinery: remove pre-apigroups import path logic

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

fix apps DeploymentSpec conversion issue

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

When working on #49645, I found current conversion for `v1.PodTemplateSpec` to `api.PodTemplateSpec` did not work properly. It should function as [L244-L246](https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/apps/v1beta1/conversion.go#L244-L246).

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

**Release note**:

```release-note
fix apps DeploymentSpec conversion issue
```
2017-08-11 22:20:10 -07:00
Di Xu 4d3cba7740 auto-gen 2017-08-12 02:40:36 +00:00
Di Xu 34d573c977 deprecation of .spec.templateGeneration from extensions/v1beta1 DaemonSet to apps/v1beta2 2017-08-12 02:15:06 +00:00
Kubernetes Submit Queue b354c6f8f5 Merge pull request #49803 from caesarxuchao/remove-unused-tags
Automatic merge from submit-queue (batch tested with PRs 47724, 49984, 49785, 49803, 49618)

Remove useless conversion-gen tags

To generate cross group conversions, `+k8s:conversion-gen` should be added in the way https://github.com/kubernetes/kubernetes/pull/49751 did. This PR removes the useless tags in pkg/apis/extensions/v1beta1/doc.go
2017-08-11 18:47:22 -07:00
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00