csireplicator

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ReadyState name of correct state of ReplicationGroup
	ReadyState = "Ready"
	// InvalidState name of invalid state of ReplicationGroup
	InvalidState = "Invalid"
	// ErrorState name of error state of ReplicationGroup
	ErrorState = "Error"
	// NoState empty state of ReplicationGroup
	NoState = ""
	// InProgress name of in progress state of ReplicationGroup
	InProgress = "IN_PROGRESS"
	// DeletingState name deletion state of ReplicationGroup
	DeletingState = "Deleting"
	// Action name of action field
	Action = "Action"
	// MaxRetryDurationForActions maximum amount of time between retries of failed action
	MaxRetryDurationForActions = 1 * time.Hour
	// MaxNumberOfConditions maximum length of conditions list
	MaxNumberOfConditions = 20
)

Variables

This section is empty.

Functions

func GetProtectionGroupIndexer added in v1.5.0

func GetProtectionGroupIndexer() (object runtime.Object, key string, indexerFunc client.IndexerFunc)

GetProtectionGroupIndexer provides access to local data for creating a fake client and adding an index for DellCSIReplicationGroup to the clients list of indexes. The index associated with DellCSIReplicationGroup GVK will map the key to the indexerFunc that will be used to retreive the value.

Types

type ActionAnnotation

type ActionAnnotation struct {
	ActionName            string `json:"name"`
	Completed             bool   `json:"completed"`
	FinalError            string `json:"finalError"`
	FinishTime            string `json:"finishTime"`
	ProtectionGroupStatus string `json:"protectionGroupStatus"`
	SnapshotNamespace     string `json:"snapshotNamespace"`
	SnapshotClass         string `json:"snapshotClass"`
}

ActionAnnotation represents annotation that contains information about replication action

type ActionResult

type ActionResult struct {
	ActionType       ActionType
	Time             time.Time
	Error            error
	IsFinalError     bool
	PGStatus         *csiext.StorageProtectionGroupStatus
	ActionAttributes map[string]string
}

ActionResult represents end result of replication action

type ActionType

type ActionType string

ActionType represent replication action (FAILOVER, REPROTECT and etc.)

func (ActionType) Equals

func (a ActionType) Equals(ctx context.Context, val string) bool

Equals allows to check if provided string is equal to current action type

func (ActionType) String

func (a ActionType) String() string

type PersistentVolumeClaimReconciler

type PersistentVolumeClaimReconciler struct {
	client.Client
	Log               logr.Logger
	Scheme            *runtime.Scheme
	EventRecorder     record.EventRecorder
	DriverName        string
	ReplicationClient csireplication.Replication
	ContextPrefix     string
	SingleFlightGroup singleflight.Group
	Domain            string
}

PersistentVolumeClaimReconciler reconciles a PersistentVolumeClaim object

func (*PersistentVolumeClaimReconciler) Reconcile

Reconcile contains reconciliation logic that updates PersistentVolumeClaim depending on it's current state

func (*PersistentVolumeClaimReconciler) SetupWithManager

func (r *PersistentVolumeClaimReconciler) SetupWithManager(mgr ctrl.Manager, limiter ratelimiter.RateLimiter, maxReconcilers int) error

SetupWithManager start using reconciler by creating new controller managed by provided manager

type PersistentVolumeReconciler

type PersistentVolumeReconciler struct {
	client.Client
	Log               logr.Logger
	Scheme            *runtime.Scheme
	EventRecorder     record.EventRecorder
	DriverName        string
	ReplicationClient csireplication.Replication
	ContextPrefix     string
	SingleFlightGroup singleflight.Group
	Domain            string
	ClusterUID        string
}

PersistentVolumeReconciler reconciles PersistentVolume resources

func (*PersistentVolumeReconciler) Reconcile

Reconcile contains reconciliation logic that updates PersistentVolume depending on it's current state

func (*PersistentVolumeReconciler) SetupWithManager

func (r *PersistentVolumeReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, limiter ratelimiter.RateLimiter, maxReconcilers int) error

SetupWithManager start using reconciler by creating new controller managed by provided manager

type ReplicationGroupMonitoring

type ReplicationGroupMonitoring struct {
	Lock sync.Mutex
	client.Client
	EventRecorder      record.EventRecorder
	Log                logr.Logger
	DriverName         string
	ReplicationClient  csireplication.Replication
	MonitoringInterval time.Duration
}

ReplicationGroupMonitoring structure for monitoring current status of replication groups

func (*ReplicationGroupMonitoring) Monitor

Monitor polls RGs over a defined interval and updates the ReplicationLinkStatus depending on the response received from the driver.

type ReplicationGroupReconciler

type ReplicationGroupReconciler struct {
	client.Client
	Log                        logr.Logger
	Scheme                     *runtime.Scheme
	EventRecorder              record.EventRecorder
	DriverName                 string
	ReplicationClient          csireplication.Replication
	SupportedActions           []*csiext.SupportedActions
	MaxRetryDurationForActions time.Duration
}

ReplicationGroupReconciler is a structure that watches and reconciles events on ReplicationGroup resources

func (*ReplicationGroupReconciler) Reconcile

Reconcile contains reconciliation logic that updates ReplicationGroup depending on it's current state

func (*ReplicationGroupReconciler) SetupWithManager

func (r *ReplicationGroupReconciler) SetupWithManager(mgr ctrl.Manager, limiter ratelimiter.RateLimiter, maxReconcilers int) error

SetupWithManager start using reconciler by creating new controller managed by provided manager

Jump to

Keyboard shortcuts

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