- func CheckForCStorPool()
- func CheckForCStorPoolCRD(clientset clientset.Interface)
- func CheckForCStorVolumeReplicaCRD(clientset clientset.Interface)
- func CheckForInitialImportedPoolVol(InitialImportedPoolVol string, fullvolname string) bool
- func CheckIfPresent(arrStr string, searchStr string) bool
- func Init()
- func PoolNameHandler(cVR *apis.CStorVolumeReplica, cnt int) bool
- type Environment
- type EventReason
- type QueueLoad
- type QueueOperation
- type SyncCStorPoolCVR
const ( // CRDRetryInterval is used if CRD is not present. CRDRetryInterval = 10 * time.Second // PoolNameHandlerInterval is used when expected pool is not present. PoolNameHandlerInterval = 5 * time.Second SharedInformerInterval = 30 * time.Second // ResourceWorkerInterval is used for resource sync. ResourceWorkerInterval = time.Second // InitialZreplRetryInterval is used while initially starting controller. InitialZreplRetryInterval = 3 * time.Second // ContinuousZreplRetryInterval is used while controller has started running. ContinuousZreplRetryInterval = 1 * time.Second )
Periodic interval duration.
Different types of k8s namespaces.
InitialImportedPoolVol is to store pool-volume names while pod restart.
func CheckForCStorPool ¶
CheckForCStorPool tries to get pool name and blocks forever because volumereplica can be created only if pool is present.
func CheckForCStorPoolCRD ¶
CheckForCStorPoolCRD is Blocking call for checking status of CStorPool CRD.
CheckForCStorVolumeReplicaCRD is Blocking call for checking status of CStorVolumeReplica CRD.
CheckForInitialImportedPoolVol is to check if volume is already imported with pool.
func CheckIfPresent ¶
CheckIfPresent is to check if search string is present in array of string.
Init is to instantiate variable used between pool and volumereplica while starting controller.
type Environment ¶
type Environment string
Environment is for environment variables passed for cstor-pool-mgmt.
const ( // OpenEBSIOCStorID is the environment variable specified in pod. OpenEBSIOCStorID Environment = "OPENEBS_IO_CSTOR_ID" // OpenEBSIOCSPIID is cstorpoolinstance name as environment variable // specified in pool instance pods. OpenEBSIOCSPIID Environment = "OPENEBS_IO_CSPI_ID" // OpenEBSIOPoolName is cstorpoolcluster name as environment variable // specified in pod instance pods. OpenEBSIOPoolName Environment = "OPENEBS_IO_POOL_NAME" // RebuildEstimates is the feature gate environment variable to estimate // rebuild time for replica which is undergoing rebuild. RebuildEstimates Environment = "REBUILD_ESTIMATES" )
type EventReason ¶
type EventReason string
EventReason is used as part of the Event reason when a resource goes through different phases
const ( // ToDo: Improve the messages and event reason. ( Put these in a similar k8s style) // SuccessSynced is used as part of the Event 'reason' when a resource is synced. SuccessSynced EventReason = "Synced" // FailedSynced is used as part of the Event 'reason' when resource sync fails. FailedSynced EventReason = "FailedSync" // MessageCreateSynced holds message for corresponding create request sync. MessageCreateSynced EventReason = "Received Resource create event" // MessageModifySynced holds message for corresponding modify request sync. MessageModifySynced EventReason = "Received Resource modify event" // MessageDestroySynced holds message for corresponding destroy request sync. MessageDestroySynced EventReason = "Received Resource destroy event" // StatusSynced holds message for corresponding status request sync. StatusSynced EventReason = "Resource status sync event" // SuccessCreated holds status for corresponding created resource. SuccessCreated EventReason = "Created" // MessageResourceCreated holds message for corresponding created resource. MessageResourceCreated EventReason = "Resource created successfully" // FailureCreate holds status for corresponding failed create resource. FailureCreate EventReason = "FailCreate" // MessageResourceFailCreate holds message for corresponding failed create resource. MessageResourceFailCreate EventReason = "Resource creation failed" // SuccessImported holds status for corresponding imported resource. SuccessImported EventReason = "Imported" // FailureImported holds status for corresponding imported resource. FailureImported EventReason = "Import failure" // FailureImportOperations holds status for corresponding imported resource. FailureImportOperations EventReason = "Failure Import operations" // MessageResourceImported holds message for corresponding imported resource. MessageResourceImported EventReason = "Resource imported successfully" // FailureStatusSync holds status for corresponding failed status sync of resource. FailureStatusSync EventReason = "FailStatusSync" // FailureCapacitySync holds status for corresponding failed capacity sync of resource. FailureCapacitySync EventReason = "FailCapacitySync" // MessageResourceFailStatusSync holds message for corresponding failed status sync of resource. MessageResourceFailStatusSync EventReason = "Resource status sync failed" // MessageResourceFailCapacitySync holds message for corresponding failed capacity sync of resource. MessageResourceFailCapacitySync EventReason = "Resource capacity sync failed" // MessageResourceSyncSuccess holds message for corresponding successful sync of resource. MessageResourceSyncSuccess EventReason = "Resource successfully synced" // MessageResourceSyncFailure holds message for corresponding failed sync of resource. MessageResourceSyncFailure EventReason = "Resource sync failed:" // FailureDestroy holds status for corresponding failed destroy resource. FailureDestroy EventReason = "FailDestroy" // FailureRemoveFinalizer holds the status when // the resource's finalizers could not be removed FailureRemoveFinalizer EventReason = "FailRemoveFinalizer" // MessageResourceFailDestroy holds descriptive message for // resource could not be deleted MessageResourceFailDestroy EventReason = "Resource Destroy failed" // FailureValidate holds status for corresponding failed validate resource. FailureValidate EventReason = "FailValidate" // MessageResourceFailValidate holds message for corresponding failed validate resource. MessageResourceFailValidate EventReason = "Resource validation failed" // AlreadyPresent holds status for corresponding already present resource. AlreadyPresent EventReason = "AlreadyPresent" // MessageResourceAlreadyPresent holds message for corresponding already present resource. MessageResourceAlreadyPresent EventReason = "Resource already present" // MessageImproperPoolStatus holds message for corresponding failed validate resource. MessageImproperPoolStatus EventReason = "Improper pool status" // PoolROThreshold holds status for pool read only state PoolROThreshold EventReason = "PoolReadOnlyThreshold" // MessagePoolROThreshold holds descriptive message for PoolROThreshold MessagePoolROThreshold EventReason = "Pool storage limit reached to threshold. Pool expansion is required to make it's replica RW" )
QueueLoad represents the payload of the workqueue
It stores the key and corresponding type of operation
type QueueOperation ¶
type QueueOperation string
QueueOperation determines the type of operation that needs to be executed on the watched resource
type SyncCStorPoolCVR ¶
SyncCStorPoolCVR is to hold synchronization related variables.
var SyncResources SyncCStorPoolCVR
SyncResources is to synchronize pool and volumereplica.