proper handle OwnerReference for manually created job (#2772)

mine
Jayson Wang 2024-07-07 22:32:59 +08:00 committed by GitHub
parent 8713fba02a
commit 350439b985
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -81,6 +81,7 @@ func (c *CronJob) Run(path string) error {
APIVersion: c.gvr.GV().String(),
Kind: "CronJob",
BlockOwnerDeletion: &true,
Controller: &true,
Name: cj.Name,
UID: cj.UID,
},