-
Notifications
You must be signed in to change notification settings - Fork 224
checkpointer: ignore Affinity within podspec #1004
checkpointer: ignore Affinity within podspec #1004
Conversation
Kubernetes 1.12.x introduced new logic for Affinity [1]. In addition to new logic, the Pod contains a default affinity. The new default affinity gets serialized into the checkpoint file, and the 1.12.x kubelet does not restore the pod due to the affinity. This PR removes the affinity from the spec and documents that affinity's are not supported. ``` "affinity": { "nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { "nodeSelectorTerms": [ { "matchExpressions": null } ] } } }, ``` [1] kubernetes/kubernetes#68173 [2] https://github.com/kubernetes/kubernetes/blob/e39b510726113581c6f6a9c2db1753d794aa9cce/pkg/controller/daemon/util/daemonset_util.go#L183-L196
@rphillips: GitHub didn't allow me to request PR reviews from the following users: dghubble. Note that only kubernetes-incubator members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: If they are not already assigned, you can assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This looks fine to me - but don't want to lgtm until we have tests hooked up (Also would be good to get prow to respect the tests passing or not so an lgtm doesn't auto merge something that didn't pass - see: #1000 (comment)) |
I tested this out by building a pod-checkpointer image and using it as the checkpointer in a v1.12.1 cluster. It solves this issue for me. In steady-state, there are two pod-checkpoint pods running like before (one from DaemonSet, one from checkpointed pod) and power cycling the cluster is tolerated. Thanks! 🙌 |
I'm working on the builders today to get PR testing working again. |
coreosbot run e2e |
coreosbot run e2e calico |
1 similar comment
coreosbot run e2e calico |
closing in favor of a PR with tests. #1007 |
Kubernetes 1.12.x introduced new logic for Affinity [1]. In addition to
new logic, the Pod contains a default affinity. The new default affinity
gets serialized into the checkpoint file, and the 1.12.x kubelet does
not restore the pod due to the affinity.
This PR removes the affinity from the spec and documents that affinity's
are not supported.
/cc @aaronlevy @dghubble
/fixes #1001
[1] kubernetes/kubernetes#68173
[2] https://github.com/kubernetes/kubernetes/blob/e39b510726113581c6f6a9c2db1753d794aa9cce/pkg/controller/daemon/util/daemonset_util.go#L183-L196