Documentation
¶
Index ¶
Constants ¶
View Source
const (
VolumeReplicationNameAnnotation = "replication.storage.openshift.io/volume-replication-name"
)
Variables ¶
This section is empty.
Functions ¶
func RunController ¶
func RunController(masterURL, kubeconfig string, gk schema.GroupKind, gvr schema.GroupVersionResource)
Types ¶
type Destination ¶
type ReplicationState ¶
type ReplicationState string
ReplicationState represents the replication operations to be performed on the volume. +kubebuilder:validation:Enum=primary;secondary;resync
const ( // Primary ReplicationState enables mirroring and promotes the volume to primary. Primary ReplicationState = "primary" // Secondary ReplicationState demotes the volume to secondary and resyncs the volume if out of sync. Secondary ReplicationState = "secondary" // Resync option resyncs the volume. Resync ReplicationState = "resync" )
type VolumeReplication ¶
type VolumeReplication struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// +kubebuilder:validation:Required
Spec VolumeReplicationSpec `json:"spec"`
Status VolumeReplicationStatus `json:"status,omitempty"`
}
VolumeReplication is the Schema for the volumereplications API.
type VolumeReplicationList ¶
type VolumeReplicationList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []VolumeReplication `json:"items"`
}
VolumeReplicationList contains a list of VolumeReplication.
type VolumeReplicationSpec ¶
type VolumeReplicationSpec struct {
// VolumeReplicationClass is the VolumeReplicationClass name for this VolumeReplication resource
// +kubebuilder:validation:Required
VolumeReplicationClass string `json:"volumeReplicationClass"`
// ReplicationState represents the replication operation to be performed on the volume.
// Supported operations are "primary", "secondary" and "resync"
// +kubebuilder:validation:Required
ReplicationState ReplicationState `json:"replicationState"`
// DataSource represents the object associated with the volume
// +kubebuilder:validation:Required
DataSource corev1.TypedLocalObjectReference `json:"dataSource"`
DataDestination Destination `json:"dataDestination"`
// AutoResync represents the volume to be auto resynced when
// ReplicationState is "secondary"
AutoResync bool `json:"autoResync"`
// replicationHandle represents an existing (but new) replication id
// +kubebuilder:validation:Optional
ReplicationHandle string `json:"replicationHandle"`
}
VolumeReplicationSpec defines the desired state of VolumeReplication.
type VolumeReplicationStatus ¶
type VolumeReplicationStatus struct {
State State `json:"state,omitempty"`
Message string `json:"message,omitempty"`
// Conditions are the list of conditions and their status.
Conditions []metav1.Condition `json:"conditions,omitempty"`
// observedGeneration is the last generation change the operator has dealt with
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
LastStartTime *metav1.Time `json:"lastStartTime,omitempty"`
LastCompletionTime *metav1.Time `json:"lastCompletionTime,omitempty"`
LastSyncTime *metav1.Time `json:"lastSyncTime,omitempty"`
}
VolumeReplicationStatus defines the observed state of VolumeReplication.
Click to show internal directories.
Click to hide internal directories.