k3s/pkg/api
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
..
annotations
endpoints
errors Update bazel 2017-02-02 15:19:04 +01:00
events
install pkg/api/install: use apimachinery/announce+registered 2017-02-16 11:20:43 +01:00
meta add back just enough empty packages to allow heapster cycles to succeed 2017-01-17 08:07:30 -05:00
pod Addition of ScaleIO Kubernetes Volume Plugin 2017-03-03 15:47:19 -05:00
resource Update generated files 2017-01-29 21:41:45 +01:00
service
testapi run generators and updaters 2017-03-01 13:04:29 -08:00
testing Fix user fuzzer to avoid round trip flake 2017-03-07 17:41:01 -05:00
unversioned
util add unit test for groupversion 2017-02-03 17:37:42 +08:00
v1 Update docs and client 2017-03-09 07:34:56 +00:00
validation Validation PVs for mount options 2017-03-09 18:24:37 -05:00
BUILD move metav1 conversions to metav1 2017-02-14 11:47:23 -05:00
OWNERS Updated top level owners file to match new format 2017-01-19 11:29:16 -08:00
conversion_test.go pkg/api/testing: cut off fuzzers from static codecs 2017-02-02 06:58:28 +01:00
copy_test.go make round trip testing generic 2017-02-09 11:42:22 -05:00
deep_copy_test.go Remove the temporary fix for pre-1.0 mirror pods 2017-02-02 10:37:19 -08:00
defaulting_test.go Deployments under apps/v1beta1 with new defaults 2017-03-01 15:14:41 +01:00
defaults.go move pkg/fields to apimachinery 2017-01-19 09:50:16 -05:00
doc.go
field_constants.go
helpers.go Fix DefaultTolerationSeconds admission plugin. It was using 2017-03-09 20:24:43 -05:00
helpers_test.go pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
json.go Change taint/toleration annotations to api fields. 2017-02-22 09:27:42 -05:00
meta_test.go API 2017-02-28 23:05:40 -08:00
node_example.json
ref.go move client/record 2017-01-31 19:14:13 -05:00
ref_test.go move client/record 2017-01-31 19:14:13 -05:00
register.go move metav1 conversions to metav1 2017-02-14 11:47:23 -05:00
replication_controller_example.json
resource_helpers.go pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
resource_helpers_test.go pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
serialization_proto_test.go make round trip testing generic 2017-02-09 11:42:22 -05:00
serialization_test.go apimachinery: handle duplicated and conflicting type registration 2017-02-27 21:58:21 +01:00
types.go Update docs and client 2017-03-09 07:34:56 +00:00
unstructured_test.go Unified unstructured converter interface and setup 2017-02-17 21:07:04 +01:00
zz_generated.deepcopy.go Addition of ScaleIO Kubernetes Volume Plugin 2017-03-03 15:47:19 -05:00