Documentation ¶
Index ¶
- Constants
- func ErrorWrapf(err error, format string, args ...interface{}) error
- func IsEmpty(s string) bool
- func IsReconcileDisabled(cspi *cstor.CStorPoolInstance) bool
- func IsRightCStorPoolInstanceMgmt(cspi *cstor.CStorPoolInstance) bool
- func IsStatusChange(oldStatus, newStatus cstor.CStorPoolInstanceStatus) bool
- type CStorPoolInstanceController
- func (c *CStorPoolInstanceController) Run(threadiness int, stopCh <-chan struct{}) error
- func (c *CStorPoolInstanceController) UpdateStatusCondition(cspi *cstor.CStorPoolInstance, condition cstor.CStorPoolInstanceCondition) (*cstor.CStorPoolInstance, error)
- func (c *CStorPoolInstanceController) UpdateStatusConditionEventually(cspi *cstor.CStorPoolInstance, condition cstor.CStorPoolInstanceCondition) (*cstor.CStorPoolInstance, error)
Constants ¶
const ( // PoolPrefix is prefix for pool name PoolPrefix string = "cstor-" // OpenEBSIOCSPIID is the environment variable specified in pod. // It holds the UID of the CSPI OpenEBSIOCSPIID string = "OPENEBS_IO_CSPI_ID" )
Variables ¶
This section is empty.
Functions ¶
func ErrorWrapf ¶
ErrorWrapf wrap error If given err is nil then it will return new error
func IsReconcileDisabled ¶
func IsReconcileDisabled(cspi *cstor.CStorPoolInstance) bool
IsReconcileDisabled check if reconciliation is disabled for given object or not
func IsRightCStorPoolInstanceMgmt ¶
func IsRightCStorPoolInstanceMgmt(cspi *cstor.CStorPoolInstance) bool
IsRightCStorPoolInstanceMgmt is to check if the pool request is for this pod.
func IsStatusChange ¶
func IsStatusChange(oldStatus, newStatus cstor.CStorPoolInstanceStatus) bool
IsStatusChange is to check only status change of cStorPoolInstance object.
Types ¶
type CStorPoolInstanceController ¶
type CStorPoolInstanceController struct {
// contains filtered or unexported fields
}
CStorPoolInstanceController is the controller implementation for CStorPoolInstance resources.
func NewCStorPoolInstanceController ¶
func NewCStorPoolInstanceController( kubeclientset kubernetes.Interface, clientset clientset.Interface, kubeInformerFactory kubeinformers.SharedInformerFactory, cStorInformerFactory informers.SharedInformerFactory) *CStorPoolInstanceController
NewCStorPoolInstanceController returns a new instance of CStorPoolInstance controller
func (*CStorPoolInstanceController) Run ¶
func (c *CStorPoolInstanceController) 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 (*CStorPoolInstanceController) UpdateStatusCondition ¶
func (c *CStorPoolInstanceController) UpdateStatusCondition( cspi *cstor.CStorPoolInstance, condition cstor.CStorPoolInstanceCondition) (*cstor.CStorPoolInstance, error)
func (*CStorPoolInstanceController) UpdateStatusConditionEventually ¶
func (c *CStorPoolInstanceController) UpdateStatusConditionEventually( cspi *cstor.CStorPoolInstance, condition cstor.CStorPoolInstanceCondition) (*cstor.CStorPoolInstance, error)
UpdateStatusConditionEventually updates the CSPI in etcd with provided condition. Below function retries for three times to update the CSPI with provided conditions