v1alpha1

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 5 Imported by: 6

Documentation

Overview

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

Index

Constants

View Source
const (
	VolumeReplicationNameAnnotation = "replication.storage.openshift.io/volume-replication-name"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "replication.storage.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 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 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 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.

func (*VolumeReplication) DeepCopy

func (in *VolumeReplication) DeepCopy() *VolumeReplication

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

func (*VolumeReplication) DeepCopyInto

func (in *VolumeReplication) DeepCopyInto(out *VolumeReplication)

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

func (*VolumeReplication) DeepCopyObject

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

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

type VolumeReplicationClass

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

	// +kubebuilder:validation:Required
	Spec VolumeReplicationClassSpec `json:"spec"`

	Status VolumeReplicationClassStatus `json:"status,omitempty"`
}

VolumeReplicationClass is the Schema for the volumereplicationclasses API.

func (*VolumeReplicationClass) DeepCopy

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

func (*VolumeReplicationClass) DeepCopyInto

func (in *VolumeReplicationClass) DeepCopyInto(out *VolumeReplicationClass)

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

func (*VolumeReplicationClass) DeepCopyObject

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

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

type VolumeReplicationClassList

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

VolumeReplicationClassList contains a list of VolumeReplicationClass.

func (*VolumeReplicationClassList) DeepCopy

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

func (*VolumeReplicationClassList) DeepCopyInto

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

func (*VolumeReplicationClassList) DeepCopyObject

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

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

type VolumeReplicationClassSpec

type VolumeReplicationClassSpec struct {
	// Provisioner is the name of storage provisioner
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="provisioner is immutable"
	Provisioner string `json:"provisioner"`
	// Parameters is a key-value map with storage provisioner specific configurations for
	// creating volume replicas
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="parameters are immutable"
	Parameters map[string]string `json:"parameters,omitempty"`
}

VolumeReplicationClassSpec specifies parameters that an underlying storage system uses when creating a volume replica. A specific VolumeReplicationClass is used by specifying its name in a VolumeReplication object. +kubebuilder:validation:XValidation:rule="has(self.parameters) == has(oldSelf.parameters)",message="parameters are immutable"

func (*VolumeReplicationClassSpec) DeepCopy

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

func (*VolumeReplicationClassSpec) DeepCopyInto

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

type VolumeReplicationClassStatus

type VolumeReplicationClassStatus struct{}

VolumeReplicationClassStatus defines the observed state of VolumeReplicationClass.

func (*VolumeReplicationClassStatus) DeepCopy

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

func (*VolumeReplicationClassStatus) DeepCopyInto

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

type VolumeReplicationList

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

VolumeReplicationList contains a list of VolumeReplication.

func (*VolumeReplicationList) DeepCopy

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

func (*VolumeReplicationList) DeepCopyInto

func (in *VolumeReplicationList) DeepCopyInto(out *VolumeReplicationList)

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

func (*VolumeReplicationList) DeepCopyObject

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

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

type VolumeReplicationSpec

type VolumeReplicationSpec struct {
	// VolumeReplicationClass is the VolumeReplicationClass name for this VolumeReplication resource
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="volumeReplicationClass is immutable"
	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
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="dataSource is immutable"
	DataSource corev1.TypedLocalObjectReference `json:"dataSource"`

	// AutoResync represents the volume to be auto resynced when
	// ReplicationState is "secondary"
	// +kubebuilder:default:=false
	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.

func (*VolumeReplicationSpec) DeepCopy

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

func (*VolumeReplicationSpec) DeepCopyInto

func (in *VolumeReplicationSpec) DeepCopyInto(out *VolumeReplicationSpec)

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

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"`
	LastSyncBytes      *int64           `json:"lastSyncBytes,omitempty"`
	LastSyncDuration   *metav1.Duration `json:"lastSyncDuration,omitempty"`
}

VolumeReplicationStatus defines the observed state of VolumeReplication.

func (*VolumeReplicationStatus) DeepCopy

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

func (*VolumeReplicationStatus) DeepCopyInto

func (in *VolumeReplicationStatus) DeepCopyInto(out *VolumeReplicationStatus)

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