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

	if set.DeletionTimestamp != nil {
		// on a restart of the controller manager, it's possible a new statefulset shows up in a state that
		// is already pending deletion. Prevent the statefulset from being a creation observation.
		tcc.deleteStatefulSet(set)
		return
	}

	// If it has a ControllerRef, that's all that matters.
	tc := tcc.resolveTikvClusterFromSet(ns, set)
	if tc == nil {
		return
	}
	klog.V(4).Infof("StatefuSet %s/%s created, TikvCluster: %s/%s", ns, setName, ns, tc.Name)
	tcc.enqueueTikvCluster(tc)
}
// addStatefulSet adds the tikvcluster for the statefulset to the sync queue
addStatefulSet adds the tikvcluster for the statefulset to the sync queue
// addStatefulSet adds the tikvcluster for the statefulset to the sync queue
func (tcc *Controller) addStatefulSet(obj interface{}) {
	set := obj.(*apps.StatefulSet)
	ns := set.GetNamespace()
	setName := set.GetName()
	if set.DeletionTimestamp != nil {
		tcc.deleteStatefulSet(set)
		return
	}
	tc := tcc.resolveTikvClusterFromSet(ns, set)
	if tc == nil {
		return
	}
	klog.V(4).Infof("StatefuSet %s/%s created, TikvCluster: %s/%s", ns, setName, ns, tc.Name)
	tcc.enqueueTikvCluster(tc)
}
func ( tcc * Controller ) addStatefulSet ( obj interface { } ) { set := obj . ( * apps . StatefulSet ) ns := set . GetNamespace ( ) setName := set . GetName ( ) if set . DeletionTimestamp != nil { tcc . deleteStatefulSet ( set ) return } tc := tcc . resolveTikvClusterFromSet ( ns , set ) if tc == nil { return } klog . V ( 4 ) . Infof ( " " , ns , setName , ns , tc . Name ) tcc . enqueueTikvCluster ( tc ) }
addStatefulSet adds the tikvcluster for the statefulset to the sync queue
addStatefulSet adds the tikvcluster for the statefulset to the sync queue
// on a restart of the controller manager, it's possible a new statefulset shows up in a state that // is already pending deletion. Prevent the statefulset from being a creation observation. // If it has a ControllerRef, that's all that matters.