Documentation
¶
Index ¶
- Constants
- func GenerateToken(name string, cost int) string
- type Controller
- func (c *Controller) BuildHeadlessService(cc *cassandrav1.CassandraCluster) *v1.Service
- func (c *Controller) BuildStatefulSet(cc *cassandrav1.CassandraCluster) *v1.StatefulSet
- func (c *Controller) CreateOrUpdateService(cc *cassandrav1.CassandraCluster) error
- func (c *Controller) CreateOrUpdateStatefulSet(cc *cassandrav1.CassandraCluster) (bool, error)
- func (c *Controller) DeletePVC(name string) error
- func (c *Controller) DeleteService(svcName string) error
- func (c *Controller) DeleteStatefulSet(stsName string) error
- func (c *Controller) ExecCmd(podName string, cmd []string) (string, string, error)
- func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error
- func (c *Controller) WaitForStatefulSet(sts *v1.StatefulSet) error
Constants ¶
View Source
const ( // SuccessSynced is used as part of the Event 'reason' when a CassandraCluster is synced SuccessSynced = "Synced" // ErrResourceExists is used as part of the Event 'reason' when a CassandraCluster 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 CassandraCluster" // MessageResourceSynced is the message used for an Event fired when a CassandraCluster // is synced successfully MessageResourceSynced = "CassandraCluster synced successfully" )
Variables ¶
This section is empty.
Functions ¶
func GenerateToken ¶
GenerateToken returns a unique token based on the provided string
Types ¶
type Controller ¶
type Controller struct { CassandraClustersLister listers.CassandraClusterLister CassandraClustersSynced cache.InformerSynced // contains filtered or unexported fields }
Controller is the controller implementation for CassandraCluster resources
func NewController ¶
func NewController( config *rest.Config, kubeClientset kubernetes.Interface, namespace string, cassandraClusterClientset clientset.Interface, kubeInformerFactory kubeinformers.SharedInformerFactory, cassandraClusterInformerFactory informers.SharedInformerFactory) *Controller
NewController returns a new cassandraCluster controller
func (*Controller) BuildHeadlessService ¶
func (c *Controller) BuildHeadlessService(cc *cassandrav1.CassandraCluster) *v1.Service
func (*Controller) BuildStatefulSet ¶
func (c *Controller) BuildStatefulSet(cc *cassandrav1.CassandraCluster) *v1.StatefulSet
func (*Controller) CreateOrUpdateService ¶
func (c *Controller) CreateOrUpdateService(cc *cassandrav1.CassandraCluster) error
func (*Controller) CreateOrUpdateStatefulSet ¶
func (c *Controller) CreateOrUpdateStatefulSet(cc *cassandrav1.CassandraCluster) (bool, error)
func (*Controller) DeletePVC ¶
func (c *Controller) DeletePVC(name string) error
func (*Controller) DeleteService ¶
func (c *Controller) DeleteService(svcName string) error
func (*Controller) DeleteStatefulSet ¶
func (c *Controller) DeleteStatefulSet(stsName string) error
func (*Controller) Run ¶
func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error
Run will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.
func (*Controller) WaitForStatefulSet ¶
func (c *Controller) WaitForStatefulSet(sts *v1.StatefulSet) error
query API server until the stateful set is completely deployed (use an exponential back off and a timeout)
Click to show internal directories.
Click to hide internal directories.