kubernetes/pkg/apis/core
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
..
fuzzer generated 2017-11-22 18:40:09 +00:00
helper Merge pull request #54379 from tanshanshan/apisever-validate-hugepages 2017-12-18 14:45:37 -08:00
install Update generated files 2017-11-09 12:14:08 +01:00
pods Validate key subscript for metadata.annotations and metadata.labels separately 2017-11-22 15:50:40 -08:00
v1 Merge pull request #54379 from tanshanshan/apisever-validate-hugepages 2017-12-18 14:45:37 -08:00
validation Merge pull request #54530 from sjenning/validate-state-transition 2017-12-18 17:45:43 -08:00
annotation_key_constants.go Addition of bootstrap checkpointing 2017-11-20 21:54:15 -06:00
BUILD Merge pull request #54604 from stewart-yu/issues#10 2017-12-13 22:25:50 -08:00
doc.go deepcopy: remove deepcopy register tags 2017-11-10 18:25:26 +01:00
field_constants.go Add new Events API group 2017-11-22 18:40:09 +00:00
json.go pkg/apis/core: fixup package names 2017-11-09 12:14:07 +01:00
objectreference.go pkg/apis/core: fixup package names 2017-11-09 12:14:07 +01:00
OWNERS Move core api to pkg/apis/core 2017-11-09 12:08:42 +01:00
register.go pkg/apis/core: fixup package names 2017-11-09 12:14:07 +01:00
resource.go pkg/apis/core: fixup package names 2017-11-09 12:14:07 +01:00
taint.go pkg/apis/core: fixup package names 2017-11-09 12:14:07 +01:00
taint_test.go pkg/apis/core: fixup package names 2017-11-09 12:14:07 +01:00
toleration.go pkg/apis/core: fixup package names 2017-11-09 12:14:07 +01:00
toleration_test.go add UT for apk/apis/core/toleration.go 2017-11-15 09:44:27 +08:00
types.go Merge pull request #56460 from liggitt/flex-pv-secret 2017-12-15 16:43:55 -08:00
zz_generated.deepcopy.go Generated files 2017-12-15 00:29:38 -05:00