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.
|
||||
func newControllerRef(ds *extensions.DaemonSet) *metav1.OwnerReference {
|
||||
blockOwnerDeletion := true
|
||||
isController := true
|
||||
return &metav1.OwnerReference{
|
||||
APIVersion: controllerKind.GroupVersion().String(),
|
||||
Kind: controllerKind.Kind,
|
||||
Name: ds.Name,
|
||||
UID: ds.UID,
|
||||
Controller: &isController,
|
||||
APIVersion: controllerKind.GroupVersion().String(),
|
||||
Kind: controllerKind.Kind,
|
||||
Name: ds.Name,
|
||||
UID: ds.UID,
|
||||
BlockOwnerDeletion: &blockOwnerDeletion,
|
||||
Controller: &isController,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue