mirror of https://github.com/k3s-io/k3s
DaemonSet: Always set BlockOwnerDeletion in ControllerRef.
parent
ab5a82d6e6
commit
97c363a3e0
|
@ -976,13 +976,15 @@ func Predicates(pod *v1.Pod, nodeInfo *schedulercache.NodeInfo) (bool, []algorit
|
||||||
|
|
||||||
// newControllerRef creates a ControllerRef pointing to the given DaemonSet.
|
// newControllerRef creates a ControllerRef pointing to the given DaemonSet.
|
||||||
func newControllerRef(ds *extensions.DaemonSet) *metav1.OwnerReference {
|
func newControllerRef(ds *extensions.DaemonSet) *metav1.OwnerReference {
|
||||||
|
blockOwnerDeletion := true
|
||||||
isController := true
|
isController := true
|
||||||
return &metav1.OwnerReference{
|
return &metav1.OwnerReference{
|
||||||
APIVersion: controllerKind.GroupVersion().String(),
|
APIVersion: controllerKind.GroupVersion().String(),
|
||||||
Kind: controllerKind.Kind,
|
Kind: controllerKind.Kind,
|
||||||
Name: ds.Name,
|
Name: ds.Name,
|
||||||
UID: ds.UID,
|
UID: ds.UID,
|
||||||
Controller: &isController,
|
BlockOwnerDeletion: &blockOwnerDeletion,
|
||||||
|
Controller: &isController,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue