app

package
Version: v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2020 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NumThreads defines number of worker threads for resource watcher.
	NumThreads = 1
	// NumRoutinesThatFollow is for handling golang waitgroups.
	NumRoutinesThatFollow = 1
)
View Source
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

func ErrorWrapf(err error, format string, args ...interface{}) error

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 IsEmpty

func IsEmpty(s string) bool

IsEmpty check if string is empty or not

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

func Start

func Start() error

Start starts the cspi-mgmt controller.

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.

Jump to

Keyboard shortcuts

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