Skip to content

Commit

Permalink
Changed deleteing propagation type when deleteing a failed job
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-tyk committed Aug 30, 2022
1 parent 269757f commit 2121952
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion predelete/predelete.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ func PreDeleteBootstrappingJobs(clientset *kubernetes.Clientset) error {
found := false
for _, value := range jobs.Items {
if value.Name == os.Getenv("BOOTSTRAP_JOB_NAME") {
deletePropagationType := metav1.DeletePropagationBackground
err = clientset.BatchV1().Jobs(data.AppConfig.TykPodNamespace).
Delete(context.TODO(), value.Name, metav1.DeleteOptions{})
Delete(context.TODO(), value.Name, metav1.DeleteOptions{PropagationPolicy: &deletePropagationType})
if err != nil {
return err
}
Expand Down

0 comments on commit 2121952

Please sign in to comment.