Commit Graph

116 Commits (9a8b675d2c19fa9e4baa0919ed5df0f19dd4c9b0)

Author SHA1 Message Date
Timothy St. Clair da77826d08 Remove myself (timothysc) from OWNERS files on areas that I do not
actively maintain.
2018-02-12 18:56:41 -06:00
Kubernetes Submit Queue 245ca8ef1f
Merge pull request #59291 from bsalamat/fix_validation
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 validation failure of Pod priority when the feature is disabled

**What this PR does / why we need it**:
I learned that fields specified in the API should be silently ignored when the feature is disabled. This makes sense as downgrading a cluster would fail otherwise. This PR removes the validation logic that ensures Pod priority is not set when priority feature is disabled.

**Special notes for your reviewer**:

**Release note**:

```release-note
Pod priority can be specified ins PodSpec even when the feature is disabled, but it will be effective only when the feature is enabled.
```

/sig scheduling
ref: #57471
2018-02-12 11:54:39 -08:00
Di Xu 48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
Slava Semushin 21abc9e105 validation_test.go: move test cases for AllowPrivilegeEscalation option from TestValidatePodSpec to TestValidateSecurityContext. 2018-02-08 16:42:35 +01:00
Kubernetes Submit Queue 84bfc7ada5
Merge pull request #59249 from hanxiaoshuai/fixtodo0202
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 todo: Move isDecremented to pkg/apis/core/validation

**What this PR does / why we need it**:
fix todo: Move isDecremented in "k8s.io/kubernetes/pkg/apis/core/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**:

2. If no release note is required, just write "NONE".
-->
```release-note
NONE
```
2018-02-07 19:35:15 -08:00
Kubernetes Submit Queue f99ed35b28
Merge pull request #58444 from bsalamat/update_prio
Automatic merge from submit-queue (batch tested with PRs 58444, 59283, 59437, 59325, 59449). 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 PriorityClassName API doc

**What this PR does / why we need it**: It updates the comment (and hence API doc) for PriorityClassName of PodSpec.

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

/sig scheduling
2018-02-06 22:42:33 -08:00
Kubernetes Submit Queue 3d4eaf7307
Merge pull request #57092 from linyouchong/linyouchong-20171212
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 TODO: moving Driver name check in API validation

**What this PR does / why we need it**:
fix TODO in csi_plugin.go ,moving Driver name check in API 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 #58163

**Special notes for your reviewer**:

**Release note**:
NONE

@vladimirvivien,@jsafrane,@saad-ali
I saw some TODO there and I am very interested in fixing it.
Please let me know if it is not  inappropriate to do this.
2018-02-06 18:49:36 -08:00
Bobby (Babak) Salamat 9493f5fceb Update PriorityClassName API doc 2018-02-06 17:44:18 -08:00
linyouchong efb68ddf73 fix TODO: moving driver name check in API validation 2018-02-07 09:03:47 +08:00
Kubernetes Submit Queue 4bd22b5467
Merge pull request #58415 from gnufied/fix-volume-resize-messages
Automatic merge from submit-queue (batch tested with PRs 52942, 58415). 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 messaging on volume expansion

- we now provide clear message to user what to do when cloudprovider resizing is finished
  and file system resizing is needed.
- add a event when resizing is successful
- Use PATCH both in controller-manager and kubelet for updating PVC status
- Remove code duplication between controller-manager and kubelet for updating PVC status
- Only remove conditions that are managed by resize controller



```release-note
Improve messages user gets during and after volume resizing is done.
```
2018-02-06 07:55:32 -08:00
Kubernetes Submit Queue 69f8b1559f
Merge pull request #58256 from mlmhl/pvc_storageclass_upgrade_path
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>.

Admit upgrading storage class of pvc from beta annotation to spec field

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

`BetaStorageClassAnnotation` is marked as deprecated so we need to provide an upgrade path from PVC with storage class specified in beta annotation to storage class specified in attribute.

ref: #58147 

**Release note**:

```release-note
NONE
```

/sig storage
2018-02-05 19:02:26 -08:00
Kubernetes Submit Queue cf66442e56
Merge pull request #59063 from ayushpateria/patch-1
Automatic merge from submit-queue (batch tested with PRs 58317, 58687, 57872, 59063, 59328). 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 deprecation comment to PersistentVolumeReclaimRecycle

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Announcing the deprecation of the recycling reclaim policy.
```
2018-02-05 18:43:40 -08:00
Bobby (Babak) Salamat 79325e06ed Remove validation failure of Pod priority when the feauter is disabled 2018-02-02 15:07:20 -08:00
Kubernetes Submit Queue 21387af0b4
Merge pull request #58990 from bsalamat/nominated_node
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 NominatedNodeName field to PodStatus

**What this PR does / why we need it**:
Today, Scheduler uses an annotation called "nominated-node-name" to mark a preemptor Pod. This annotation helps scheduler know about the Pods that are destined to run on the nodes so that the resources made available by preemption is not allocated to a different Pod. In a recent discussion with @bgrant0607, we learned that we should change the annotation to a field as this field can be used by multiple schedulers and other components that may make scheduling-related decisions (descheduler, auto-scaler, kube-arbitrator, ...). 


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

**Special notes for your reviewer**:

**Release note**:

```release-note
Add "nominatedNodeName" field to PodStatus. This field is set when a pod preempts other pods on the node.
```
/sig scheduling
2018-02-02 07:26:16 -08:00
hangaoshuai e7076025e2 fix todo: Move isDecremented to pkg/apis/core/validation 2018-02-02 15:11:07 +08:00
Ayush Pateria b070c2f6a4
Elaborate deprecation warning 2018-02-01 02:29:55 +05:30
Bobby (Babak) Salamat 74706546e9 Autogenerated files 2018-01-30 13:13:57 -08:00
Bobby (Babak) Salamat 384a86caa9 Add NominatedNodeName to PodStatus 2018-01-30 13:13:57 -08:00
Ayush Pateria 24ab5e9ed0 Add deprecation comment to PersistentVolumeReclaimRecycle 2018-01-31 00:38:02 +05:30
hangaoshuai d3c75329c0 remove some unused functions in validation.go 2018-01-30 20:55:21 +08:00
Hemant Kumar 1fa8cbc5e4 Improve messaging on resize
- we now provide clear message to user what to do when cloudprovider resizing is finished
  and file system resizing is needed.
- add a event when resizing is successful.
- Use Patch for updating PVCs in both kubelet and controller-manager
- Extract updating pvc util function in one place.
- Only update resize conditions on progress
2018-01-29 15:07:51 -05:00
Kubernetes Submit Queue 27d01b5ab9
Merge pull request #57938 from dims/add-binary-configmap
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 binary configmap

Reviving code from https://github.com/kubernetes/kubernetes/pull/33549 submitted by @zreigz

**What this PR does / why we need it**:
Add support for binary files in ConfigMap

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

**Special notes for your reviewer**:

**Release note**:

```release-note
ConfigMap objects now support binary data via a new `binaryData` field. When using `kubectl create configmap --from-file`, files containing non-UTF8 data will be placed in this new field in order to preserve the non-UTF8 data. Use of this feature requires 1.10+ apiserver and kubelets.
```
2018-01-26 04:34:33 -08:00
Davanum Srinivas 426eb0419e generated code and docs 2018-01-23 07:28:47 -05:00
Lukasz Zajaczkowski 7e158fb4f6 Add support for binary file in configmap 2018-01-23 07:28:34 -05:00
Mayank Kumar eac49159a9 fix userid validation 2018-01-20 22:00:07 -08:00
mlmhl 285ee41ba7 admit upgrading storage class of pvc from beta annotation to spec field 2018-01-18 20:17:59 +08:00
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 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
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 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 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
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