func (f *Framework) DeleteStatefulSet(name, namespace string) error {
	return f.KubeClient.AppsV1().StatefulSets(namespace).Delete(context.TODO(), name, metav1.DeleteOptions{})
}
DeleteStatefulSet deletes the specified StatefulSet.
package framework
import (
	"context"
	"fmt"
	"time"
	v1 "k8s.io/api/apps/v1"
	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) LoadStatefulSetManifest(pathToManifest string) (*v1.StatefulSet, error) {
	manifest, err := openFile(pathToManifest)
	if err != nil {
		return nil, fmt.Errorf("Unable to open file %q: %v", pathToManifest, err)
	}
	statefulset := v1.StatefulSet{}
	if err := yaml.NewYAMLOrJSONDecoder(manifest, 100).Decode(&statefulset); err != nil {
		return nil, fmt.Errorf("Unable to decode file %q: %v", pathToManifest, err)
	}
	return &statefulset, nil
}
func (f *Framework) CreateStatefulSet(namespace string, statefulset *v1.StatefulSet) error {
	if _, err := f.KubeClient.AppsV1().StatefulSets(namespace).Create(context.TODO(), statefulset, metav1.CreateOptions{}); err != nil {
		return err
	}
	if err := f.WaitForStatefulSet(statefulset.Name, namespace, time.Minute); err != nil {
		return err
	}
	f.WaitForStatefulSetPods(statefulset.Name, namespace, time.Second*45)
	return nil
}
func (f *Framework) GetStatefulSet(name, namespace string) (*v1.StatefulSet, error) {
	return f.KubeClient.AppsV1().StatefulSets(namespace).Get(context.TODO(), name, metav1.GetOptions{})
}