Documentation
¶
Index ¶
Constants ¶
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 ¶
This section is empty.
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"`
}
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
}
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 ¶
func (r *PersistentVolumeClaimReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
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
}
PersistentVolumeReconciler reconciles PersistentVolume resources
func (*PersistentVolumeReconciler) Reconcile ¶
func (r *PersistentVolumeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
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
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 ¶
func (r *ReplicationGroupReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
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