common

package
v0.0.0-...-a88c85e Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CStorVolume is the controller to be watched
	CStorVolume = "cStorVolume"
	// EventMsgFormatter is the format string for event message generation
	EventMsgFormatter = "Volume is in %s state"
)
View Source
const (
	// CRDRetryInterval is used if CRD is not present.
	CRDRetryInterval = 10 * time.Second
	// ResourceWorkerInterval is used for resource sync.
	ResourceWorkerInterval = time.Second
)
View Source
const (
	DefaultNameSpace namespace = "openebs"
)

Different types of k8s namespaces.

View Source
const DefaultSharedInformerInterval = 30 * time.Second

DefaultSharedInformerInterval is used to sync watcher controller.

Variables

This section is empty.

Functions

func CheckForCStorVolumeCRD

func CheckForCStorVolumeCRD(clientset clientset.Interface)

CheckForCStorVolumeCRD is Blocking call for checking status of CStorVolume CRD.

Types

type CStorVolumeStatus

type CStorVolumeStatus string

CStorVolumeStatus represents the status of a CStorVolume object

const (
	// volume is getting initialized
	CVStatusInit CStorVolumeStatus = "Init"
	// volume allows IOs and snapshot
	CVStatusHealthy CStorVolumeStatus = "Healthy"
	// volume only satisfies consistency factor
	CVStatusDegraded CStorVolumeStatus = "Degraded"
	// Volume is offline
	CVStatusOffline CStorVolumeStatus = "Offline"
	// Error in retrieving volume details
	CVStatusError CStorVolumeStatus = "Error"
	// volume controller config generation failed due to invalid parameters
	CVStatusInvalid CStorVolumeStatus = "Invalid"
	// CR event ignored
	CVStatusIgnore CStorVolumeStatus = "Ignore"
)

Status written onto CStorVolume objects.

type Environment

type Environment string

Environment is for environment variables passed for cstor-volume-mgmt.

const (
	// OpenEBSIOCStorVolumeID is the environment variable specified in pod.
	OpenEBSIOCStorVolumeID Environment = "OPENEBS_IO_CSTOR_VOLUME_ID"
)

type EventReason

type EventReason string

EventReason is used as part of the Event reason when a resource goes through different phases

const (
	// SuccessSynced is used as part of the Event 'reason' when a resource is synced
	SuccessSynced EventReason = "Synced"
	// 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"

	// 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"

	// FailureUpdate holds status for corresponding failed update resource.
	FailureUpdate EventReason = "FailUpdate"

	// SuccessImported holds status for corresponding imported resource.
	SuccessImported EventReason = "Imported"
	// MessageResourceImported holds message for corresponding imported resource.
	MessageResourceImported EventReason = "Resource imported successfully"

	// FailureImport holds status for corresponding failed import resource.
	FailureImport EventReason = "FailImport"
	// MessageResourceFailImport holds message for corresponding failed import resource.
	MessageResourceFailImport EventReason = "Resource import failed"

	// FailureDestroy holds status for corresponding failed destroy resource.
	FailureDestroy EventReason = "FailDestroy"
	// MessageResourceFailDestroy holds message for corresponding failed destroy resource.
	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"

	// SuccessUpdated holds status for corresponding updated resource.
	SuccessUpdated EventReason = "Updated"
	// MessageResourceUpdated holds message for corresponding updated resource.
	MessageResourceUpdated EventReason = "Resource updated successfully"
)

type QueueLoad

type QueueLoad struct {
	Key       string // Key is the name of cstor volume given in metadata name field in the yaml
	Operation QueueOperation
}

QueueLoad is for storing the key and type of operation before entering workqueue

type QueueOperation

type QueueOperation string

QueueOperation represents the type of operation on resource

const (
	QOpAdd          QueueOperation = "add"
	QOpDestroy      QueueOperation = "destroy"
	QOpModify       QueueOperation = "modify"
	QOpPeriodicSync QueueOperation = "sync"
)

Different type of operations on the controller

Jump to

Keyboard shortcuts

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