func (c *StashController) EnsureBackupTriggeringCronJobDeleted(invoker apis.Invoker) error {
	cur, err := c.kubeClient.BatchV1beta1().CronJobs(invoker.ObjectMeta.Namespace).Get(getBackupCronJobName(invoker.ObjectMeta.Name), metav1.GetOptions{})
	if err != nil {
		if kerr.IsNotFound(err) {
			return nil
		}
		return err
	}
	_, _, err = batch_util.PatchCronJob(c.kubeClient, cur, func(in *batch_v1beta1.CronJob) *batch_v1beta1.CronJob {
		core_util.EnsureOwnerReference(&in.ObjectMeta, invoker.OwnerRef)
		return in
	})
	return err
}
// EnsureBackupTriggeringCronJobDeleted ensure that the CronJob of the respective backup invoker has it as owner.
// Kuebernetes garbage collector will take care of removing the CronJob
EnsureBackupTriggeringCronJobDeleted ensure that the CronJob of the respective backup invoker has it as owner.
Kuebernetes garbage collector will take care of removing the CronJob
// EnsureBackupTriggeringCronJobDeleted ensure that the CronJob of the respective backup invoker has it as owner . // Kuebernetes garbage collector will take care of removing the CronJob
func (c *StashController) EnsureBackupTriggeringCronJobDeleted(invoker apis.Invoker) error {
	cur, err := c.kubeClient.BatchV1beta1().CronJobs(invoker.ObjectMeta.Namespace).Get(getBackupCronJobName(invoker.ObjectMeta.Name), metav1.GetOptions{})
	if err != nil {
		if kerr.IsNotFound(err) {
			return nil
		}
		return err
	}
	_, _, err = batch_util.PatchCronJob(c.kubeClient, cur, func(in *batch_v1beta1.CronJob) *batch_v1beta1.CronJob {
		core_util.EnsureOwnerReference(&in.ObjectMeta, invoker.OwnerRef)
		return in
	})
	return err
}
func ( c * StashController ) EnsureBackupTriggeringCronJobDeleted ( invoker apis . Invoker ) error { cur , err := c . kubeClient . BatchV1beta1 ( ) . CronJobs ( invoker . ObjectMeta . Namespace ) . Get ( getBackupCronJobName ( invoker . ObjectMeta . Name ) , metav1 . GetOptions { } ) if err != nil { if kerr . IsNotFound ( err ) { return nil } return err } _ , _ , err = batch_util . PatchCronJob ( c . kubeClient , cur , func ( in * batch_v1beta1 . CronJob ) * batch_v1beta1 . CronJob { core_util . EnsureOwnerReference ( & in . ObjectMeta , invoker . OwnerRef ) return in } ) return err }
EnsureBackupTriggeringCronJobDeleted ensure that the CronJob of the respective backup invoker has it as owner.
EnsureBackupTriggeringCronJobDeleted ensure that the CronJob of the respective backup invoker has it as owner .