proper handle OwnerReference for manually created job (#2772)
parent
8713fba02a
commit
350439b985
|
|
@ -81,6 +81,7 @@ func (c *CronJob) Run(path string) error {
|
||||||
APIVersion: c.gvr.GV().String(),
|
APIVersion: c.gvr.GV().String(),
|
||||||
Kind: "CronJob",
|
Kind: "CronJob",
|
||||||
BlockOwnerDeletion: &true,
|
BlockOwnerDeletion: &true,
|
||||||
|
Controller: &true,
|
||||||
Name: cj.Name,
|
Name: cj.Name,
|
||||||
UID: cj.UID,
|
UID: cj.UID,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue