Documentation ¶
Index ¶
Constants ¶
View Source
const ( // SuccessSynced is used as part of the Event 'reason' when a ReplicaSet is synced SuccessSynced = "Synced" // ErrResourceExists is used as part of the Event 'reason' when a ReplicaSet fails // to sync due to a Deployment of the same name already existing. ErrResourceExists = "ErrResourceExists" // MessageResourceExists is the message used for Events when a resource // fails to sync due to a Deployment already existing MessageResourceExists = "Resource %q already exists and is not managed by ShardGroup" // MessageResourceSynced is the message used for an Event fired when a ReplicaSet // is synced successfully MessageResourceSynced = "ShardGroup synced successfully" )
Variables ¶
View Source
var (
// DelayProcessDuration is used to delay controller process
DelayProcessSeconds = 10
)
Functions ¶
Types ¶
type Controller ¶
type Controller struct { controller.DefaultController // contains filtered or unexported fields }
Controller is the controller implementation for ReplicaSet resources
func NewController ¶
func NewController( kubeclientset kubernetes.Interface, carbonclientset clientset.Interface, shardGroupInformer informers.ShardGroupInformer, rollingSetInformer informers.RollingSetInformer, workerInformer informers.WorkerNodeInformer) *Controller
NewController returns a new rollingset controller
func (*Controller) DeleteSubObj ¶
func (c *Controller) DeleteSubObj(namespace, key string) error
DeleteSubObj is used for controller to handle gc
func (*Controller) GetObj ¶
func (c *Controller) GetObj(namespace, key string) (interface{}, error)
GetObj for controller manager
func (*Controller) Sync ¶
func (c *Controller) Sync(key string) error
Sync compares the actual state with the desired, and attempts to converge the two. It then updates the spec of the RollingSet resource with the current spec of the resource.
func (*Controller) WaitForCacheSync ¶
func (c *Controller) WaitForCacheSync(stopCh <-chan struct{}) bool
WaitForCacheSync wait informers synced
Click to show internal directories.
Click to hide internal directories.