Commit Graph

1738 Commits (13b12e89408869c5b560a81e95bca33267bdb8e1)

Author SHA1 Message Date
NickrenREN 37d42870ea auto generated code 2018-01-16 12:34:31 +08:00
NickrenREN 87cebae738 Add fsType for CSI 2018-01-16 12:34:04 +08:00
Kubernetes Submit Queue 6537709e2e
Merge pull request #49874 from k82cn/add_nodeAffinity_in_err_msg
Automatic merge from submit-queue (batch tested with PRs 49874, 56919, 57246). 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>.

Added nodeAffinity in validation error msg.

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

**Release note**:

```release-note
NONE
```
2018-01-10 08:15:41 -08:00
Kubernetes Submit Queue 4bdf282e0e
Merge pull request #57170 from jiayingz/validation
Automatic merge from submit-queue (batch tested with PRs 57037, 57170). 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>.

Invalidate resource requirements on extended resources with only request set

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Returns an error for non overcommitable resources if they don't have limit field set in container spec.
```
2018-01-05 16:01:33 -08:00
Jiaying Zhang 66c1c5e222 Invalidate resource requirements on extended resources with only request
set.
2018-01-03 12:35:14 -08:00
Allen Petersen 3d69cea1e5 Update generated files 2018-01-02 22:13:19 -08:00
Christoph Blecker 80e344644e
Regenerate all generated code 2018-01-02 00:21:07 -08:00
Jeff Grafton efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
Kubernetes Submit Queue 5bf00d9a53
Merge pull request #55669 from yuexiao-wang/apis-validate
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 unit test for ValidateStatefulSet

Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>



**What this PR does / why we need it**:
add unit test for ValidateStatefulSetSpec

**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-12-22 18:30:15 -08:00
Kubernetes Submit Queue 5e4ff8ac54
Merge pull request #52371 from cheftako/external
Automatic merge from submit-queue (batch tested with PRs 56716, 52371). 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>.

Separate loop and plugin control

**What this PR does / why we need it**: Separate loop and plugin control in the kube-controller-manager.
Adding an "--external-plugin" flag to specify a plugin to load when
cloud-provider is set to "external". Flag has no effect currently
when the cloud-provider is not set to external. The expectation is
that the cloud provider and external plugin flags would go away once
all cloud providers are on stage 2 cloud-controller-manager solutions.

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

**Special notes for your reviewer**:

**Release note**:
```release-note Added --external-plugin flag to kube-controller-manager to determine plugin when --cloud-provider is set to external.
```
2017-12-19 12:55:38 -08:00
Kubernetes Submit Queue 3e78c4904e
Merge pull request #54530 from sjenning/validate-state-transition
Automatic merge from submit-queue (batch tested with PRs 56108, 56811, 57335, 57331, 54530). 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: validate container phase transitions

https://github.com/kubernetes/kubernetes/issues/54499 exposed an issue where a container was transitioning from the terminal phases of `Succeeded` or `Failed` to `Pending`.  It is due to a bug in the kubelet, but additional validation in the API server can prevent this invalid phase transition from being accepted.

@smarterclayton @derekwaynecarr @dashpole @joelsmith @frobware 

I confirmed that the reproducer in https://github.com/kubernetes/kubernetes/issues/54499 does not work with this validation in place.  The erroneous kubelet status update is rejected:
```
status_manager.go:437] Failed to update status for pod "test_default(2f02ecdf-b92a-11e7-a2d0-1c1b0deeddfa)": Pod "test" is invalid: status.containerStatuses[0].state: Forbidden: may not be transitioned to non-terminated state
```

However, it only works to a point with this particular issue.  The termination hangs and eventually the resource is removed from etcd and the status update goes through because there is no old statuses to compare.  Not exactly sure how this happens since there is no pod in etcd anymore  ¯\\_(ツ)_/¯
2017-12-18 17:45:43 -08:00
Kubernetes Submit Queue e072b71757
Merge pull request #54379 from tanshanshan/apisever-validate-hugepages
Automatic merge from submit-queue (batch tested with PRs 54379, 56593, 56685, 54174, 57309). 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>.

HugePages should require the user to request cpu or memory

**What this PR does / why we need it**:
 HugePages should require the user to request cpu or memory
ref #53672 

**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-12-18 14:45:37 -08:00
Walter Fender 070a7b5823 Seperate loop and plugin control
Seperate loop and plugin control in the kube-controller-manager.
Adding an "--external-plugin" flag to specify a plugin to load when
cloud-provider is set to "external". Flag has no effect currently
when the cloud-provider is not set to external. The expectation is
that the cloud provider and external plugin flags would go away once
all cloud providers are on stage 2 cloud-controller-manager solutions.

Managing the control loops more directly based on start up flags.
Addressing issue brought up by @wlan0

Switched to using the main node controller in CCM.
Changes to enable full NodeController to start in CCM.
Fix related tests.
Unifying some common code between KCM and CCM.
Fix related tests and comments.
Folded in feedback from @jhorwit2 and @wlan0
2017-12-18 10:58:45 -08:00
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
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