From 62f615f07dacdf00d45cd3aac70e5857fbe82f8d Mon Sep 17 00:00:00 2001 From: jayson Date: Tue, 2 Jul 2024 13:43:31 +0800 Subject: [PATCH] proper handle OwnerReference for manually created job --- internal/dao/cronjob.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/dao/cronjob.go b/internal/dao/cronjob.go index b02b95759e..3153349571 100644 --- a/internal/dao/cronjob.go +++ b/internal/dao/cronjob.go @@ -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, },