mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 03:11:40 +00:00
prevent pods/status from touching ownerreferences
This commit is contained in:
parent
5a1ec9bf6f
commit
b630e44dee
@ -153,6 +153,10 @@ func (podStatusStrategy) PrepareForUpdate(ctx genericapirequest.Context, obj, ol
|
||||
oldPod := old.(*api.Pod)
|
||||
newPod.Spec = oldPod.Spec
|
||||
newPod.DeletionTimestamp = nil
|
||||
|
||||
// don't allow the pods/status endpoint to touch owner references since old kubelets corrupt them in a way
|
||||
// that breaks garbage collection
|
||||
newPod.OwnerReferences = oldPod.OwnerReferences
|
||||
}
|
||||
|
||||
func (podStatusStrategy) ValidateUpdate(ctx genericapirequest.Context, obj, old runtime.Object) field.ErrorList {
|
||||
|
Loading…
Reference in New Issue
Block a user