func (f *Framework) DeleteCronJob(name, namespace string) error {
	return f.KubeClient.BatchV1().CronJobs(namespace).Delete(context.TODO(), name, metav1.DeleteOptions{})
}
DeleteCronJob deletes the specified Cron Job.
package framework
import (
	"context"
	"fmt"
	"time"
	batchv1beta1 "k8s.io/api/batch/v1beta1"
	corev1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/util/wait"
	"k8s.io/apimachinery/pkg/util/yaml"
)
func (f *Framework) ListCronJobs() (*batchv1beta1.CronJobList, error) {
	opts := f.getHelmReleaseSelectorListOptions()
	return f.KubeClient.BatchV1beta1().CronJobs(corev1.NamespaceAll).List(context.TODO(), opts)
}
func (f *Framework) GetCronJob(name, namespace string) (*batchv1beta1.CronJob, error) {
	return f.KubeClient.BatchV1beta1().CronJobs(namespace).Get(context.TODO(), name, metav1.GetOptions{})
}
func (f *Framework) LoadCronJobManifest(pathToManifest string) (*batchv1beta1.CronJob, error) {
	manifest, err := openFile(pathToManifest)
	if err != nil {
		return nil, fmt.Errorf("Unable to open file %q: %v", pathToManifest, err)
	}
	job := batchv1beta1.CronJob{}
	if err := yaml.NewYAMLOrJSONDecoder(manifest, 100).Decode(&job); err != nil {
		return nil, fmt.Errorf("Unable to decode file %q: %v", pathToManifest, err)
	}
	return &job, nil
}
func (f *Framework) CreateCronJob(namespace string, job *batchv1beta1.CronJob) error {
	if _, err := f.KubeClient.BatchV1beta1().CronJobs(namespace).Create(context.TODO(), job, metav1.CreateOptions{}); err != nil {
		return err
	}
	return f.WaitForCronJob(job.Name, namespace, 2*time.Minute)
}