v1alpha1

package
v0.0.0-...-c5c4f7e Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the ramendr v1alpha1 API group +kubebuilder:object:generate=true +groupName=ramendr.openshift.io

Index

Constants

View Source
const (
	ClusterFenceStateUnfenced         = ClusterFenceState("Unfenced")
	ClusterFenceStateFenced           = ClusterFenceState("Fenced")
	ClusterFenceStateManuallyFenced   = ClusterFenceState("ManuallyFenced")
	ClusterFenceStateManuallyUnfenced = ClusterFenceState("ManuallyUnfenced")
)
View Source
const (
	// DRCluster has been validated
	DRClusterValidated string = `Validated`

	// everything is clean. No fencing CRs present
	// in this cluster
	DRClusterConditionTypeClean = "Clean"

	// Fencing CR to fence off this cluster
	// has been created
	DRClusterConditionTypeFenced = "Fenced"
)
View Source
const (
	// Available, state recorded in the DRCluster status to indicate that this
	// resource is available. Usually done when there is no fencing state
	// provided in the spec and DRCluster just reconciles to validate itself.
	Available = DRClusterPhase("Available")

	// Starting, state recorded in the DRCluster status to indicate that this
	// is the start of the reconciler.
	Starting = DRClusterPhase("Starting")

	// Fencing, state recorded in the DRCluster status to indicate that
	// fencing is in progress. Fencing means selecting the
	// peer cluster and creating a NetworkFence MW for it and waiting for MW
	// to be applied in the managed cluster
	Fencing = DRClusterPhase("Fencing")

	// Fenced, this is the state that will be recorded in the DRCluster status
	// when fencing has been performed successfully
	Fenced = DRClusterPhase("Fenced")

	// Unfencing, state recorded in the DRCluster status to indicate that
	// unfencing is in progress. Unfencing means selecting the
	// peer cluster and creating/updating a NetworkFence MW for it and waiting for MW
	// to be applied in the managed cluster
	Unfencing = DRClusterPhase("Unfencing")

	// Unfenced, this is the state that will be recorded in the DRCluster status
	// when unfencing has been performed successfully
	Unfenced = DRClusterPhase("Unfenced")
)

These are the valid values for DRState

View Source
const (
	// Failover, restore PVs to the TargetCluster
	ActionFailover = DRAction("Failover")

	// Relocate, restore PVs to the designated TargetCluster.  PreferredCluster will change
	// to be the TargetCluster.
	ActionRelocate = DRAction("Relocate")
)

These are the valid values for DRAction

View Source
const (
	// WaitForUser, state recorded in DRPC status to indicate that we are
	// waiting for the user to take an action after hub recover.
	WaitForUser = DRState("WaitForUser")

	// Initiating, state recorded in the DRPC status to indicate that this
	// action (Deploy/Failover/Relocate) is preparing for execution. There
	// is NO follow up state called 'Initiated'
	Initiating = DRState("Initiating")

	// Deploying, state recorded in the DRPC status to indicate that the
	// initial deployment is in progress. Deploying means selecting the
	// preffered cluster and creating a VRG MW for it and waiting for MW
	// to be applied in the managed cluster
	Deploying = DRState("Deploying")

	// Deployed, this is the state that will be recorded in the DRPC status
	// when initial deplyment has been performed successfully
	Deployed = DRState("Deployed")

	// FailingOver, state recorded in the DRPC status when the failover
	// is initiated but has not been completed yet
	FailingOver = DRState("FailingOver")

	// FailedOver, state recorded in the DRPC status when the failover
	// process has completed
	FailedOver = DRState("FailedOver")

	// Relocating, state recorded in the DRPC status to indicate that the
	// relocation is in progress
	Relocating = DRState("Relocating")

	// Relocated, state recorded in
	Relocated = DRState("Relocated")

	Deleting = DRState("Deleting")
)

These are the valid values for DRState

View Source
const (
	// Available condition provides the latest available observation regarding the readiness of the cluster,
	// in status.preferredDecision, for workload deployment.
	ConditionAvailable = "Available"

	// PeerReady condition provides the latest available observation regarding the readiness of a peer cluster
	// to failover or relocate the workload.
	ConditionPeerReady = "PeerReady"

	// Protected condition provides the latest available observation regarding the protection status of the workload,
	// on the cluster it is expected to be available on.
	ConditionProtected = "Protected"
)
View Source
const (
	ReasonProgressing = "Progressing"
	ReasonCleaning    = "Cleaning"
	ReasonSuccess     = "Success"
	ReasonNotStarted  = "NotStarted"
	ReasonPaused      = "Paused"
)
View Source
const (
	ReasonProtectedUnknown     = "Unknown"
	ReasonProtectedProgressing = "Progressing"
	ReasonProtectedError       = "Error"
	ReasonProtected            = "Protected"
)
View Source
const (
	ProgressionCompleted                           = ProgressionStatus("Completed")
	ProgressionCreatingMW                          = ProgressionStatus("CreatingMW")
	ProgressionUpdatingPlRule                      = ProgressionStatus("UpdatingPlRule")
	ProgressionWaitForReadiness                    = ProgressionStatus("WaitForReadiness")
	ProgressionCleaningUp                          = ProgressionStatus("Cleaning Up")
	ProgressionCheckingFailoverPrequisites         = ProgressionStatus("CheckingFailoverPrequisites")
	ProgressionFailingOverToCluster                = ProgressionStatus("FailingOverToCluster")
	ProgressionWaitForFencing                      = ProgressionStatus("WaitForFencing")
	ProgressionWaitForStorageMaintenanceActivation = ProgressionStatus("WaitForStorageMaintenanceActivation")
	ProgressionPreparingFinalSync                  = ProgressionStatus("PreparingFinalSync")
	ProgressionClearingPlacement                   = ProgressionStatus("ClearingPlacement")
	ProgressionRunningFinalSync                    = ProgressionStatus("RunningFinalSync")
	ProgressionFinalSyncComplete                   = ProgressionStatus("FinalSyncComplete")
	ProgressionEnsuringVolumesAreSecondary         = ProgressionStatus("EnsuringVolumesAreSecondary")
	ProgressionWaitingForResourceRestore           = ProgressionStatus("WaitingForResourceRestore")
	ProgressionUpdatedPlacement                    = ProgressionStatus("UpdatedPlacement")
	ProgressionEnsuringVolSyncSetup                = ProgressionStatus("EnsuringVolSyncSetup")
	ProgressionSettingupVolsyncDest                = ProgressionStatus("SettingUpVolSyncDest")
	ProgressionDeleting                            = ProgressionStatus("Deleting")
	ProgressionDeleted                             = ProgressionStatus("Deleted")
	ProgressionActionPaused                        = ProgressionStatus("Paused")
)
View Source
const (
	MModeStateUnknown     = MModeState("Unknown")
	MModeStateError       = MModeState("Error")
	MModeStateProgressing = MModeState("Progressing")
	MModeStateCompleted   = MModeState("Completed")
)

Valid values for MModeState

View Source
const (
	// Failover, VRG was failed over to/from this cluster,
	// the to/from is determined by VRG spec.ReplicationState values of Primary/Secondary respectively
	VRGActionFailover = VRGAction("Failover")

	// Relocate, VRG was relocated to/from this cluster,
	// the to/from is determined by VRG spec.ReplicationState values of Primary/Secondary respectively
	VRGActionRelocate = VRGAction("Relocate")
)

These are the valid values for VRGAction

View Source
const (
	DRPolicyValidated string = `Validated`
)
View Source
const KubeObjectProtectionCaptureIntervalDefault = 5 * time.Minute
View Source
const (
	MModeConditionFailoverActivated = MModeStatusConditionType("FailoverActivated")
)

Valid MModeStatusConditionType types (condition types)

View Source
const (
	MModeFailover = MMode("Failover")
)

Supported maintenance modes

View Source
const ReservedBackupName = "use-backup-not-restore"

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "ramendr.openshift.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type ClusterFenceState

type ClusterFenceState string

ClusterFenceState which will be either Unfenced, Fenced, ManuallyFenced or ManuallyUnfenced +kubebuilder:validation:Enum=Unfenced;Fenced;ManuallyFenced;ManuallyUnfenced

type ClusterMaintenanceMode

type ClusterMaintenanceMode struct {
	// StorageProvisioner indicates the type of the provisioner
	StorageProvisioner string `json:"storageProvisioner"`

	// TargetID indicates the storage or replication instance identifier for the StorageProvisioner
	TargetID string `json:"targetID"`

	// State from MaintenanceMode resource created for the StorageProvisioner
	State MModeState `json:"state"`

	// Conditions from MaintenanceMode resource created for the StorageProvisioner
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

func (*ClusterMaintenanceMode) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterMaintenanceMode.

func (*ClusterMaintenanceMode) DeepCopyInto

func (in *ClusterMaintenanceMode) DeepCopyInto(out *ClusterMaintenanceMode)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ControllerType

type ControllerType string

ControllerType is the type of controller to run +kubebuilder:validation:Enum=dr-hub;dr-cluster

const (
	// DRClusterType operates as the DR cluster controller on a peer cluster
	DRClusterType ControllerType = "dr-cluster"

	// DRHubType operates as the DR hub controller on a cluster managing DR across peer clusters
	DRHubType ControllerType = "dr-hub"
)

type DRAction

type DRAction string

DRAction which will be either a Failover or Relocate action +kubebuilder:validation:Enum=Failover;Relocate

type DRCluster

type DRCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   DRClusterSpec   `json:"spec,omitempty"`
	Status DRClusterStatus `json:"status,omitempty"`
}

DRCluster is the Schema for the drclusters API

func (*DRCluster) DeepCopy

func (in *DRCluster) DeepCopy() *DRCluster

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DRCluster.

func (*DRCluster) DeepCopyInto

func (in *DRCluster) DeepCopyInto(out *DRCluster)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DRCluster) DeepCopyObject

func (in *DRCluster) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DRClusterList

type DRClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []DRCluster `json:"items"`
}

DRClusterList contains a list of DRCluster

func (*DRClusterList) DeepCopy

func (in *DRClusterList) DeepCopy() *DRClusterList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DRClusterList.

func (*DRClusterList) DeepCopyInto

func (in *DRClusterList) DeepCopyInto(out *DRClusterList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DRClusterList) DeepCopyObject

func (in *DRClusterList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DRClusterPhase

type DRClusterPhase string

type DRClusterSpec

type DRClusterSpec struct {
	// CIDRs is a list of CIDR strings. An admin can use this field to indicate
	// the CIDRs that are used or could potentially be used for the nodes in
	// this managed cluster.  These will be used for the cluster fencing
	// operation for sync/Metro DR.
	CIDRs []string `json:"cidrs,omitempty"`

	// ClusterFence is a string that determines the desired fencing state of the cluster.
	ClusterFence ClusterFenceState `json:"clusterFence,omitempty"`

	// Region of a managed cluster determines it DR group.
	// All managed clusters in a region are considered to be in a sync group.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="region is immutable"
	Region Region `json:"region"`

	// S3 profile name (in Ramen config) to use as a source to restore PV
	// related cluster state during recovery or relocate actions of applications
	// to this managed cluster;  hence, this S3 profile should be available to
	// successfully move the workload to this managed cluster.  For applications
	// that are active on this managed cluster, their PV related cluster state
	// is stored to S3 profiles of all other drclusters in the same
	// DRPolicy to enable recovery or relocate actions to those managed clusters.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="s3ProfileName is immutable"
	S3ProfileName string `json:"s3ProfileName"`
}

DRClusterSpec defines the desired state of DRCluster

func (*DRClusterSpec) DeepCopy

func (in *DRClusterSpec) DeepCopy() *DRClusterSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DRClusterSpec.

func (*DRClusterSpec) DeepCopyInto

func (in *DRClusterSpec) DeepCopyInto(out *DRClusterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DRClusterStatus

type DRClusterStatus struct {
	Phase            DRClusterPhase           `json:"phase,omitempty"`
	Conditions       []metav1.Condition       `json:"conditions,omitempty"`
	MaintenanceModes []ClusterMaintenanceMode `json:"maintenanceModes,omitempty"`
}

DRClusterStatus defines the observed state of DRCluster

func (*DRClusterStatus) DeepCopy

func (in *DRClusterStatus) DeepCopy() *DRClusterStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DRClusterStatus.

func (*DRClusterStatus) DeepCopyInto

func (in *DRClusterStatus) DeepCopyInto(out *DRClusterStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DRPlacementControl

type DRPlacementControl struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   DRPlacementControlSpec   `json:"spec,omitempty"`
	Status DRPlacementControlStatus `json:"status,omitempty"`
}

DRPlacementControl is the Schema for the drplacementcontrols API

func (*DRPlacementControl) DeepCopy

func (in *DRPlacementControl) DeepCopy() *DRPlacementControl

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DRPlacementControl.

func (*DRPlacementControl) DeepCopyInto

func (in *DRPlacementControl) DeepCopyInto(out *DRPlacementControl)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DRPlacementControl) DeepCopyObject

func (in *DRPlacementControl) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DRPlacementControlList

type DRPlacementControlList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []DRPlacementControl `json:"items"`
}

DRPlacementControlList contains a list of DRPlacementControl

func (*DRPlacementControlList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DRPlacementControlList.

func (*DRPlacementControlList) DeepCopyInto

func (in *DRPlacementControlList) DeepCopyInto(out *DRPlacementControlList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DRPlacementControlList) DeepCopyObject

func (in *DRPlacementControlList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DRPlacementControlSpec

type DRPlacementControlSpec struct {
	// PlacementRef is the reference to the PlacementRule used by DRPC
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:XValidation:rule="self == oldSelf", message="placementRef is immutable"
	PlacementRef v1.ObjectReference `json:"placementRef"`

	// ProtectedNamespaces is a list of namespaces that are protected by the DRPC.
	// Omitting this field means resources are only protected in the namespace controlled by the PlacementRef.
	// If this field is set, the PlacementRef and the DRPC must be in the RamenOpsNamespace as set in the Ramen Config.
	// If this field is set, the protected namespace resources are treated as unmanaged.
	// You can use a recipe to filter and coordinate the order of the resources that are protected.
	// +kubebuilder:validation:Optional
	ProtectedNamespaces *[]string `json:"protectedNamespaces,omitempty"`

	// DRPolicyRef is the reference to the DRPolicy participating in the DR replication for this DRPC
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:XValidation:rule="self == oldSelf", message="drPolicyRef is immutable"
	DRPolicyRef v1.ObjectReference `json:"drPolicyRef"`

	// PreferredCluster is the cluster name that the user preferred to run the application on
	PreferredCluster string `json:"preferredCluster,omitempty"`

	// FailoverCluster is the cluster name that the user wants to failover the application to.
	// If not sepcified, then the DRPC will select the surviving cluster from the DRPolicy
	FailoverCluster string `json:"failoverCluster,omitempty"`

	// Label selector to identify all the PVCs that need DR protection.
	// This selector is assumed to be the same for all subscriptions that
	// need DR protection. It will be passed in to the VRG when it is created
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:XValidation:rule="self == oldSelf", message="pvcSelector is immutable"
	PVCSelector metav1.LabelSelector `json:"pvcSelector"`

	// Action is either Failover or Relocate operation
	Action DRAction `json:"action,omitempty"`

	// +optional
	KubeObjectProtection *KubeObjectProtectionSpec `json:"kubeObjectProtection,omitempty"`
}

DRPlacementControlSpec defines the desired state of DRPlacementControl

func (*DRPlacementControlSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DRPlacementControlSpec.

func (*DRPlacementControlSpec) DeepCopyInto

func (in *DRPlacementControlSpec) DeepCopyInto(out *DRPlacementControlSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DRPlacementControlStatus

type DRPlacementControlStatus struct {
	Phase              DRState            `json:"phase,omitempty"`
	ObservedGeneration int64              `json:"observedGeneration,omitempty"`
	ActionStartTime    *metav1.Time       `json:"actionStartTime,omitempty"`
	ActionDuration     *metav1.Duration   `json:"actionDuration,omitempty"`
	Progression        ProgressionStatus  `json:"progression,omitempty"`
	PreferredDecision  PlacementDecision  `json:"preferredDecision,omitempty"`
	Conditions         []metav1.Condition `json:"conditions,omitempty"`
	ResourceConditions VRGConditions      `json:"resourceConditions,omitempty"`

	// LastUpdateTime is when was the last time a condition or the overall status was updated
	LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"`

	// lastGroupSyncTime is the time of the most recent successful synchronization of all PVCs
	//+optional
	LastGroupSyncTime *metav1.Time `json:"lastGroupSyncTime,omitempty"`

	// lastGroupSyncDuration is the longest time taken to sync
	// from the most recent successful synchronization of all PVCs
	//+optional
	LastGroupSyncDuration *metav1.Duration `json:"lastGroupSyncDuration,omitempty"`

	// lastGroupSyncBytes is the total bytes transferred from the most recent
	// successful synchronization of all PVCs
	//+optional
	LastGroupSyncBytes *int64 `json:"lastGroupSyncBytes,omitempty"`
}

DRPlacementControlStatus defines the observed state of DRPlacementControl

func (*DRPlacementControlStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DRPlacementControlStatus.

func (*DRPlacementControlStatus) DeepCopyInto

func (in *DRPlacementControlStatus) DeepCopyInto(out *DRPlacementControlStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DRPolicy

type DRPolicy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   DRPolicySpec   `json:"spec,omitempty"`
	Status DRPolicyStatus `json:"status,omitempty"`
}

DRPolicy is the Schema for the drpolicies API

func (*DRPolicy) DeepCopy

func (in *DRPolicy) DeepCopy() *DRPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DRPolicy.

func (*DRPolicy) DeepCopyInto

func (in *DRPolicy) DeepCopyInto(out *DRPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DRPolicy) DeepCopyObject

func (in *DRPolicy) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DRPolicyList

type DRPolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []DRPolicy `json:"items"`
}

DRPolicyList contains a list of DRPolicy

func (*DRPolicyList) DeepCopy

func (in *DRPolicyList) DeepCopy() *DRPolicyList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DRPolicyList.

func (*DRPolicyList) DeepCopyInto

func (in *DRPolicyList) DeepCopyInto(out *DRPolicyList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DRPolicyList) DeepCopyObject

func (in *DRPolicyList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DRPolicySpec

type DRPolicySpec struct {
	// scheduling Interval for replicating Persistent Volume
	// data to a peer cluster. Interval is typically in the
	// form <num><m,h,d>. Here <num> is a number, 'm' means
	// minutes, 'h' means hours and 'd' stands for days.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=`^(|\d+[mhd])$`
	// +kubebuilder:validation:XValidation:rule="self == oldSelf", message="schedulingInterval is immutable"
	SchedulingInterval string `json:"schedulingInterval"`

	// Label selector to identify all the VolumeReplicationClasses.
	// This selector is assumed to be the same for all subscriptions that
	// need DR protection. It will be passed in to the VRG when it is created
	//+optional
	// +kubebuilder:validation:Optional
	// +kubebuilder:default:={}
	// +kubebuilder:validation:XValidation:rule="self == oldSelf", message="replicationClassSelector is immutable"
	ReplicationClassSelector metav1.LabelSelector `json:"replicationClassSelector"`

	// Label selector to identify all the VolumeSnapshotClasses.
	// This selector is assumed to be the same for all subscriptions that
	// need DR protection. It will be passed in to the VRG when it is created
	//+optional
	// +kubebuilder:validation:Optional
	// +kubebuilder:default:={}
	// +kubebuilder:validation:XValidation:rule="self == oldSelf", message="volumeSnapshotClassSelector is immutable"
	VolumeSnapshotClassSelector metav1.LabelSelector `json:"volumeSnapshotClassSelector"`

	// List of DRCluster resources that are governed by this policy
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:XValidation:rule="size(self) == 2", message="drClusters requires a list of 2 clusters"
	// +kubebuilder:validation:XValidation:rule="self == oldSelf", message="drClusters is immutable"
	DRClusters []string `json:"drClusters"`
}

DRPolicySpec defines the desired state of DRPolicy +kubebuilder:validation:XValidation:rule="has(oldSelf.replicationClassSelector) == has(self.replicationClassSelector)", message="replicationClassSelector is immutable" +kubebuilder:validation:XValidation:rule="has(oldSelf.volumeSnapshotClassSelector) == has(self.volumeSnapshotClassSelector)", message="volumeSnapshotClassSelector is immutable"

func (*DRPolicySpec) DeepCopy

func (in *DRPolicySpec) DeepCopy() *DRPolicySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DRPolicySpec.

func (*DRPolicySpec) DeepCopyInto

func (in *DRPolicySpec) DeepCopyInto(out *DRPolicySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DRPolicyStatus

type DRPolicyStatus struct {
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

DRPolicyStatus defines the observed state of DRPolicy

func (*DRPolicyStatus) DeepCopy

func (in *DRPolicyStatus) DeepCopy() *DRPolicyStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DRPolicyStatus.

func (*DRPolicyStatus) DeepCopyInto

func (in *DRPolicyStatus) DeepCopyInto(out *DRPolicyStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DRState

type DRState string

DRState for keeping track of the DR placement

type Identifier

type Identifier struct {
	// ID contains the globally unique storage identifier that identifies
	// the storage or replication backend
	ID string `json:"id"`

	// Modes is a list of maintenance modes that need to be activated on the storage
	// backend, prior to various Ramen related orchestration. This is read from the label
	// "ramendr.openshift.io/maintenancemodes" on the StorageClass or VolumeReplicationClass,
	// the value for which is a comma separated list of maintenance modes.
	//+optional
	Modes []MMode `json:"modes,omitempty"`
}

func (*Identifier) DeepCopy

func (in *Identifier) DeepCopy() *Identifier

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Identifier.

func (*Identifier) DeepCopyInto

func (in *Identifier) DeepCopyInto(out *Identifier)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KubeObjectProtectionSpec

type KubeObjectProtectionSpec struct {
	// Preferred time between captures
	//+optional
	//+kubebuilder:validation:Format=duration
	CaptureInterval *metav1.Duration `json:"captureInterval,omitempty"`

	// Name of the Recipe to reference for capture and recovery workflows and volume selection.
	//+optional
	RecipeRef *RecipeRef `json:"recipeRef,omitempty"`

	// Recipe parameter definitions
	//+optional
	RecipeParameters map[string][]string `json:"recipeParameters,omitempty"`

	// Label selector to identify all the kube objects that need DR protection.
	// +optional
	KubeObjectSelector *metav1.LabelSelector `json:"kubeObjectSelector,omitempty"`
}

func (*KubeObjectProtectionSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeObjectProtectionSpec.

func (*KubeObjectProtectionSpec) DeepCopyInto

func (in *KubeObjectProtectionSpec) DeepCopyInto(out *KubeObjectProtectionSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KubeObjectProtectionStatus

type KubeObjectProtectionStatus struct {
	//+optional
	CaptureToRecoverFrom *KubeObjectsCaptureIdentifier `json:"captureToRecoverFrom,omitempty"`
}

func (*KubeObjectProtectionStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeObjectProtectionStatus.

func (*KubeObjectProtectionStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KubeObjectsCaptureIdentifier

type KubeObjectsCaptureIdentifier struct {
	Number int64 `json:"number"`
	//+nullable
	StartTime       metav1.Time `json:"startTime,omitempty"`
	StartGeneration int64       `json:"startGeneration,omitempty"`
}

func (*KubeObjectsCaptureIdentifier) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeObjectsCaptureIdentifier.

func (*KubeObjectsCaptureIdentifier) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MMode

type MMode string

MMode defines a maintenance mode, that a storage backend may be requested to act on, based on the DR orchestration in progress for one or more workloads whose PVCs use the specific storage provisioner +kubebuilder:validation:Enum=Failover

type MModeState

type MModeState string

MModeState defines the state of the system as per the desired spec, at a given generation of the spec (which is noted in status.observedGeneration) +kubebuilder:validation:Enum=Unknown;Error;Progressing;Completed

type MModeStatusConditionType

type MModeStatusConditionType string

MModeStatusConditionType defines an expected condition type +kubebuilder:validation:Enum=FailoverActivated

type MaintenanceMode

type MaintenanceMode struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   MaintenanceModeSpec   `json:"spec,omitempty"`
	Status MaintenanceModeStatus `json:"status,omitempty"`
}

MaintenanceMode is the Schema for the maintenancemodes API

func (*MaintenanceMode) DeepCopy

func (in *MaintenanceMode) DeepCopy() *MaintenanceMode

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MaintenanceMode.

func (*MaintenanceMode) DeepCopyInto

func (in *MaintenanceMode) DeepCopyInto(out *MaintenanceMode)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MaintenanceMode) DeepCopyObject

func (in *MaintenanceMode) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type MaintenanceModeList

type MaintenanceModeList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []MaintenanceMode `json:"items"`
}

MaintenanceModeList contains a list of MaintenanceMode

func (*MaintenanceModeList) DeepCopy

func (in *MaintenanceModeList) DeepCopy() *MaintenanceModeList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MaintenanceModeList.

func (*MaintenanceModeList) DeepCopyInto

func (in *MaintenanceModeList) DeepCopyInto(out *MaintenanceModeList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MaintenanceModeList) DeepCopyObject

func (in *MaintenanceModeList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type MaintenanceModeSpec

type MaintenanceModeSpec struct {
	// StorageProvisioner indicates the type of the provisioner, and is matched with provisioner string present in the
	// StorageClass and/or VolumeReplicationClass for PVCs that are DR protected
	StorageProvisioner string `json:"storageProvisioner"`

	// TargetID indicates the storage or replication instance identifier for the StorageProvisioner that needs to handle
	// the requested maintenance modes. It is read using ramen specific labels on the StorageClass or
	// the VolumeReplicationClass as set by the storage provisioner
	TargetID string `json:"targetID,omitempty"`

	// Modes are the desired maintenance modes that the storage provisioner needs to act on
	Modes []MMode `json:"modes,omitempty"`
}

MaintenanceModeSpec defines the desired state of MaintenanceMode for a StorageProvisioner If a storage or replication backend desires specific maintenance modes to be activated prior to certain Ramen actions (for e.g notify backend of ANY failover operation for internal storage preparation), it presents its requirements via specific Ramen labels on the appropriate StorageClass or ReplicationClass as detailed in the VolumeReplicationGroup status.ProtectedPVCs.StorageIdentifiers fields. Ramen orchestration would create required MaintenanceMode resources based on these labels, for the storage backed to reconcile and provide its readiness status for the action. NOTE: Ramen only creates the MaintenanceMode resource, it is expected to be reconciled by the storage drivers by matching the provisioner and the targetID, that is specific to its instance, and update status as detailed for Ramen to proceed with its actions

func (*MaintenanceModeSpec) DeepCopy

func (in *MaintenanceModeSpec) DeepCopy() *MaintenanceModeSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MaintenanceModeSpec.

func (*MaintenanceModeSpec) DeepCopyInto

func (in *MaintenanceModeSpec) DeepCopyInto(out *MaintenanceModeSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MaintenanceModeStatus

type MaintenanceModeStatus struct {
	State              MModeState         `json:"state,omitempty"`
	ObservedGeneration int64              `json:"observedGeneration,omitempty"`
	Conditions         []metav1.Condition `json:"conditions,omitempty"`
}

MaintenanceModeStatus defines the observed state of MaintenanceMode

func (*MaintenanceModeStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MaintenanceModeStatus.

func (*MaintenanceModeStatus) DeepCopyInto

func (in *MaintenanceModeStatus) DeepCopyInto(out *MaintenanceModeStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PlacementDecision

type PlacementDecision struct {
	ClusterName      string `json:"clusterName,omitempty"`
	ClusterNamespace string `json:"clusterNamespace,omitempty"`
}

PlacementDecision defines the decision made by controller

func (*PlacementDecision) DeepCopy

func (in *PlacementDecision) DeepCopy() *PlacementDecision

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementDecision.

func (*PlacementDecision) DeepCopyInto

func (in *PlacementDecision) DeepCopyInto(out *PlacementDecision)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProgressionStatus

type ProgressionStatus string

type ProtectedPVC

type ProtectedPVC struct {
	// Name of the namespace the PVC is in
	//+optional
	Namespace string `json:"namespace,omitempty"`

	// Name of the VolRep/PVC resource
	//+optional
	Name string `json:"name,omitempty"`

	// VolSyncPVC can be used to denote whether this PVC is protected by VolSync. Defaults to "false".
	//+optional
	ProtectedByVolSync bool `json:"protectedByVolSync,omitempty"`

	//+optional
	StorageIdentifiers `json:",inline,omitempty"`

	// Name of the StorageClass required by the claim.
	//+optional
	StorageClassName *string `json:"storageClassName,omitempty"`

	// Annotations for the PVC
	//+optional
	Annotations map[string]string `json:"annotations,omitempty"`

	// Labels for the PVC
	//+optional
	Labels map[string]string `json:"labels,omitempty"`

	// AccessModes set in the claim to be replicated
	//+optional
	AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty"`

	// Resources set in the claim to be replicated
	//+optional
	Resources corev1.VolumeResourceRequirements `json:"resources,omitempty"`

	// Conditions for this protected pvc
	//+optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// Time of the most recent successful synchronization for the PVC, if
	// protected in the async or volsync mode
	//+optional
	LastSyncTime *metav1.Time `json:"lastSyncTime,omitempty"`

	// Duration of recent synchronization for PVC, if
	// protected in the async or volsync mode
	//+optional
	LastSyncDuration *metav1.Duration `json:"lastSyncDuration,omitempty"`

	// Bytes transferred per sync, if protected in async mode only
	LastSyncBytes *int64 `json:"lastSyncBytes,omitempty"`
}

func (*ProtectedPVC) DeepCopy

func (in *ProtectedPVC) DeepCopy() *ProtectedPVC

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtectedPVC.

func (*ProtectedPVC) DeepCopyInto

func (in *ProtectedPVC) DeepCopyInto(out *ProtectedPVC)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProtectedVolumeReplicationGroupList

type ProtectedVolumeReplicationGroupList struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec ProtectedVolumeReplicationGroupListSpec `json:"spec,omitempty"`
	// +optional
	Status *ProtectedVolumeReplicationGroupListStatus `json:"status,omitempty"`
}

ProtectedVolumeReplicationGroupList is the Schema for the protectedvolumereplicationgrouplists API

func (*ProtectedVolumeReplicationGroupList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtectedVolumeReplicationGroupList.

func (*ProtectedVolumeReplicationGroupList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ProtectedVolumeReplicationGroupList) DeepCopyObject

func (in *ProtectedVolumeReplicationGroupList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ProtectedVolumeReplicationGroupListList

type ProtectedVolumeReplicationGroupListList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ProtectedVolumeReplicationGroupList `json:"items"`
}

ProtectedVolumeReplicationGroupListList contains a list of ProtectedVolumeReplicationGroupList

func (*ProtectedVolumeReplicationGroupListList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtectedVolumeReplicationGroupListList.

func (*ProtectedVolumeReplicationGroupListList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ProtectedVolumeReplicationGroupListList) DeepCopyObject

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ProtectedVolumeReplicationGroupListSpec

type ProtectedVolumeReplicationGroupListSpec struct {
	// ProfileName is the name of the S3 profile in the Ramen operator config map
	// specifying the store to be queried
	S3ProfileName string `json:"s3ProfileName"`
}

ProtectedVolumeReplicationGroupListSpec defines the desired state of ProtectedVolumeReplicationGroupList

func (*ProtectedVolumeReplicationGroupListSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtectedVolumeReplicationGroupListSpec.

func (*ProtectedVolumeReplicationGroupListSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProtectedVolumeReplicationGroupListStatus

type ProtectedVolumeReplicationGroupListStatus struct {
	// SampleTime is a timestamp representing the node time when the specified
	// store was last queried. It is represented in RFC3339 form and is in UTC.
	SampleTime metav1.Time `json:"sampleTime,omitempty"`

	// Items is a list of VolumeReplicationGroup objects represented in
	// the specified store when it was last queried.
	Items []VolumeReplicationGroup `json:"items,omitempty"`
}

ProtectedVolumeReplicationGroupListStatus defines the observed state of ProtectedVolumeReplicationGroupList

func (*ProtectedVolumeReplicationGroupListStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtectedVolumeReplicationGroupListStatus.

func (*ProtectedVolumeReplicationGroupListStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RamenConfig

type RamenConfig struct {
	metav1.TypeMeta `json:",inline"`

	// ControllerManagerConfigurationSpec returns the configurations for controllers
	cfg.ControllerManagerConfigurationSpec `json:",inline"`

	// RamenControllerType defines the type of controller to run
	RamenControllerType ControllerType `json:"ramenControllerType"`

	// Map of S3 store profiles
	S3StoreProfiles []S3StoreProfile `json:"s3StoreProfiles,omitempty"`

	// MaxConcurrentReconciles is the maximum number of concurrent Reconciles which can be run.
	// Defaults to 1.
	MaxConcurrentReconciles int `json:"maxConcurrentReconciles,omitempty"`

	// dr-cluster operator deployment/undeployment automation configuration
	DrClusterOperator struct {
		// dr-cluster operator deployment/undeployment automation enabled
		DeploymentAutomationEnabled bool `json:"deploymentAutomationEnabled,omitempty"`

		// Enable s3 secret distribution and management across dr-clusters
		S3SecretDistributionEnabled bool `json:"s3SecretDistributionEnabled,omitempty"`

		// channel name
		ChannelName string `json:"channelName,omitempty"`

		// package name
		PackageName string `json:"packageName,omitempty"`

		// namespace name
		NamespaceName string `json:"namespaceName,omitempty"`

		// catalog source name
		CatalogSourceName string `json:"catalogSourceName,omitempty"`

		// catalog source namespace name
		CatalogSourceNamespaceName string `json:"catalogSourceNamespaceName,omitempty"`

		// cluster service version name
		ClusterServiceVersionName string `json:"clusterServiceVersionName,omitempty"`
	} `json:"drClusterOperator,omitempty"`

	// VolSync configuration
	VolSync struct {
		// Disabled is used to disable VolSync usage in Ramen. Defaults to false.
		Disabled bool `json:"disabled,omitempty"`

		// Default cephFS CSIDriver name used to enable ROX volumes. If this name matches
		// the PVC's storageclass provisioner, a new storageclass will be created and the
		// name of it passed to VolSync alongside the readOnly flag access mode.
		CephFSCSIDriverName string `json:"cephFSCSIDriverName,omitempty"`

		// destinationCopyMethod indicates the method that should be used when syncing
		// from source to destination. Should be Snapshot/Direct
		// default: Snapshot
		DestinationCopyMethod string `json:"destinationCopyMethod,omitempty"`
	} `json:"volSync,omitempty"`

	KubeObjectProtection struct {
		// Disabled is used to disable KubeObjectProtection usage in Ramen.
		Disabled bool `json:"disabled,omitempty"`
		// Velero namespace input
		VeleroNamespaceName string `json:"veleroNamespaceName,omitempty"`
	} `json:"kubeObjectProtection,omitempty"`

	MultiNamespace struct {
		// Enables feature to protect resources in namespaces other than VRG's
		FeatureEnabled bool `json:"FeatureEnabled,omitempty"`
	} `json:"multiNamespace,omitempty"`

	// Unprotect deleted or deselected PVCs
	VolumeUnprotectionEnabled bool `json:"volumeUnprotectionEnabled,omitempty"`

	// RamenOpsNamespace is the namespace where resources for unmanaged apps are created
	RamenOpsNamespace string `json:"ramenOpsNamespace,omitempty"`
}

RamenConfig is the Schema for the ramenconfig API

func (*RamenConfig) DeepCopy

func (in *RamenConfig) DeepCopy() *RamenConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RamenConfig.

func (*RamenConfig) DeepCopyInto

func (in *RamenConfig) DeepCopyInto(out *RamenConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RamenConfig) DeepCopyObject

func (in *RamenConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RecipeRef

type RecipeRef struct {
	// Name of namespace recipe is in
	//+optional
	Namespace string `json:"namespace,omitempty"`

	// Name of recipe
	//+optional
	Name string `json:"name,omitempty"`
}

func (*RecipeRef) DeepCopy

func (in *RecipeRef) DeepCopy() *RecipeRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecipeRef.

func (*RecipeRef) DeepCopyInto

func (in *RecipeRef) DeepCopyInto(out *RecipeRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Region

type Region string

type ReplicationState

type ReplicationState string

ReplicationState represents the replication operations to be performed on the volume

const (
	// Promote the protected PVCs to primary
	Primary ReplicationState = "primary"

	// Demote the proteced PVCs to secondary
	Secondary ReplicationState = "secondary"
)

type S3StoreProfile

type S3StoreProfile struct {
	// Name of this S3 profile
	S3ProfileName string `json:"s3ProfileName"`

	// Name of the S3 bucket to protect and recover PV related cluster-data of
	// subscriptions protected by this DR policy.  This S3 bucket name is used
	// across all DR policies that use this S3 profile. Objects deposited in
	// this bucket are prefixed with the namespace-qualified name of the VRG to
	// uniquely identify objects of a particular subscription (an instance of an
	// application).  A single S3 bucket at a given endpoint may be shared by
	// multiple DR placements that are concurrently active in a given hub.
	// However, sharing an S3 bucket across multiple hub clusters can cause
	// object key name conflicts of cluster data uploaded to the bucket,
	// resulting in undefined and undesired side-effects. Hence, do not share an
	// S3 bucket at a given S3 endpoint across multiple hub clusters.  Bucket
	// name should follow AWS bucket naming rules:
	// https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html
	S3Bucket string `json:"s3Bucket"`

	// S3 compatible endpoint of the object store of this S3 profile
	S3CompatibleEndpoint string `json:"s3CompatibleEndpoint"`

	// S3 Region; the AWS go client SDK does not have a default region; hence,
	// this is a mandatory field.
	// https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html
	S3Region string `json:"s3Region"`

	// Reference to the secret that contains the S3 access key id and s3 secret
	// access key with the keys AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
	// respectively.
	S3SecretRef v1.SecretReference `json:"s3SecretRef"`
	//+optional
	VeleroNamespaceSecretKeyRef *v1.SecretKeySelector `json:"veleroNamespaceSecretKeyRef,omitempty"`
	// A CA bundle to use when verifying TLS connections to the provider
	//+optional
	CACertificates []byte `json:"caCertificates,omitempty"`
}

Profile of a S3 compatible store to replicate the relevant Kubernetes cluster state (in etcd), such as PV state, across clusters protected by Ramen.

  • DRProtectionControl and VolumeReplicationGroup objects specify the S3 profile that should be used to protect the cluster state of the relevant PVs.
  • A single S3 store profile can be used by multiple DRProtectionControl and VolumeReplicationGroup objects.
  • See DRPolicy type for additional details about S3 configuration options

func (*S3StoreProfile) DeepCopy

func (in *S3StoreProfile) DeepCopy() *S3StoreProfile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S3StoreProfile.

func (*S3StoreProfile) DeepCopyInto

func (in *S3StoreProfile) DeepCopyInto(out *S3StoreProfile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type State

type State string

State captures the latest state of the replication operation

const (
	// PrimaryState represents the Primary replication state
	PrimaryState State = "Primary"

	// SecondaryState represents the Secondary replication state
	SecondaryState State = "Secondary"

	// UnknownState represents the Unknown replication state
	UnknownState State = "Unknown"
)

type StorageIdentifiers

type StorageIdentifiers struct {
	// StorageProvisioners contains the provisioner name of the CSI driver used to provision this
	// PVC (extracted from the storageClass that was used for provisioning)
	//+optional
	StorageProvisioner string `json:"csiProvisioner,omitempty"`

	// StorageID contains the globally unique storage identifier, as reported by the storage backend
	// on the StorageClass as the value for the label "ramendr.openshift.io/storageid", that identifies
	// the storage backend that was used to provision the volume. It is used to label different StorageClasses
	// across different kubernetes clusters, that potentially share the same storage backend.
	// It also contains any maintenance modes that the storage backend requires during vaious Ramen actions
	//+optional
	StorageID Identifier `json:"storageID,omitempty"`

	// ReplicationID contains the globally unique replication identifier, as reported by the storage backend
	// on the VolumeReplicationClass as the value for the label "ramendr.openshift.io/replicationid", that
	// identifies the storage backends across 2 (or more) storage instances where the volume is replicated
	// It also contains any maintenance modes that the replication backend requires during vaious Ramen actions
	//+optional
	ReplicationID Identifier `json:"replicationID,omitempty"`
}

StorageIdentifiers carries various identifiers that help correlate the identify of a storage instance that is backing a PVC across kubernetes clusters.

func (*StorageIdentifiers) DeepCopy

func (in *StorageIdentifiers) DeepCopy() *StorageIdentifiers

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageIdentifiers.

func (*StorageIdentifiers) DeepCopyInto

func (in *StorageIdentifiers) DeepCopyInto(out *StorageIdentifiers)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VRGAction

type VRGAction string

VRGAction which will be either a Failover or Relocate +kubebuilder:validation:Enum=Failover;Relocate

type VRGAsyncSpec

type VRGAsyncSpec struct {
	// Label selector to identify the VolumeReplicationClass resources
	// that are scanned to select an appropriate VolumeReplicationClass
	// for the VolumeReplication resource.
	//+optional
	ReplicationClassSelector metav1.LabelSelector `json:"replicationClassSelector,omitempty"`

	// Label selector to identify the VolumeSnapshotClass resources
	// that are scanned to select an appropriate VolumeSnapshotClass
	// for the VolumeReplication resource when using VolSync.
	//+optional
	VolumeSnapshotClassSelector metav1.LabelSelector `json:"volumeSnapshotClassSelector,omitempty"`

	// scheduling Interval for replicating Persistent Volume
	// data to a peer cluster. Interval is typically in the
	// form <num><m,h,d>. Here <num> is a number, 'm' means
	// minutes, 'h' means hours and 'd' stands for days.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=`^\d+[mhd]$`
	SchedulingInterval string `json:"schedulingInterval"`
}

VRGAsyncSpec has the parameters associated with RegionalDR

func (*VRGAsyncSpec) DeepCopy

func (in *VRGAsyncSpec) DeepCopy() *VRGAsyncSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VRGAsyncSpec.

func (*VRGAsyncSpec) DeepCopyInto

func (in *VRGAsyncSpec) DeepCopyInto(out *VRGAsyncSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VRGConditions

type VRGConditions struct {
	// ResourceMeta represents the VRG resoure.
	// +required
	ResourceMeta VRGResourceMeta `json:"resourceMeta,omitempty"`

	// Conditions represents the conditions of this resource on a managed cluster.
	// +required
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

VRGConditions represents the conditions of the resources deployed on a managed cluster.

func (*VRGConditions) DeepCopy

func (in *VRGConditions) DeepCopy() *VRGConditions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VRGConditions.

func (*VRGConditions) DeepCopyInto

func (in *VRGConditions) DeepCopyInto(out *VRGConditions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VRGResourceMeta

type VRGResourceMeta struct {
	// Kind is the kind of the Kubernetes resource.
	// +optional
	Kind string `json:"kind"`

	// Name is the name of the Kubernetes resource.
	Name string `json:"name"`

	// Namespace is the namespace of the Kubernetes resource.
	Namespace string `json:"namespace"`

	// A sequence number representing a specific generation of the desired state.
	Generation int64 `json:"generation"`

	// List of PVCs that are protected by the VRG resource
	ProtectedPVCs []string `json:"protectedpvcs,omitempty"`
}

VRGResourceMeta represents the VRG resource.

func (*VRGResourceMeta) DeepCopy

func (in *VRGResourceMeta) DeepCopy() *VRGResourceMeta

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VRGResourceMeta.

func (*VRGResourceMeta) DeepCopyInto

func (in *VRGResourceMeta) DeepCopyInto(out *VRGResourceMeta)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VRGSyncSpec

type VRGSyncSpec struct{}

VRGSyncSpec has the parameters associated with MetroDR

func (*VRGSyncSpec) DeepCopy

func (in *VRGSyncSpec) DeepCopy() *VRGSyncSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VRGSyncSpec.

func (*VRGSyncSpec) DeepCopyInto

func (in *VRGSyncSpec) DeepCopyInto(out *VRGSyncSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VolSyncReplicationDestinationSpec

type VolSyncReplicationDestinationSpec struct {
	// protectedPVC contains the information about the PVC to be protected by VolSync
	//+optional
	ProtectedPVC ProtectedPVC `json:"protectedPVC,omitempty"`
}

VolSyncReplicationDestinationSpec defines the configuration for the VolSync protected PVC to be used by the destination cluster (Secondary)

func (*VolSyncReplicationDestinationSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolSyncReplicationDestinationSpec.

func (*VolSyncReplicationDestinationSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VolSyncReplicationSourceSpec

type VolSyncReplicationSourceSpec struct {
	// protectedPVC contains the information about the PVC to be protected by VolSync
	//+optional
	ProtectedPVC ProtectedPVC `json:"protectedPVC,omitempty"`
}

VolSyncReplicationSourceSpec defines the configuration for the VolSync protected PVC to be used by the source cluster (Primary)

func (*VolSyncReplicationSourceSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolSyncReplicationSourceSpec.

func (*VolSyncReplicationSourceSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VolSyncSpec

type VolSyncSpec struct {
	// rdSpec array contains the PVCs information that will/are be/being protected by VolSync
	//+optional
	RDSpec []VolSyncReplicationDestinationSpec `json:"rdSpec,omitempty"`

	// disabled when set, all the VolSync code is bypassed. Default is 'false'
	Disabled bool `json:"disabled,omitempty"`
}

VolSynccSpec defines the ReplicationDestination specs for the Secondary VRG, or the ReplicationSource specs for the Primary VRG

func (*VolSyncSpec) DeepCopy

func (in *VolSyncSpec) DeepCopy() *VolSyncSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolSyncSpec.

func (*VolSyncSpec) DeepCopyInto

func (in *VolSyncSpec) DeepCopyInto(out *VolSyncSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VolumeReplicationGroup

type VolumeReplicationGroup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   VolumeReplicationGroupSpec   `json:"spec,omitempty"`
	Status VolumeReplicationGroupStatus `json:"status,omitempty"`
}

VolumeReplicationGroup is the Schema for the volumereplicationgroups API

func (*VolumeReplicationGroup) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeReplicationGroup.

func (*VolumeReplicationGroup) DeepCopyInto

func (in *VolumeReplicationGroup) DeepCopyInto(out *VolumeReplicationGroup)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VolumeReplicationGroup) DeepCopyObject

func (in *VolumeReplicationGroup) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VolumeReplicationGroupList

type VolumeReplicationGroupList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VolumeReplicationGroup `json:"items"`
}

VolumeReplicationGroupList contains a list of VolumeReplicationGroup

func (*VolumeReplicationGroupList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeReplicationGroupList.

func (*VolumeReplicationGroupList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VolumeReplicationGroupList) DeepCopyObject

func (in *VolumeReplicationGroupList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VolumeReplicationGroupSpec

type VolumeReplicationGroupSpec struct {
	// Label selector to identify all the PVCs that are in this group
	// that needs to be replicated to the peer cluster.
	PVCSelector metav1.LabelSelector `json:"pvcSelector"`

	// Desired state of all volumes [primary or secondary] in this replication group;
	// this value is propagated to children VolumeReplication CRs
	ReplicationState ReplicationState `json:"replicationState"`

	// List of unique S3 profiles in RamenConfig that should be used to store
	// and forward PV related cluster state to peer DR clusters.
	S3Profiles []string `json:"s3Profiles"`

	//+optional
	Async *VRGAsyncSpec `json:"async,omitempty"`
	//+optional
	Sync *VRGSyncSpec `json:"sync,omitempty"`

	// volsync defines the configuration when using VolSync plugin for replication.
	//+optional
	VolSync VolSyncSpec `json:"volSync,omitempty"`

	// PrepareForFinalSync when set, it tells VRG to prepare for the final sync from source to destination
	// cluster. Final sync is needed for relocation only, and for VolSync only
	//+optional
	PrepareForFinalSync bool `json:"prepareForFinalSync,omitempty"`

	// runFinalSync used to indicate whether final sync is needed. Final sync is needed for
	// relocation only, and for VolSync only
	//+optional
	RunFinalSync bool `json:"runFinalSync,omitempty"`

	// Action is either Failover or Relocate
	//+optional
	Action VRGAction `json:"action,omitempty"`
	//+optional
	KubeObjectProtection *KubeObjectProtectionSpec `json:"kubeObjectProtection,omitempty"`

	// ProtectedNamespaces is a list of namespaces that are considered for protection by the VRG.
	// Omitting this field means resources are only protected in the namespace where VRG is.
	// If this field is set, the VRG must be in the Ramen Ops Namespace as configured in the Ramen Config.
	// If this field is set, the protected namespace resources are treated as unmanaged.
	// You can use a recipe to filter and coordinate the order of the resources that are protected.
	//+optional
	ProtectedNamespaces *[]string `json:"protectedNamespaces,omitempty"`
}

VolumeReplicationGroup (VRG) spec declares the desired schedule for data replication and replication state of all PVCs identified via the given PVC label selector. For each such PVC, the VRG will do the following:

  • Create a VolumeReplication (VR) CR to enable storage level replication of volume data and set the desired replication state (primary, secondary, etc).
  • Take the corresponding PV cluster data in Kubernetes etcd and deposit it in the S3 store. The url, access key and access id required to access the S3 store is specified via environment variables of the VRG operator POD, which is obtained from a secret resource.
  • Manage the lifecycle of VR CR and S3 data according to CUD operations on the PVC and the VRG CR.

func (*VolumeReplicationGroupSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeReplicationGroupSpec.

func (*VolumeReplicationGroupSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VolumeReplicationGroupStatus

type VolumeReplicationGroupStatus struct {
	State State `json:"state,omitempty"`

	// All the protected pvcs
	ProtectedPVCs []ProtectedPVC `json:"protectedPVCs,omitempty"`

	// Conditions are the list of VRG's summary 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"`
	//+nullable
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
	//+optional
	KubeObjectProtection KubeObjectProtectionStatus `json:"kubeObjectProtection,omitempty"`

	PrepareForFinalSyncComplete bool `json:"prepareForFinalSyncComplete,omitempty"`
	FinalSyncComplete           bool `json:"finalSyncComplete,omitempty"`

	// lastGroupSyncTime is the time of the most recent successful synchronization of all PVCs
	//+optional
	LastGroupSyncTime *metav1.Time `json:"lastGroupSyncTime,omitempty"`

	// lastGroupSyncDuration is the max time from all the successful synced PVCs
	//+optional
	LastGroupSyncDuration *metav1.Duration `json:"lastGroupSyncDuration,omitempty"`

	// lastGroupSyncBytes is the total bytes transferred from the most recent
	// successful synchronization of all PVCs
	//+optional
	LastGroupSyncBytes *int64 `json:"lastGroupSyncBytes,omitempty"`
}

VolumeReplicationGroupStatus defines the observed state of VolumeReplicationGroup

func (*VolumeReplicationGroupStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeReplicationGroupStatus.

func (*VolumeReplicationGroupStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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