Commit 97c363a3 authored by Anthony Yeh's avatar Anthony Yeh

DaemonSet: Always set BlockOwnerDeletion in ControllerRef.

parent ab5a82d6
...@@ -976,13 +976,15 @@ func Predicates(pod *v1.Pod, nodeInfo *schedulercache.NodeInfo) (bool, []algorit ...@@ -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,
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment