shardgroup

package
v0.0.0-...-432d548 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

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

func InitFlags

func InitFlags(flagset *pflag.FlagSet)

InitFlags is for explicitly initializing the flags.

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL