func (tcc *Controller) deleteStatefulSet(obj interface{}) {
	set, ok := obj.(*apps.StatefulSet)
	ns := set.GetNamespace()
	setName := set.GetName()

	// When a delete is dropped, the relist will notice a statefuset in the store not
	// in the list, leading to the insertion of a tombstone object which contains
	// the deleted key/value.
	if !ok {
		tombstone, ok := obj.(cache.DeletedFinalStateUnknown)
		if !ok {
			utilruntime.HandleError(fmt.Errorf("couldn't get object from tombstone %+v", obj))
			return
		}
		set, ok = tombstone.Obj.(*apps.StatefulSet)
		if !ok {
			utilruntime.HandleError(fmt.Errorf("tombstone contained object that is not a statefuset %+v", obj))
			return
		}
	}

	// If it has a TikvCluster, that's all that matters.
	tc := tcc.resolveTikvClusterFromSet(ns, set)
	if tc == nil {
		return
	}
	klog.V(4).Infof("StatefulSet %s/%s deleted through %v.", ns, setName, utilruntime.GetCaller())
	tcc.enqueueTikvCluster(tc)
}
// deleteStatefulSet enqueues the tikvcluster for the statefulset accounting for deletion tombstones.
deleteStatefulSet enqueues the tikvcluster for the statefulset accounting for deletion tombstones.
// deleteStatefulSet enqueues the tikvcluster for the statefulset accounting for deletion tombstones .
func (tcc *Controller) deleteStatefulSet(obj interface{}) {
	set, ok := obj.(*apps.StatefulSet)
	ns := set.GetNamespace()
	setName := set.GetName()
	if !ok {
		tombstone, ok := obj.(cache.DeletedFinalStateUnknown)
		if !ok {
			utilruntime.HandleError(fmt.Errorf("couldn't get object from tombstone %+v", obj))
			return
		}
		set, ok = tombstone.Obj.(*apps.StatefulSet)
		if !ok {
			utilruntime.HandleError(fmt.Errorf("tombstone contained object that is not a statefuset %+v", obj))
			return
		}
	}
	tc := tcc.resolveTikvClusterFromSet(ns, set)
	if tc == nil {
		return
	}
	klog.V(4).Infof("StatefulSet %s/%s deleted through %v.", ns, setName, utilruntime.GetCaller())
	tcc.enqueueTikvCluster(tc)
}
func ( tcc * Controller ) deleteStatefulSet ( obj interface { } ) { set , ok := obj . ( * apps . StatefulSet ) ns := set . GetNamespace ( ) setName := set . GetName ( ) if ! ok { tombstone , ok := obj . ( cache . DeletedFinalStateUnknown ) if ! ok { utilruntime . HandleError ( fmt . Errorf ( " " , obj ) ) return } set , ok = tombstone . Obj . ( * apps . StatefulSet ) if ! ok { utilruntime . HandleError ( fmt . Errorf ( " " , obj ) ) return } } tc := tcc . resolveTikvClusterFromSet ( ns , set ) if tc == nil { return } klog . V ( 4 ) . Infof ( " " , ns , setName , utilruntime . GetCaller ( ) ) tcc . enqueueTikvCluster ( tc ) }
deleteStatefulSet enqueues the tikvcluster for the statefulset accounting for deletion tombstones.
deleteStatefulSet enqueues the tikvcluster for the statefulset accounting for deletion tombstones .
// When a delete is dropped, the relist will notice a statefuset in the store not // in the list, leading to the insertion of a tombstone object which contains // the deleted key/value. // If it has a TikvCluster, that's all that matters.