Documentation ¶
Index ¶
- Constants
- func ErrorWrapf(err error, format string, args ...interface{}) error
- func IsDeletionFailedBefore(cspi *apis.CStorPoolInstance) bool
- func IsDestroyed(cspi *apis.CStorPoolInstance) bool
- func IsEmpty(s string) bool
- func IsEmptyStatus(cspi *apis.CStorPoolInstance) bool
- func IsErrorDuplicate(cspi *apis.CStorPoolInstance) bool
- func IsHostNameChanged(ocspi, ncspi *apis.CStorPoolInstance) bool
- func IsOnlyStatusChange(ocspi, ncspi *apis.CStorPoolInstance) bool
- func IsPendingStatus(cspi *apis.CStorPoolInstance) bool
- func IsReconcileDisabled(cspi *apis.CStorPoolInstance) bool
- func IsRightCStorPoolInstanceMgmt(cspi *apis.CStorPoolInstance) bool
- func IsStatusChange(oldStatus, newStatus apis.CStorPoolStatus) bool
- func IsSyncEvent(ocspi, ncspi *apis.CStorPoolInstance) bool
- func IsUIDSet(cspi *apis.CStorPoolInstance) bool
- func PoolName(cspi *apis.CStorPoolInstance) string
- func Start() error
- type CStorPoolInstanceController
Constants ¶
const ( // NumThreads defines number of worker threads for resource watcher. NumThreads = 1 // NumRoutinesThatFollow is for handling golang waitgroups. NumRoutinesThatFollow = 1 )
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 IsDeletionFailedBefore ¶
func IsDeletionFailedBefore(cspi *apis.CStorPoolInstance) bool
IsDeletionFailedBefore is to make sure no other operation should happen if the status of cStorPoolInstance is deletion-failed.
func IsDestroyed ¶
func IsDestroyed(cspi *apis.CStorPoolInstance) bool
IsDestroyed is to check if the call is for cStorPoolInstance destroy.
func IsEmptyStatus ¶
func IsEmptyStatus(cspi *apis.CStorPoolInstance) bool
IsEmptyStatus is to check if the status of cStorPoolInstance object is empty.
func IsErrorDuplicate ¶
func IsErrorDuplicate(cspi *apis.CStorPoolInstance) bool
IsErrorDuplicate is to check if the status of cStorPoolInstance object is error-duplicate.
func IsHostNameChanged ¶
func IsHostNameChanged(ocspi, ncspi *apis.CStorPoolInstance) bool
IsHostNameChanged check if hostname for CSPI object is changed
func IsOnlyStatusChange ¶
func IsOnlyStatusChange(ocspi, ncspi *apis.CStorPoolInstance) bool
IsOnlyStatusChange is to check only status change of cStorPoolInstance object.
func IsPendingStatus ¶
func IsPendingStatus(cspi *apis.CStorPoolInstance) bool
IsPendingStatus is to check if the status of cStorPoolInstance object is pending.
func IsReconcileDisabled ¶
func IsReconcileDisabled(cspi *apis.CStorPoolInstance) bool
IsReconcileDisabled check if reconciliation is disabled for given object or not
func IsRightCStorPoolInstanceMgmt ¶
func IsRightCStorPoolInstanceMgmt(cspi *apis.CStorPoolInstance) bool
IsRightCStorPoolInstanceMgmt is to check if the pool request is for this pod.
func IsStatusChange ¶
func IsStatusChange(oldStatus, newStatus apis.CStorPoolStatus) bool
IsStatusChange is to check only status change of cStorPoolInstance object.
func IsSyncEvent ¶
func IsSyncEvent(ocspi, ncspi *apis.CStorPoolInstance) bool
IsSyncEvent is to check if ResourceVersion of cStorPoolInstance object is not modifed.
func IsUIDSet ¶
func IsUIDSet(cspi *apis.CStorPoolInstance) bool
IsUIDSet check if UID is set or not
func PoolName ¶
func PoolName(cspi *apis.CStorPoolInstance) string
PoolName return pool name for given CSPI 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.