func NewDefaultStatefulSetControl(
	client client.Client,
	podControl StatefulPodControlInterface,
	statusUpdater StatusUpdaterInterface,
	controllerHistory history.Interface,
	recorder record.EventRecorder,
	log logr.Logger,
) ControlInterface {
	return &defaultStatefulSetControl{client, podControl, statusUpdater, controllerHistory, recorder, log}
}
NewDefaultStatefulSetControl returns a new instance of the default implementation ControlInterface that
implements the documented semantics for StatefulSets. podControl is the PodControlInterface used to create, update,
and delete Pods and to create PersistentVolumeClaims. statusUpdater is the StatusUpdaterInterface used
to update the status of StatefulSets. You should use an instance returned from NewRealStatefulPodControl() for any
scenario other than testing.
package controllers
import (
	"fmt"
	"github.com/go-logr/logr"
	nuwav1 "github.com/yametech/nuwa/api/v1"
	apps "k8s.io/api/apps/v1"
	v1 "k8s.io/api/core/v1"
	"k8s.io/apimachinery/pkg/api/errors"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	intstrutil "k8s.io/apimachinery/pkg/util/intstr"
	"k8s.io/client-go/tools/record"
	"k8s.io/kubernetes/pkg/controller/history"
	"math"
	"sigs.k8s.io/controller-runtime/pkg/client"
	"sort"
)
type ControlInterface interface {
	UpdateStatefulSet(set *nuwav1.StatefulSet, pods []*v1.Pod) error
	ListRevisions(set *nuwav1.StatefulSet) ([]*apps.ControllerRevision, error)
	AdoptOrphanRevisions(set *nuwav1.StatefulSet, revisions []*apps.ControllerRevision) error
}