fix: also stop k8s cron tasks when calling ps:stop

This commit is contained in:
Jose Diaz-Gonzalez committed 2025-06-10 21:45:08 -04:00
1 parent 7b0d3b14bc
commit 2dea993804
2 files changed
+38

No files matched your search

+9
View File
@@ -1499,5 +1499,14 @@ func TriggerSchedulerStop(scheduler string, appName string) error {
}
}
// get all cronjobs for the app
err = clientset.SuspendCronJobs(ctx, SuspendCronJobsInput{
Namespace: namespace,
LabelSelector: fmt.Sprintf("app.kubernetes.io/part-of=%s", appName),
})
if err != nil {
return fmt.Errorf("Error suspending cron jobs: %w", err)
}
return nil
}