kubernetes/plugin/pkg/admission
Kubernetes Submit Queue 8cb14a4f7f Merge pull request #42755 from aveshagarwal/master-fix-default-toleration-seconds
Automatic merge from submit-queue (batch tested with PRs 41794, 42349, 42755, 42901, 42933)

Fix DefaultTolerationSeconds admission plugin

DefaultTolerationSeconds is not working as expected. It is supposed to add default tolerations (for unreachable and notready conditions). but no pod was getting these toleration. And api server was throwing this error:

```
Mar 08 13:43:57 fedora25 hyperkube[32070]: E0308 13:43:57.769212   32070 admission.go:71] expected pod but got Pod
Mar 08 13:43:57 fedora25 hyperkube[32070]: E0308 13:43:57.789055   32070 admission.go:71] expected pod but got Pod
Mar 08 13:44:02 fedora25 hyperkube[32070]: E0308 13:44:02.006784   32070 admission.go:71] expected pod but got Pod
Mar 08 13:45:39 fedora25 hyperkube[32070]: E0308 13:45:39.754669   32070 admission.go:71] expected pod but got Pod
Mar 08 14:48:16 fedora25 hyperkube[32070]: E0308 14:48:16.673181   32070 admission.go:71] expected pod but got Pod
```

The reason for this error is that the input to admission plugins is internal api objects not versioned objects so expecting versioned object is incorrect. Due to this, no pod got desired tolerations and it always showed:

```
Tolerations: <none>
```

After this fix, the correct  tolerations are being assigned to pods as follows:

```
Tolerations:	node.alpha.kubernetes.io/notReady=:Exists:NoExecute for 300s
		node.alpha.kubernetes.io/unreachable=:Exists:NoExecute for 300s
```

@davidopp @kevin-wangzefeng @kubernetes/sig-scheduling-pr-reviews @kubernetes/sig-scheduling-bugs @derekwaynecarr 

Fixes https://github.com/kubernetes/kubernetes/issues/42716
2017-03-10 22:02:18 -08:00
..
admit move admission to genericapiserver 2017-01-18 08:15:19 -05:00
alwayspullimages move admission to genericapiserver 2017-01-18 08:15:19 -05:00
antiaffinity move admission to genericapiserver 2017-01-18 08:15:19 -05:00
defaulttolerationseconds Fix DefaultTolerationSeconds admission plugin. It was using 2017-03-09 20:24:43 -05:00
deny Improve the code coverage of /plugin/pkg/admission/deny 2017-02-02 11:44:57 +08:00
exec update names for kube plugin initializer to avoid conflicts 2017-03-06 10:18:21 -05:00
gc Update generated files 2017-01-29 21:41:45 +01:00
imagepolicy fix typo in /pkg/admission/imagepolicy/config.go 2017-02-12 21:59:36 +08:00
initialresources Update to use proxy subresource consistently 2017-02-13 22:05:00 -05:00
limitranger update names for kube plugin initializer to avoid conflicts 2017-03-06 10:18:21 -05:00
namespace update names for kube plugin initializer to avoid conflicts 2017-03-06 10:18:21 -05:00
persistentvolume/label Merge pull request #40537 from gnufied/fix-multizone-pv-breakage 2017-03-05 11:16:46 -08:00
podnodeselector update names for kube plugin initializer to avoid conflicts 2017-03-06 10:18:21 -05:00
podpreset update names for kube plugin initializer to avoid conflicts 2017-03-06 10:18:21 -05:00
resourcequota update names for kube plugin initializer to avoid conflicts 2017-03-06 10:18:21 -05:00
security Merge pull request #38805 from xilabao/add-err-info-to-authorize-in-psp 2017-03-10 13:32:19 -08:00
securitycontext/scdeny move admission to genericapiserver 2017-01-18 08:15:19 -05:00
serviceaccount update names for kube plugin initializer to avoid conflicts 2017-03-06 10:18:21 -05:00
storageclass/default update names for kube plugin initializer to avoid conflicts 2017-03-06 10:18:21 -05:00
OWNERS OWNERS: Update latest OWNERS files 2017-01-23 10:05:48 -08:00