diff --git a/cmd/checkpoint/README.md b/cmd/checkpoint/README.md index 46b0c44f9..d86e0ae9a 100644 --- a/cmd/checkpoint/README.md +++ b/cmd/checkpoint/README.md @@ -17,7 +17,7 @@ This is accomplished by managing checkpoints as static pod manifests: ## Use Any pod which contains the `checkpointer.alpha.coreos.com/checkpoint=true` annotation will be considered a viable "parent pod" which should be checkpointed. -The parent pod cannot itself be a static pod, and is not a checkpoint itself. +The parent pod cannot itself be a static pod, and is not a checkpoint itself. Affinity is not supported for a pod, and any pod labelled with the checkpoint annotation will be checkpointed. Checkpoints are denoted by the `checkpointer.alpha.coreos.com/checkpoint-of` annotation. This annotation will point to the parent of this checkpoint by pod name. diff --git a/pkg/checkpoint/pod.go b/pkg/checkpoint/pod.go index 164323a01..28678107c 100644 --- a/pkg/checkpoint/pod.go +++ b/pkg/checkpoint/pod.go @@ -63,6 +63,9 @@ func sanitizeCheckpointPod(cp *v1.Pod) *v1.Pod { cp.Spec.ServiceAccountName = "" cp.Spec.DeprecatedServiceAccount = "" + // Remove affinity + cp.Spec.Affinity = nil + // Sanitize the volumes for i := range cp.Spec.Volumes { v := &cp.Spec.Volumes[i]