v1

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2020 License: Apache-2.0 Imports: 11 Imported by: 25

Documentation

Overview

Package v1 is the v1 version of the API. +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/openebs/api/pkg/internalapis/apis/cstor +k8s:openapi-gen=true +groupName=cstor.openebs.io

Index

Constants

View Source
const (
	StoragePoolKindCSPC = "CStorPoolCluster"
	// APIVersion holds the value of OpenEBS version
	APIVersion = "cstor.openebs.io/v1"
)
View Source
const (

	//CStorNodeBase nodeBase for cstor volume
	CStorNodeBase string = "iqn.2016-09.com.openebs.cstor"

	// TargetPort is port for cstor volume
	TargetPort string = "3260"

	// CStorVolumeReplicaFinalizer is the name of finalizer on CStorVolumeConfig
	CStorVolumeReplicaFinalizer = "cstorvolumereplica.openebs.io/finalizer"
)

Variables

View Source
var (
	// SchemeBuilder is the scheme builder with scheme init functions to run for this API package
	SchemeBuilder runtime.SchemeBuilder

	// AddToScheme is a global function that registers this API group & version to a scheme
	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: cstor.GroupName, Version: apiVersion}

SchemeGroupVersion is group version used to register these objects

Functions

func GetDesiredReplicaPoolNames

func GetDesiredReplicaPoolNames(cvc *CStorVolumeConfig) []string

GetDesiredReplicaPoolNames returns list of desired pool names

func GetPoolNames

func GetPoolNames(cvrList *CStorVolumeReplicaList) []string

GetPoolNames returns list of pool names from cStor volume replcia list

func IsScaleDownInProgress

func IsScaleDownInProgress(cv *CStorVolume) bool

IsScaleDownInProgress return true if length of status replica details is greater than length of spec replica details

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type CSPCConditionType

type CSPCConditionType string
const (
	// PoolManagerAvailable means the PoolManagerAvailable deployment is available, ie. at least the minimum available
	// replicas required are up and running and in ready state.
	PoolManagerAvailable CSPCConditionType = "PoolManagerAvailable"
)

These are valid conditions of a cspc.

type CSPIPredicate

type CSPIPredicate func(*CStorPoolInstance) bool

Predicate defines an abstraction to determine conditional checks against the provided CStorPoolInstance

func HasNodeName

func HasNodeName(nodeName string) CSPIPredicate

HasNodeName is predicate to filter out based on node name of CSPI instances.

func IsOnline

func IsOnline() CSPIPredicate

IsOnline is predicate to filter out based on online CSPI instances.

type CStorPoolCluster

type CStorPoolCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              CStorPoolClusterSpec   `json:"spec"`
	Status            CStorPoolClusterStatus `json:"status"`
	VersionDetails    VersionDetails         `json:"versionDetails"`
}

CStorPoolCluster describes a CStorPoolCluster custom resource.

func NewCStorPoolCluster

func NewCStorPoolCluster() *CStorPoolCluster

func (*CStorPoolCluster) DeepCopy

func (in *CStorPoolCluster) DeepCopy() *CStorPoolCluster

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

func (*CStorPoolCluster) DeepCopyInto

func (in *CStorPoolCluster) DeepCopyInto(out *CStorPoolCluster)

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

func (*CStorPoolCluster) DeepCopyObject

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

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

func (*CStorPoolCluster) HasAnnotation

func (cspc *CStorPoolCluster) HasAnnotation(key, value string) bool

HasAnnotation return true if provided annotation key and value are present on the object.

func (*CStorPoolCluster) HasFinalizer

func (cspc *CStorPoolCluster) HasFinalizer(finalizer string) bool

HasFinalizer returns true if the provided finalizer is present on the object.

func (*CStorPoolCluster) HasLabel

func (cspc *CStorPoolCluster) HasLabel(key, value string) bool

HasLabel returns true if provided label key and value are present on the object.

func (*CStorPoolCluster) RemoveFinalizer

func (cspc *CStorPoolCluster) RemoveFinalizer(finalizer string)

RemoveFinalizer removes the given finalizer from the object.

func (*CStorPoolCluster) WithAnnotations

func (cspc *CStorPoolCluster) WithAnnotations(annotations map[string]string) *CStorPoolCluster

WithAnnotations appends or overwrites existing Annotations values of cspc with provided arguments

func (*CStorPoolCluster) WithAnnotationsNew

func (cspc *CStorPoolCluster) WithAnnotationsNew(annotations map[string]string) *CStorPoolCluster

WithAnnotationsNew sets the Annotations field of cspc with provided arguments

func (*CStorPoolCluster) WithDefaultAuxResources

func (cspc *CStorPoolCluster) WithDefaultAuxResources(resources corev1.ResourceRequirements) *CStorPoolCluster

WithDefaultAuxResources sets the DefaultAuxResources field in the CSPC

func (*CStorPoolCluster) WithDefaultPriorityClassName

func (cspc *CStorPoolCluster) WithDefaultPriorityClassName(priorityClassName string) *CStorPoolCluster

WithDefaultPriorityClassName sets the DefaultPriorityClassName field in the CSPC

func (*CStorPoolCluster) WithDefaultResource

func (cspc *CStorPoolCluster) WithDefaultResource(resources corev1.ResourceRequirements) *CStorPoolCluster

WithDefaultResource sets the DefaultResources field in the CSPC

func (*CStorPoolCluster) WithFinalizer

func (cspc *CStorPoolCluster) WithFinalizer(finalizers ...string) *CStorPoolCluster

WithFinalizer sets the finalizer field in the CSPC

func (*CStorPoolCluster) WithLabels

func (cspc *CStorPoolCluster) WithLabels(labels map[string]string) *CStorPoolCluster

WithLabels appends or overwrites existing Labels values of cspc with provided arguments

func (*CStorPoolCluster) WithLabelsNew

func (cspc *CStorPoolCluster) WithLabelsNew(labels map[string]string) *CStorPoolCluster

WithLabelsNew sets the Labels field of cspc with provided arguments

func (*CStorPoolCluster) WithName

func (cspc *CStorPoolCluster) WithName(name string) *CStorPoolCluster

WithName sets the Name field of cspc with provided value.

func (*CStorPoolCluster) WithNamespace

func (cspc *CStorPoolCluster) WithNamespace(namespace string) *CStorPoolCluster

WithNamespace sets the Namespace field of cspc provided arguments

func (*CStorPoolCluster) WithPoolSpecs

func (cspc *CStorPoolCluster) WithPoolSpecs(pools ...PoolSpec) *CStorPoolCluster

WithPoolSpecs sets the Pools field in the CSPC

func (*CStorPoolCluster) WithTolerations

func (cspc *CStorPoolCluster) WithTolerations(tolerations []corev1.Toleration) *CStorPoolCluster

WithTolerations sets the Tolerations field in the CSPC

type CStorPoolClusterCondition

type CStorPoolClusterCondition struct {
	// Type of CSPC condition.
	Type CSPCConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status"`
	// The last time this condition was updated.
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
	// Last time the condition transitioned from one status to another.
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// The reason for the condition's last transition.
	Reason string `json:"reason,omitempty"`
	// A human readable message indicating details about the transition.
	Message string `json:"message,omitempty"`
}

CStorPoolClusterCondition describes the state of a CSPC at a certain point.

func (*CStorPoolClusterCondition) DeepCopy

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

func (*CStorPoolClusterCondition) DeepCopyInto

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

type CStorPoolClusterList

type CStorPoolClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []CStorPoolCluster `json:"items"`
}

CStorPoolClusterList is a list of CStorPoolCluster resources

func (*CStorPoolClusterList) DeepCopy

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

func (*CStorPoolClusterList) DeepCopyInto

func (in *CStorPoolClusterList) DeepCopyInto(out *CStorPoolClusterList)

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

func (*CStorPoolClusterList) DeepCopyObject

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

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

type CStorPoolClusterSpec

type CStorPoolClusterSpec struct {
	// Pools is the spec for pools for various nodes
	// where it should be created.
	Pools []PoolSpec `json:"pools"`
	// DefaultResources are the compute resources required by the cstor-pool
	// container.
	// If the resources at PoolConfig is not specified, this is written
	// to CSPI PoolConfig.
	DefaultResources *corev1.ResourceRequirements `json:"resources"`
	// AuxResources are the compute resources required by the cstor-pool pod
	// side car containers.
	DefaultAuxResources *corev1.ResourceRequirements `json:"auxResources"`
	// Tolerations, if specified, are the pool pod's tolerations
	// If tolerations at PoolConfig is empty, this is written to
	// CSPI PoolConfig.
	Tolerations []corev1.Toleration `json:"tolerations"`

	// DefaultPriorityClassName if specified applies to all the pool pods
	// in the pool spec if the priorityClass at the pool level is
	// not specified.
	DefaultPriorityClassName string `json:"priorityClassName"`
}

CStorPoolClusterSpec is the spec for a CStorPoolClusterSpec resource

func (*CStorPoolClusterSpec) DeepCopy

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

func (*CStorPoolClusterSpec) DeepCopyInto

func (in *CStorPoolClusterSpec) DeepCopyInto(out *CStorPoolClusterSpec)

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

type CStorPoolClusterStatus

type CStorPoolClusterStatus struct {
	// ProvisionedInstances is the the number of CSPI present at the current state.
	ProvisionedInstances int32 `json:"provisionedInstances"`

	// DesiredInstances is the number of CSPI(s) that should be provisioned.
	DesiredInstances int32 `json:"desiredInstances"`

	// HealthyInstances is the number of CSPI(s) that are healthy.
	HealthyInstances int32 `json:"healthyInstances"`

	// Current state of CSPC.
	Conditions []CStorPoolClusterCondition `json:"conditions"`
}

CStorPoolClusterStatus represents the latest available observations of a CSPC's current state.

func (*CStorPoolClusterStatus) DeepCopy

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

func (*CStorPoolClusterStatus) DeepCopyInto

func (in *CStorPoolClusterStatus) DeepCopyInto(out *CStorPoolClusterStatus)

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

type CStorPoolInstance

type CStorPoolInstance struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Spec is the specification of the cstorpoolinstance resource.
	Spec CStorPoolInstanceSpec `json:"spec"`
	// Status is the possible statuses of the cstorpoolinstance resource.
	Status CStorPoolInstanceStatus `json:"status"`
	// VersionDetails is the openebs version.
	VersionDetails VersionDetails `json:"versionDetails"`
}

CStorPoolInstance describes a cstor pool instance resource.

func NewCStorPoolInstance

func NewCStorPoolInstance() *CStorPoolInstance

func (*CStorPoolInstance) DeepCopy

func (in *CStorPoolInstance) DeepCopy() *CStorPoolInstance

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

func (*CStorPoolInstance) DeepCopyInto

func (in *CStorPoolInstance) DeepCopyInto(out *CStorPoolInstance)

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

func (*CStorPoolInstance) DeepCopyObject

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

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

func (*CStorPoolInstance) GetAllRaidGroups

func (cspi *CStorPoolInstance) GetAllRaidGroups() []RaidGroup

GetAllRaidGroups returns list of all raid groups presents in cspi

func (*CStorPoolInstance) HasAnnotation

func (cspi *CStorPoolInstance) HasAnnotation(key, value string) bool

HasAnnotation return true if provided annotation key and value are present on the object.

func (*CStorPoolInstance) HasFinalizer

func (cspi *CStorPoolInstance) HasFinalizer(finalizer string) bool

HasFinalizer returns true if the provided finalizer is present on the object.

func (*CStorPoolInstance) HasLabel

func (cspi *CStorPoolInstance) HasLabel(key, value string) bool

HasLabel returns true if provided label key and value are present on the object.

func (*CStorPoolInstance) HasNodeName

func (cspi *CStorPoolInstance) HasNodeName(nodeName string) bool

HasNodeName returns true if the CSPI belongs to the provided node name.

func (*CStorPoolInstance) IsDestroyed

func (cspi *CStorPoolInstance) IsDestroyed() bool

IsDestroyed returns true if CSPI is deletion time stamp is set

func (*CStorPoolInstance) IsEmptyStatus

func (cspi *CStorPoolInstance) IsEmptyStatus() bool

IsEmptyStatus is to check whether the status of cStorPoolInstance is empty.

func (*CStorPoolInstance) IsOnlineStatus

func (cspi *CStorPoolInstance) IsOnlineStatus() bool

IsOnlineStatus is to check if the status of cStorPoolInstance is online.

func (*CStorPoolInstance) IsPendingStatus

func (cspi *CStorPoolInstance) IsPendingStatus() bool

IsPendingStatus is to check if the status of cStorPoolInstance is pending.

func (*CStorPoolInstance) RemoveFinalizer

func (cspi *CStorPoolInstance) RemoveFinalizer(finalizer string)

RemoveFinalizer removes the given finalizer from the object.

func (*CStorPoolInstance) WithAnnotations

func (cspi *CStorPoolInstance) WithAnnotations(annotations map[string]string) *CStorPoolInstance

WithAnnotations appends or overwrites existing Annotations values of CSPI with provided arguments

func (*CStorPoolInstance) WithAnnotationsNew

func (cspi *CStorPoolInstance) WithAnnotationsNew(annotations map[string]string) *CStorPoolInstance

WithAnnotationsNew sets the Annotations field of CSPI with provided arguments

func (*CStorPoolInstance) WithCSPCOwnerReference

func (cspi *CStorPoolInstance) WithCSPCOwnerReference(reference metav1.OwnerReference) *CStorPoolInstance

WithCSPCOwnerReference sets the OwnerReference field in CSPI with required fields

func (*CStorPoolInstance) WithDataRaidGroups

func (cspi *CStorPoolInstance) WithDataRaidGroups(raidGroup []RaidGroup) *CStorPoolInstance

WithDataRaidGroups sets the DataRaidGroups of the CSPI with the provided raid groups.

func (*CStorPoolInstance) WithDependentsUpgraded

func (cspi *CStorPoolInstance) WithDependentsUpgraded() *CStorPoolInstance

WithDependentsUpgraded sets the field to true for new CSPI

func (*CStorPoolInstance) WithFinalizer

func (cspi *CStorPoolInstance) WithFinalizer(finalizers ...string) *CStorPoolInstance

WithFinalizer sets the finalizer field in the BDC

func (*CStorPoolInstance) WithLabels

func (cspi *CStorPoolInstance) WithLabels(labels map[string]string) *CStorPoolInstance

WithLabels appends or overwrites existing Labels values of CSPI with provided arguments

func (*CStorPoolInstance) WithLabelsNew

func (cspi *CStorPoolInstance) WithLabelsNew(labels map[string]string) *CStorPoolInstance

WithLabelsNew sets the Labels field of CSPI with provided arguments

func (*CStorPoolInstance) WithName

func (cspi *CStorPoolInstance) WithName(name string) *CStorPoolInstance

WithName sets the Name field of CSPI with provided value.

func (*CStorPoolInstance) WithNamespace

func (cspi *CStorPoolInstance) WithNamespace(namespace string) *CStorPoolInstance

WithNamespace sets the Namespace field of CSPI provided arguments

func (*CStorPoolInstance) WithNewVersion

func (cspi *CStorPoolInstance) WithNewVersion(version string) *CStorPoolInstance

WithNewVersion sets the current and desired version field of CSPI with provided arguments

func (*CStorPoolInstance) WithNodeName

func (cspi *CStorPoolInstance) WithNodeName(nodeName string) *CStorPoolInstance

WithNodeName sets the HostName field of CSPI with the provided argument.

func (*CStorPoolInstance) WithNodeSelectorByReference

func (cspi *CStorPoolInstance) WithNodeSelectorByReference(nodeSelector map[string]string) *CStorPoolInstance

WithNodeSelectorByReference sets the node selector field of CSPI with provided argument.

func (*CStorPoolInstance) WithPoolConfig

func (cspi *CStorPoolInstance) WithPoolConfig(poolConfig PoolConfig) *CStorPoolInstance

WithPoolConfig sets the pool config field of the CSPI with the provided config.

func (*CStorPoolInstance) WithWriteCacheRaidGroups

func (cspi *CStorPoolInstance) WithWriteCacheRaidGroups(raidGroup []RaidGroup) *CStorPoolInstance

WithWriteCacheRaidGroups sets the WriteCacheRaidGroups of the CSPI with the provided raid groups.

type CStorPoolInstanceBlockDevice

type CStorPoolInstanceBlockDevice struct {
	// BlockDeviceName is the name of the block device.
	BlockDeviceName string `json:"blockDeviceName"`
	// Capacity is the capacity of the block device.
	// It is system generated
	Capacity uint64 `json:"capacity"`
	// DevLink is the dev link for block devices
	DevLink string `json:"devLink"`
}

CStorPoolInstanceBlockDevice contains the details of block devices that constitutes a raid group.

func NewCStorPoolInstanceBlockDevice

func NewCStorPoolInstanceBlockDevice() *CStorPoolInstanceBlockDevice

NewCStorPoolInstanceBlockDevice returns an empty instance of CStorPoolInstanceBlockDevice

func (*CStorPoolInstanceBlockDevice) DeepCopy

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

func (*CStorPoolInstanceBlockDevice) DeepCopyInto

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

func (*CStorPoolInstanceBlockDevice) WithName

WithName sets the BlockDeviceName field in CStorPoolInstanceBlockDevice

type CStorPoolInstanceCapacity

type CStorPoolInstanceCapacity struct {
	// Amount of physical data (and its metadata) written to pool
	// after applying compression, etc..,
	Used resource.Quantity `json:"used"`
	// Amount of usable space in the pool after excluding
	// metadata and raid parity
	Free resource.Quantity `json:"free"`
	// Sum of usable capacity in all the data raidgroups
	Total resource.Quantity `json:"total"`
	// ZFSCapacityAttributes contains advanced information about pool capacity details
	ZFS ZFSCapacityAttributes `json:"zfs"`
}

CStorPoolInstanceCapacity stores the pool capacity related attributes.

func (*CStorPoolInstanceCapacity) DeepCopy

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

func (*CStorPoolInstanceCapacity) DeepCopyInto

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

type CStorPoolInstanceCondition

type CStorPoolInstanceCondition struct {
	// Type of CSPC condition.
	Type CStorPoolInstanceConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status"`
	// The last time this condition was updated.
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
	// Last time the condition transitioned from one status to another.
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// The reason for the condition's last transition.
	Reason string `json:"reason,omitempty"`
	// A human readable message indicating details about the transition.
	Message string `json:"message,omitempty"`
}

CSPIConditionType describes the state of a CSPI at a certain point.

func (*CStorPoolInstanceCondition) DeepCopy

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

func (*CStorPoolInstanceCondition) DeepCopyInto

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

type CStorPoolInstanceConditionType

type CStorPoolInstanceConditionType string
const (
	// CSPIPoolExpansion condition will be available when user triggers
	// pool expansion by adding blockdevice/raidgroup (or) when underlying
	// disk got expanded
	CSPIPoolExpansion CStorPoolInstanceConditionType = "PoolExpansion"
	// CSPIDiskReplacement condition will be available when user triggers
	// disk replacement by replacing the blockdevice
	CSPIDiskReplacement CStorPoolInstanceConditionType = "DiskReplacement"
	// CSPIDiskUnavailable condition will be available when one (or) more
	// disks were unavailable
	CSPIDiskUnavailable CStorPoolInstanceConditionType = "DiskUnavailable"
	// CSPIPoolLost condition will be available when unable to import the pool
	CSPIPoolLost CStorPoolInstanceConditionType = "PoolLost"
)

type CStorPoolInstanceList

type CStorPoolInstanceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []CStorPoolInstance `json:"items"`
}

CStorPoolInstanceList is a list of CStorPoolInstance resources

func (*CStorPoolInstanceList) DeepCopy

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

func (*CStorPoolInstanceList) DeepCopyInto

func (in *CStorPoolInstanceList) DeepCopyInto(out *CStorPoolInstanceList)

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

func (*CStorPoolInstanceList) DeepCopyObject

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

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

func (*CStorPoolInstanceList) Filter

Filter will filter the csp instances if all the predicates succeed against that csp.

type CStorPoolInstancePhase

type CStorPoolInstancePhase string

CStorPoolInstancePhase is the phase for CStorPoolInstance resource.

const (
	// CStorPoolStatusEmpty ensures the create operation is to be done, if import fails.
	CStorPoolStatusEmpty CStorPoolInstancePhase = ""
	// CStorPoolStatusOnline signifies that the pool is online.
	CStorPoolStatusOnline CStorPoolInstancePhase = "ONLINE"
	// CStorPoolStatusOffline signifies that the pool is offline.
	CStorPoolStatusOffline CStorPoolInstancePhase = "OFFLINE"
	// CStorPoolStatusDegraded signifies that the pool is degraded.
	CStorPoolStatusDegraded CStorPoolInstancePhase = "DEGRADED"
	// CStorPoolStatusFaulted signifies that the pool is faulted.
	CStorPoolStatusFaulted CStorPoolInstancePhase = "FAULTED"
	// CStorPoolStatusRemoved signifies that the pool is removed.
	CStorPoolStatusRemoved CStorPoolInstancePhase = "REMOVED"
	// CStorPoolStatusUnavail signifies that the pool is not available.
	CStorPoolStatusUnavail CStorPoolInstancePhase = "UNAVAIL"
	// CStorPoolStatusError signifies that the pool status could not be fetched.
	CStorPoolStatusError CStorPoolInstancePhase = "Error"
	// CStorPoolStatusDeletionFailed ensures the resource deletion has failed.
	CStorPoolStatusDeletionFailed CStorPoolInstancePhase = "DeletionFailed"
	// CStorPoolStatusInvalid ensures invalid resource.
	CStorPoolStatusInvalid CStorPoolInstancePhase = "Invalid"
	// CStorPoolStatusErrorDuplicate ensures error due to duplicate resource.
	CStorPoolStatusErrorDuplicate CStorPoolInstancePhase = "ErrorDuplicate"
	// CStorPoolStatusPending ensures pending task for cstorpool.
	CStorPoolStatusPending CStorPoolInstancePhase = "Pending"
	// CStorPoolStatusInit is initial state of CSP, before pool creation.
	CStorPoolStatusInit CStorPoolInstancePhase = "Init"
	// CStorPoolStatusCreateFailed is state when pool creation failed
	CStorPoolStatusCreateFailed CStorPoolInstancePhase = "PoolCreationFailed"
)

Status written onto CStorPool and CStorVolumeReplica objects. Resetting state to either Init or CreateFailed need to be done with care, as, label clear and pool creation depends on this state.

type CStorPoolInstanceSpec

type CStorPoolInstanceSpec struct {
	// HostName is the name of kubernetes node where the pool
	// should be created.
	HostName string `json:"hostName"`
	// NodeSelector is the labels that will be used to select
	// a node for pool provisioning.
	// Required field
	NodeSelector map[string]string `json:"nodeSelector"`
	// PoolConfig is the default pool config that applies to the
	// pool on node.
	PoolConfig PoolConfig `json:"poolConfig"`
	// DataRaidGroups is the raid group configuration for the given pool.
	DataRaidGroups []RaidGroup `json:"dataRaidGroups"`
	// WriteCacheRaidGroups is the write cache raid group.
	WriteCacheRaidGroups []RaidGroup `json:"writeCacheRaidGroups"`
}

CStorPoolInstanceSpec is the spec listing fields for a CStorPoolInstance resource.

func (*CStorPoolInstanceSpec) DeepCopy

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

func (*CStorPoolInstanceSpec) DeepCopyInto

func (in *CStorPoolInstanceSpec) DeepCopyInto(out *CStorPoolInstanceSpec)

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

type CStorPoolInstanceStatus

type CStorPoolInstanceStatus struct {
	// Current state of CSPI with details.
	Conditions []CStorPoolInstanceCondition `json:"conditions,omitempty"`
	//  The phase of a CStorPool is a simple, high-level summary of the pool state on the
	//  node.
	Phase CStorPoolInstancePhase `json:"phase"`
	// Capacity describes the capacity details of a cstor pool
	Capacity CStorPoolInstanceCapacity `json:"capacity"`
	//ReadOnly if pool is readOnly or not
	ReadOnly bool `json:"readOnly"`
	// ProvisionedReplicas describes the total count of Volume Replicas
	// present in the cstor pool
	ProvisionedReplicas int32 `json:"provisionedReplicas"`
	// HealthyReplicas describes the total count of healthy Volume Replicas
	// in the cstor pool
	HealthyReplicas int32 `json:"healthyReplicas"`
}

CStorPoolInstanceStatus is for handling status of pool.

func (*CStorPoolInstanceStatus) DeepCopy

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

func (*CStorPoolInstanceStatus) DeepCopyInto

func (in *CStorPoolInstanceStatus) DeepCopyInto(out *CStorPoolInstanceStatus)

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

type CStorSnapshotInfo

type CStorSnapshotInfo struct {
	// LogicalReferenced describes the amount of space that is "logically"
	// accessable by this snapshot. This logical space ignores the
	// effect of the compression and copies properties, giving a quantity
	// closer to the amount of data that application see. It also includes
	// space consumed by metadata.
	LogicalReferenced uint64 `json:"logicalReferenced"`
}

CStorSnapshotInfo represents the snapshot information related to particular snapshot

func (*CStorSnapshotInfo) DeepCopy

func (in *CStorSnapshotInfo) DeepCopy() *CStorSnapshotInfo

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

func (*CStorSnapshotInfo) DeepCopyInto

func (in *CStorSnapshotInfo) DeepCopyInto(out *CStorSnapshotInfo)

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

type CStorVolume

type CStorVolume struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              CStorVolumeSpec   `json:"spec"`
	Status            CStorVolumeStatus `json:"status"`
	VersionDetails    VersionDetails    `json:"versionDetails"`
}

CStorVolume describes a cstor volume resource created as custom resource

func NewCStorVolume

func NewCStorVolume() *CStorVolume

NewCStorVolume returns new instance of CStorVolume

func NewCStorVolumeObj

func NewCStorVolumeObj(obj *CStorVolume) *CStorVolume

NewCStorVolumeObj returns a new instance of cstorvolume

func (*CStorVolume) AreSpecReplicasHealthy

func (cv *CStorVolume) AreSpecReplicasHealthy(volStatus *CVStatus) bool

AreSpecReplicasHealthy return true if all the spec replicas are in Healthy state else return false

func (*CStorVolume) BuildScaleDownConfigData

func (cv *CStorVolume) BuildScaleDownConfigData(repID string) map[string]string

BuildScaleDownConfigData build data based on replica that needs to remove

func (*CStorVolume) DeepCopy

func (in *CStorVolume) DeepCopy() *CStorVolume

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

func (*CStorVolume) DeepCopyInto

func (in *CStorVolume) DeepCopyInto(out *CStorVolume)

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

func (*CStorVolume) DeepCopyObject

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

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

func (*CStorVolume) GetCVCondition

func (cv *CStorVolume) GetCVCondition(
	condType CStorVolumeConditionType) CStorVolumeCondition

GetCVCondition returns corresponding cstorvolume condition based argument passed

func (*CStorVolume) GetRemovingReplicaID

func (cv *CStorVolume) GetRemovingReplicaID() string

GetRemovingReplicaID return replicaID that present in status but not in spec

func (*CStorVolume) HasFinalizer

func (cv *CStorVolume) HasFinalizer(finalizer string) bool

HasFinalizer returns true if the provided finalizer is present on the ocvject.

func (*CStorVolume) IsConditionPresent

func (cv *CStorVolume) IsConditionPresent(condType CStorVolumeConditionType) bool

IsConditionPresent returns true if condition is available

func (*CStorVolume) IsDRFPending

func (cv *CStorVolume) IsDRFPending() bool

IsDRFPending return true if drf update is required else false Steps to verify whether drf is required 1. Read DesiredReplicationFactor configurations from istgt conf file 2. Compare the value with spec.DesiredReplicationFactor and return result

func (*CStorVolume) IsResizePending

func (cv *CStorVolume) IsResizePending() bool

IsResizePending return true if resize is in progress

func (*CStorVolume) RemoveFinalizer

func (cv *CStorVolume) RemoveFinalizer(finalizer string)

RemoveFinalizer removes the given finalizer from the ocvject.

func (*CStorVolume) WithAnnotations

func (cv *CStorVolume) WithAnnotations(annotations map[string]string) *CStorVolume

WithAnnotations appends or overwrites existing Annotations values of CV with provided arguments

func (*CStorVolume) WithAnnotationsNew

func (cv *CStorVolume) WithAnnotationsNew(annotations map[string]string) *CStorVolume

WithAnnotationsNew sets the Annotations field of CVC with provided arguments

func (*CStorVolume) WithCStorIQN

func (cv *CStorVolume) WithCStorIQN(name string) *CStorVolume

WithCStorIQN sets the iqn field of CStorVolume with provided arguments

func (*CStorVolume) WithCapacity

func (cv *CStorVolume) WithCapacity(capacity string) *CStorVolume

WithCapacity sets the Capacity field of CStorVolume with provided arguments

func (*CStorVolume) WithConsistencyFactor

func (cv *CStorVolume) WithConsistencyFactor(consistencyfactor int) *CStorVolume

WithConsistencyFactor sets the ConsistencyFactor field of CStorVolume with provided arguments

func (*CStorVolume) WithDependentsUpgraded

func (cv *CStorVolume) WithDependentsUpgraded() *CStorVolume

WithDependentsUpgraded sets the field to true for new CV

func (*CStorVolume) WithDesiredReplicationFactor

func (cv *CStorVolume) WithDesiredReplicationFactor(desiredRF int) *CStorVolume

WithDesiredReplicationFactor sets the DesiredReplicationFactor field of CStorVolume with provided arguments

func (*CStorVolume) WithFinalizers

func (cv *CStorVolume) WithFinalizers(finalizers ...string) *CStorVolume

WithFinalizers sets the finalizer field in the CV

func (*CStorVolume) WithLabels

func (cv *CStorVolume) WithLabels(labels map[string]string) *CStorVolume

WithLabels appends or overwrites existing Lacvels values of CVC with provided arguments

func (*CStorVolume) WithLabelsNew

func (cv *CStorVolume) WithLabelsNew(labels map[string]string) *CStorVolume

WithLabelsNew sets the Lacvels field of CV with provided arguments

func (*CStorVolume) WithName

func (cv *CStorVolume) WithName(name string) *CStorVolume

WithName sets the Name field of CVC with provided value.

func (*CStorVolume) WithNamespace

func (cv *CStorVolume) WithNamespace(namespace string) *CStorVolume

WithNamespace sets the Namespace field of CVC provided arguments

func (*CStorVolume) WithNewVersion

func (cv *CStorVolume) WithNewVersion(version string) *CStorVolume

WithNewVersion sets the current and desired version field of CV with provided arguments

func (*CStorVolume) WithOwnerReference

func (cv *CStorVolume) WithOwnerReference(reference []metav1.OwnerReference) *CStorVolume

WithOwnerReference sets the OwnerReference field in CV with required fields

func (*CStorVolume) WithReplicationFactor

func (cv *CStorVolume) WithReplicationFactor(replicationfactor int) *CStorVolume

WithReplicationFactor sets the ReplicationFactor field of CStorVolume with provided arguments

func (*CStorVolume) WithTargetIP

func (cv *CStorVolume) WithTargetIP(targetip string) *CStorVolume

WithTargetIP sets the target IP address field of CStorVolume with provided arguments

func (*CStorVolume) WithTargetPort

func (cv *CStorVolume) WithTargetPort(targetport string) *CStorVolume

WithTargetPort sets the TargetPort field of CStorVolume with provided arguments

func (*CStorVolume) WithTargetPortal

func (cv *CStorVolume) WithTargetPortal(targetportal string) *CStorVolume

WithTargetPortal sets the TargetPortal field of CStorVolume with provided arguments

type CStorVolumeCondition

type CStorVolumeCondition struct {
	Type   CStorVolumeConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=CStorVolumeConditionType"`
	Status ConditionStatus          `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"`
	// Last time we probed the condition.
	// +optional
	LastProbeTime metav1.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
	// Last time the condition transitioned from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
	// Unique, this should be a short, machine understandable string that gives the reason
	// for condition's last transition. If it reports "ResizePending" that means the underlying
	// cstorvolume is being resized.
	// +optional
	Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
	// Human-readable message indicating details about last transition.
	// +optional
	Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
}

CStorVolumeCondition contains details about state of cstorvolume

func GetResizeCondition

func GetResizeCondition() CStorVolumeCondition

GetResizeCondition will return resize condtion related to cstorvolume condtions

func (*CStorVolumeCondition) DeepCopy

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

func (*CStorVolumeCondition) DeepCopyInto

func (in *CStorVolumeCondition) DeepCopyInto(out *CStorVolumeCondition)

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

type CStorVolumeConditionType

type CStorVolumeConditionType string

CStorVolumeConditionType is a valid value of CStorVolumeCondition.Type

const (
	// CStorVolumeResizing - a user trigger resize of pvc has been started
	CStorVolumeResizing CStorVolumeConditionType = "Resizing"
)

type CStorVolumeConfig

type CStorVolumeConfig struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Spec defines a specification of a cstor volume config required
	// to provisione cstor volume resources
	Spec CStorVolumeConfigSpec `json:"spec"`

	// Publish contains info related to attachment of a volume to a node.
	// i.e. NodeId etc.
	Publish CStorVolumeConfigPublish `json:"publish,omitempty"`

	// Status represents the current information/status for the cstor volume
	// config, populated by the controller.
	Status         CStorVolumeConfigStatus `json:"status"`
	VersionDetails VersionDetails          `json:"versionDetails"`
}

CStorVolumeConfig describes a cstor volume config resource created as custom resource. CStorVolumeConfig is a request for creating cstor volume related resources like deployment, svc etc.

func NewCStorVolumeConfig

func NewCStorVolumeConfig() *CStorVolumeConfig

NewCStorVolumeConfig returns new instance of CStorVolumeConfig

func (*CStorVolumeConfig) DeepCopy

func (in *CStorVolumeConfig) DeepCopy() *CStorVolumeConfig

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

func (*CStorVolumeConfig) DeepCopyInto

func (in *CStorVolumeConfig) DeepCopyInto(out *CStorVolumeConfig)

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

func (*CStorVolumeConfig) DeepCopyObject

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

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

func (*CStorVolumeConfig) HasFinalizer

func (cvc *CStorVolumeConfig) HasFinalizer(finalizer string) bool

HasFinalizer returns true if the provided finalizer is present on the ocvject.

func (*CStorVolumeConfig) RemoveFinalizer

func (cvc *CStorVolumeConfig) RemoveFinalizer(finalizer string)

RemoveFinalizer removes the given finalizer from the ocvject.

func (*CStorVolumeConfig) WithAnnotations

func (cvc *CStorVolumeConfig) WithAnnotations(annotations map[string]string) *CStorVolumeConfig

WithAnnotations appends or overwrites existing Annotations values of CVC with provided arguments

func (*CStorVolumeConfig) WithAnnotationsNew

func (cvc *CStorVolumeConfig) WithAnnotationsNew(annotations map[string]string) *CStorVolumeConfig

WithAnnotationsNew sets the Annotations field of CVC with provided arguments

func (*CStorVolumeConfig) WithDependentsUpgraded

func (cvc *CStorVolumeConfig) WithDependentsUpgraded() *CStorVolumeConfig

WithDependentsUpgraded sets the field to true for new CVC

func (*CStorVolumeConfig) WithFinalizer

func (cvc *CStorVolumeConfig) WithFinalizer(finalizers ...string) *CStorVolumeConfig

WithFinalizer sets the finalizer field in the CVC

func (*CStorVolumeConfig) WithLabels

func (cvc *CStorVolumeConfig) WithLabels(labels map[string]string) *CStorVolumeConfig

WithLabels appends or overwrites existing Lacvels values of CVC with provided arguments

func (*CStorVolumeConfig) WithLabelsNew

func (cvc *CStorVolumeConfig) WithLabelsNew(labels map[string]string) *CStorVolumeConfig

WithLabelsNew sets the Lacvels field of CVC with provided arguments

func (*CStorVolumeConfig) WithName

func (cvc *CStorVolumeConfig) WithName(name string) *CStorVolumeConfig

WithName sets the Name field of CVC with provided value.

func (*CStorVolumeConfig) WithNamespace

func (cvc *CStorVolumeConfig) WithNamespace(namespace string) *CStorVolumeConfig

WithNamespace sets the Namespace field of CVC provided arguments

func (*CStorVolumeConfig) WithNewVersion

func (cvc *CStorVolumeConfig) WithNewVersion(version string) *CStorVolumeConfig

WithNewVersion sets the current and desired version field of CVC with provided arguments

func (*CStorVolumeConfig) WithOwnerReference

func (cvc *CStorVolumeConfig) WithOwnerReference(reference metav1.OwnerReference) *CStorVolumeConfig

WithOwnerReference sets the OwnerReference field in CVC with required fields

type CStorVolumeConfigCondition

type CStorVolumeConfigCondition struct {
	// Current Condition of cstor volume config. If underlying persistent volume is being
	// resized then the Condition will be set to 'ResizeStarted' etc
	Type CStorVolumeConfigConditionType `json:"type"`
	// Last time we probed the condition.
	// +optional
	LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"`
	// Last time the condition transitioned from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// Reason is a brief CamelCase string that describes any failure
	Reason string `json:"reason"`
	// Human-readable message indicating details about last transition.
	Message string `json:"message"`
}

CStorVolumeConfigCondition contains details about state of cstor volume

func (*CStorVolumeConfigCondition) DeepCopy

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

func (*CStorVolumeConfigCondition) DeepCopyInto

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

type CStorVolumeConfigConditionType

type CStorVolumeConfigConditionType string

CStorVolumeConfigConditionType is a valid value of CstorVolumeConfigCondition.Type

const (
	// CStorVolumeConfigResizePending ...
	CStorVolumeConfigResizing CStorVolumeConfigConditionType = "Resizing"
	// CStorVolumeConfigResizeFailed ...
	CStorVolumeConfigResizeFailed CStorVolumeConfigConditionType = "VolumeResizeFailed"
	// CStorVolumeConfigResizeSuccess ...
	CStorVolumeConfigResizeSuccess CStorVolumeConfigConditionType = "VolumeResizeSuccessful"
	// CStorVolumeConfigResizePending ...
	CStorVolumeConfigResizePending CStorVolumeConfigConditionType = "VolumeResizePending"
)

These constants are CVC condition types related to resize operation.

type CStorVolumeConfigList

type CStorVolumeConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []CStorVolumeConfig `json:"items"`
}

CStorVolumeConfigList is a list of CStorVolumeConfig resources

func (*CStorVolumeConfigList) DeepCopy

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

func (*CStorVolumeConfigList) DeepCopyInto

func (in *CStorVolumeConfigList) DeepCopyInto(out *CStorVolumeConfigList)

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

func (*CStorVolumeConfigList) DeepCopyObject

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

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

type CStorVolumeConfigPhase

type CStorVolumeConfigPhase string

CStorVolumeConfigPhase represents the current phase of CStorVolumeConfig.

const (
	//CStorVolumeConfigPhasePending indicates that the cvc is still waiting for
	//the cstorvolume to be created and bound
	CStorVolumeConfigPhasePending CStorVolumeConfigPhase = "Pending"

	//CStorVolumeConfigPhaseBound indiacates that the cstorvolume has been
	//provisioned and bound to the cstor volume config
	CStorVolumeConfigPhaseBound CStorVolumeConfigPhase = "Bound"

	//CStorVolumeConfigPhaseFailed indiacates that the cstorvolume provisioning
	//has failed
	CStorVolumeConfigPhaseFailed CStorVolumeConfigPhase = "Failed"
)

type CStorVolumeConfigPublish

type CStorVolumeConfigPublish struct {
	// NodeID contains publish info related to attachment of a volume to a node.
	NodeID string `json:"nodeId,omitempty"`
}

CStorVolumeConfigPublish contains info related to attachment of a volume to a node. i.e. NodeId etc.

func (*CStorVolumeConfigPublish) DeepCopy

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

func (*CStorVolumeConfigPublish) DeepCopyInto

func (in *CStorVolumeConfigPublish) DeepCopyInto(out *CStorVolumeConfigPublish)

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

type CStorVolumeConfigSpec

type CStorVolumeConfigSpec struct {
	// Capacity represents the actual resources of the underlying
	// cstor volume.
	Capacity corev1.ResourceList `json:"capacity"`
	// CStorVolumeRef has the information about where CstorVolumeClaim
	// is created from.
	CStorVolumeRef *corev1.ObjectReference `json:"cstorVolumeRef,omitempty"`
	// CStorVolumeSource contains the source volumeName@snapShotname
	// combaination.  This will be filled only if it is a clone creation.
	CStorVolumeSource string `json:"cstorVolumeSource,omitempty"`
	// Provision represents the initial volume configuration for the underlying
	// cstor volume based on the persistent volume request by user. Provision
	// properties are immutable
	Provision VolumeProvision `json:"provision"`
	// Policy contains volume specific required policies target and replicas
	Policy CStorVolumePolicySpec `json:"policy"`
}

CStorVolumeConfigSpec is the spec for a CStorVolumeConfig resource

func (*CStorVolumeConfigSpec) DeepCopy

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

func (*CStorVolumeConfigSpec) DeepCopyInto

func (in *CStorVolumeConfigSpec) DeepCopyInto(out *CStorVolumeConfigSpec)

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

type CStorVolumeConfigStatus

type CStorVolumeConfigStatus struct {
	// Phase represents the current phase of CStorVolumeConfig.
	Phase CStorVolumeConfigPhase `json:"phase"`

	// PoolInfo represents current pool names where volume replicas exists
	PoolInfo []string `json:"poolInfo"`

	// Capacity the actual resources of the underlying volume.
	Capacity corev1.ResourceList `json:"capacity,omitempty"`

	Conditions []CStorVolumeConfigCondition `json:"condition,omitempty"`
}

CStorVolumeConfigStatus is for handling status of CstorVolume Claim. defines the observed state of CStorVolumeConfig

func (*CStorVolumeConfigStatus) DeepCopy

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

func (*CStorVolumeConfigStatus) DeepCopyInto

func (in *CStorVolumeConfigStatus) DeepCopyInto(out *CStorVolumeConfigStatus)

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

type CStorVolumeList

type CStorVolumeList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []CStorVolume `json:"items"`
}

CStorVolumeList is a list of CStorVolume resources

func (*CStorVolumeList) DeepCopy

func (in *CStorVolumeList) DeepCopy() *CStorVolumeList

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

func (*CStorVolumeList) DeepCopyInto

func (in *CStorVolumeList) DeepCopyInto(out *CStorVolumeList)

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

func (*CStorVolumeList) DeepCopyObject

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

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

type CStorVolumePhase

type CStorVolumePhase string

CStorVolumePhase is to hold result of action.

type CStorVolumePolicy

type CStorVolumePolicy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Spec defines a configuration info of a cstor volume required
	// to provisione cstor volume resources
	Spec   CStorVolumePolicySpec   `json:"spec"`
	Status CStorVolumePolicyStatus `json:"status"`
}

CStorVolumePolicy describes a configuration required for cstor volume resources

func (*CStorVolumePolicy) DeepCopy

func (in *CStorVolumePolicy) DeepCopy() *CStorVolumePolicy

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

func (*CStorVolumePolicy) DeepCopyInto

func (in *CStorVolumePolicy) DeepCopyInto(out *CStorVolumePolicy)

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

func (*CStorVolumePolicy) DeepCopyObject

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

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

type CStorVolumePolicyList

type CStorVolumePolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []CStorVolumePolicy `json:"items"`
}

CStorVolumePolicyList is a list of CStorVolumePolicy resources

func (*CStorVolumePolicyList) DeepCopy

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

func (*CStorVolumePolicyList) DeepCopyInto

func (in *CStorVolumePolicyList) DeepCopyInto(out *CStorVolumePolicyList)

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

func (*CStorVolumePolicyList) DeepCopyObject

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

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

type CStorVolumePolicySpec

type CStorVolumePolicySpec struct {
	// replicaAffinity is set to true then volume replica resources need to be
	// distributed across the pool instances
	Provision Provision `json:"provision"`

	// TargetSpec represents configuration related to cstor target and its resources
	Target TargetSpec `json:"target"`

	// ReplicaSpec represents configuration related to replicas resources
	Replica ReplicaSpec `json:"replica"`

	// ReplicaPoolInfo holds the pool information of volume replicas.
	// Ex: If volume is provisioned on which CStor pool volume replicas exist
	ReplicaPoolInfo []ReplicaPoolInfo `json:"replicaPoolInfo"`
}

CStorVolumePolicySpec ...

func (*CStorVolumePolicySpec) DeepCopy

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

func (*CStorVolumePolicySpec) DeepCopyInto

func (in *CStorVolumePolicySpec) DeepCopyInto(out *CStorVolumePolicySpec)

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

type CStorVolumePolicyStatus

type CStorVolumePolicyStatus struct {
	Phase string `json:"phase"`
}

CStorVolumePolicyStatus is for handling status of CstorVolumePolicy

func (*CStorVolumePolicyStatus) DeepCopy

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

func (*CStorVolumePolicyStatus) DeepCopyInto

func (in *CStorVolumePolicyStatus) DeepCopyInto(out *CStorVolumePolicyStatus)

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

type CStorVolumeReplica

type CStorVolumeReplica struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              CStorVolumeReplicaSpec   `json:"spec"`
	Status            CStorVolumeReplicaStatus `json:"status"`
	VersionDetails    VersionDetails           `json:"versionDetails"`
}

CStorVolumeReplica describes a cstor volume resource created as custom resource

func NewCStorVolumeReplica

func NewCStorVolumeReplica() *CStorVolumeReplica

NewCStorVolumeReplica returns new instance of CStorVolumeReplica

func (*CStorVolumeReplica) DeepCopy

func (in *CStorVolumeReplica) DeepCopy() *CStorVolumeReplica

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

func (*CStorVolumeReplica) DeepCopyInto

func (in *CStorVolumeReplica) DeepCopyInto(out *CStorVolumeReplica)

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

func (*CStorVolumeReplica) DeepCopyObject

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

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

func (*CStorVolumeReplica) HasFinalizer

func (cvr *CStorVolumeReplica) HasFinalizer(finalizer string) bool

HasFinalizer returns true if the provided finalizer is present on the ocvrject.

func (*CStorVolumeReplica) RemoveFinalizer

func (cvr *CStorVolumeReplica) RemoveFinalizer(finalizer string)

RemoveFinalizer removes the given finalizer from the ocvrject.

func (*CStorVolumeReplica) WithAnnotations

func (cvr *CStorVolumeReplica) WithAnnotations(annotations map[string]string) *CStorVolumeReplica

WithAnnotations appends or overwrites existing Annotations values of CV with provided arguments

func (*CStorVolumeReplica) WithAnnotationsNew

func (cvr *CStorVolumeReplica) WithAnnotationsNew(annotations map[string]string) *CStorVolumeReplica

WithAnnotationsNew sets the Annotations field of CVC with provided arguments

func (*CStorVolumeReplica) WithCapacity

func (cvr *CStorVolumeReplica) WithCapacity(capacity string) *CStorVolumeReplica

WithCapacity sets the Capacity field of CStorVolumeReplica with provided arguments

func (*CStorVolumeReplica) WithCompression added in v1.12.0

func (cvr *CStorVolumeReplica) WithCompression(compression string) *CStorVolumeReplica

WithCWithCompression sets the compression algorithm with the provided arguments

func (*CStorVolumeReplica) WithDependentsUpgraded

func (cvr *CStorVolumeReplica) WithDependentsUpgraded() *CStorVolumeReplica

WithDependentsUpgraded sets the field to true for new CV

func (*CStorVolumeReplica) WithFinalizers

func (cvr *CStorVolumeReplica) WithFinalizers(finalizers ...string) *CStorVolumeReplica

WithFinalizers sets the finalizer field in the CV

func (*CStorVolumeReplica) WithLabels

func (cvr *CStorVolumeReplica) WithLabels(labels map[string]string) *CStorVolumeReplica

WithLabels appends or overwrites existing Lacvrels values of CVC with provided arguments

func (*CStorVolumeReplica) WithLabelsNew

func (cvr *CStorVolumeReplica) WithLabelsNew(labels map[string]string) *CStorVolumeReplica

WithLabelsNew sets the Lacvrels field of CV with provided arguments

func (*CStorVolumeReplica) WithName

func (cvr *CStorVolumeReplica) WithName(name string) *CStorVolumeReplica

WithName sets the Name field of CVR with provided value.

func (*CStorVolumeReplica) WithNamespace

func (cvr *CStorVolumeReplica) WithNamespace(namespace string) *CStorVolumeReplica

WithNamespace sets the Namespace field of CVC provided arguments

func (*CStorVolumeReplica) WithNewVersion

func (cvr *CStorVolumeReplica) WithNewVersion(version string) *CStorVolumeReplica

WithNewVersion sets the current and desired version field of CV with provided arguments

func (*CStorVolumeReplica) WithOwnerReference

func (cvr *CStorVolumeReplica) WithOwnerReference(reference []metav1.OwnerReference) *CStorVolumeReplica

WithOwnerReference sets the OwnerReference field in CV with required fields

func (*CStorVolumeReplica) WithReplicaID

func (cvr *CStorVolumeReplica) WithReplicaID(replicaID string) *CStorVolumeReplica

WithReplicaID sets the replicaID with the provided arguments

func (*CStorVolumeReplica) WithStatusPhase

func (cvr *CStorVolumeReplica) WithStatusPhase(phase CStorVolumeReplicaPhase) *CStorVolumeReplica

WithStatusPhase sets the Status Phase of CStorVolumeReplica with provided arguments

func (*CStorVolumeReplica) WithTargetIP

func (cvr *CStorVolumeReplica) WithTargetIP(targetip string) *CStorVolumeReplica

WithTargetIP sets the target IP address field of CStorVolumeReplica with provided arguments

func (*CStorVolumeReplica) WithZvolWorkers added in v1.12.0

func (cvr *CStorVolumeReplica) WithZvolWorkers(zvolworker string) *CStorVolumeReplica

WithZvolWorkers sets the zvolworkers with the provided arguments

type CStorVolumeReplicaCapacityDetails

type CStorVolumeReplicaCapacityDetails struct {
	// The amount of space consumed by this volume replica and all its descendents
	Total string `json:"total"`
	// The amount of space that is "logically" accessible by this dataset. The logical
	// space ignores the effect of the compression and copies properties, giving a
	// quantity closer to the amount of data that applications see.  However, it does
	// include space consumed by metadata
	Used string `json:"used"`
}

CStorVolumeReplicaCapacityDetails represents capacity information releated to volume replica

func (*CStorVolumeReplicaCapacityDetails) DeepCopy

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

func (*CStorVolumeReplicaCapacityDetails) DeepCopyInto

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

type CStorVolumeReplicaDetails

type CStorVolumeReplicaDetails struct {
	// KnownReplicas represents the replicas that target can trust to read data
	KnownReplicas map[ReplicaID]string `json:"knownReplicas,omitempty"`
}

CStorVolumeReplicaDetails contains trusty replica inform which will be updated by target

func (*CStorVolumeReplicaDetails) DeepCopy

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

func (*CStorVolumeReplicaDetails) DeepCopyInto

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

type CStorVolumeReplicaList

type CStorVolumeReplicaList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []CStorVolumeReplica `json:"items"`
}

CStorVolumeReplicaList is a list of CStorVolumeReplica resources

func (*CStorVolumeReplicaList) DeepCopy

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

func (*CStorVolumeReplicaList) DeepCopyInto

func (in *CStorVolumeReplicaList) DeepCopyInto(out *CStorVolumeReplicaList)

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

func (*CStorVolumeReplicaList) DeepCopyObject

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

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

type CStorVolumeReplicaPhase

type CStorVolumeReplicaPhase string

CStorVolumeReplicaPhase is to hold result of action.

const (

	// CVRStatusEmpty describes CVR resource is created but not yet monitored by
	// controller(i.e resource is just created)
	CVRStatusEmpty CStorVolumeReplicaPhase = ""

	// CVRStatusOnline describes volume replica is Healthy and data existing on
	// the healthy replica is up to date
	CVRStatusOnline CStorVolumeReplicaPhase = "Healthy"

	// CVRStatusOffline describes volume replica is created but not yet connected
	// to the target
	CVRStatusOffline CStorVolumeReplicaPhase = "Offline"

	// CVRStatusDegraded describes volume replica is connected to the target and
	// rebuilding from other replicas is not yet started but ready for serving
	// IO's
	CVRStatusDegraded CStorVolumeReplicaPhase = "Degraded"

	// CVRStatusNewReplicaDegraded describes replica is recreated (due to pool
	// recreation[underlying disk got changed]/volume replica scaleup cases) and
	// just connected to the target. Volume replica has to start reconstructing
	// entier data from another available healthy replica. Until volume replica
	// becomes healthy whatever data written to it is lost(NewReplica also not part
	// of any quorum decision)
	CVRStatusNewReplicaDegraded CStorVolumeReplicaPhase = "NewReplicaDegraded"

	// CVRStatusRebuilding describes volume replica has missing data and it
	// started rebuilding missing data from other replicas
	CVRStatusRebuilding CStorVolumeReplicaPhase = "Rebuilding"

	// CVRStatusReconstructingNewReplica describes volume replica is recreated
	// and it started reconstructing entier data from other healthy replica
	CVRStatusReconstructingNewReplica CStorVolumeReplicaPhase = "ReconstructingNewReplica"

	// CVRStatusError describes either volume replica is not exist in cstor pool
	CVRStatusError CStorVolumeReplicaPhase = "Error"

	// CVRStatusDeletionFailed describes volume replica deletion is failed
	CVRStatusDeletionFailed CStorVolumeReplicaPhase = "DeletionFailed"

	// CVRStatusInvalid ensures invalid resource(currently not honoring)
	CVRStatusInvalid CStorVolumeReplicaPhase = "Invalid"

	// CVRStatusInit describes CVR resource is newly created but it is not yet
	// created zfs dataset
	CVRStatusInit CStorVolumeReplicaPhase = "Init"

	// CVRStatusRecreate describes the volume replica is recreated due to pool
	// recreation/scaleup
	CVRStatusRecreate CStorVolumeReplicaPhase = "Recreate"
)

Status written onto CStorVolumeReplica objects.

type CStorVolumeReplicaSpec

type CStorVolumeReplicaSpec struct {
	// TargetIP represents iscsi target IP through which replica cummunicates
	// IO workloads and other volume operations like snapshot and resize requests
	TargetIP string `json:"targetIP"`
	//Represents the actual capacity of the underlying volume
	Capacity string `json:"capacity"`
	// ZvolWorkers represents number of threads that executes client IOs
	ZvolWorkers string `json:"zvolWorkers"`
	// ReplicaID is unique number to identify the replica
	ReplicaID string `json:"replicaid"`
	// Controls the compression algorithm used for this volumes
	// examples: on|off|gzip|gzip-N|lz4|lzjb|zle
	Compression string `json:"compression"`
	// BlockSize is the logical block size in multiple of 512 bytes
	// BlockSize specifies the block size of the volume. The blocksize
	// cannot be changed once the volume has been written, so it should be
	// set at volume creation time. The default blocksize for volumes is 4 Kbytes.
	// Any power of 2 from 512 bytes to 128 Kbytes is valid.
	BlockSize uint32 `json:"blockSize"`
}

CStorVolumeReplicaSpec is the spec for a CStorVolumeReplica resource

func (*CStorVolumeReplicaSpec) DeepCopy

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

func (*CStorVolumeReplicaSpec) DeepCopyInto

func (in *CStorVolumeReplicaSpec) DeepCopyInto(out *CStorVolumeReplicaSpec)

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

type CStorVolumeReplicaStatus

type CStorVolumeReplicaStatus struct {
	// CStorVolumeReplicaPhase is to holds different phases of replica
	Phase CStorVolumeReplicaPhase `json:"phase"`

	// CStorVolumeCapacityDetails represents capacity info of replica
	Capacity CStorVolumeReplicaCapacityDetails `json:"capacity"`

	// LastTransitionTime refers to the time when the phase changes
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`

	// The last updated time
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`

	// A human readable message indicating details about the transition.
	Message string `json:"message,omitempty"`

	// Snapshots contains list of snapshots, and their properties,
	// created on CVR
	Snapshots map[string]CStorSnapshotInfo `json:"snapshots,omitempty"`

	// PendingSnapshots contains list of pending snapshots that are not yet
	// available on this replica
	PendingSnapshots map[string]CStorSnapshotInfo `json:"pendingSnapshots,omitempty"`
}

CStorVolumeReplicaStatus is for handling status of cvr.

func (*CStorVolumeReplicaStatus) DeepCopy

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

func (*CStorVolumeReplicaStatus) DeepCopyInto

func (in *CStorVolumeReplicaStatus) DeepCopyInto(out *CStorVolumeReplicaStatus)

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

type CStorVolumeSpec

type CStorVolumeSpec struct {
	// Capacity represents the desired size of the underlying volume.
	Capacity resource.Quantity `json:"capacity"`

	// TargetIP IP of the iSCSI target service
	TargetIP string `json:"targetIP"`

	// iSCSI Target Port typically TCP ports 3260
	TargetPort string `json:"targetPort"`

	// Target iSCSI Qualified Name.combination of nodeBase
	Iqn string `json:"iqn"`

	// iSCSI Target Portal. The Portal is combination of IP:port (typically TCP ports 3260)
	TargetPortal string `json:"targetPortal"`

	// ReplicationFactor represents number of volume replica created during volume
	// provisioning connect to the target
	ReplicationFactor int `json:"replicationFactor"`

	// ConsistencyFactor is minimum number of volume replicas i.e. `RF/2 + 1`
	// has to be connected to the target for write operations. Basically more then
	// 50% of replica has to be connected to target.
	ConsistencyFactor int `json:"consistencyFactor"`

	// DesiredReplicationFactor represents maximum number of replicas
	// that are allowed to connect to the target. Required for scale operations
	DesiredReplicationFactor int `json:"desiredReplicationFactor"`

	//ReplicaDetails refers to the trusty replica information
	ReplicaDetails CStorVolumeReplicaDetails `json:"replicaDetails,omitempty"`
}

CStorVolumeSpec is the spec for a CStorVolume resource

func (*CStorVolumeSpec) DeepCopy

func (in *CStorVolumeSpec) DeepCopy() *CStorVolumeSpec

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

func (*CStorVolumeSpec) DeepCopyInto

func (in *CStorVolumeSpec) DeepCopyInto(out *CStorVolumeSpec)

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

type CStorVolumeStatus

type CStorVolumeStatus struct {
	Phase           CStorVolumePhase `json:"phase"`
	ReplicaStatuses []ReplicaStatus  `json:"replicaStatuses,omitempty"`
	// Represents the actual capacity of the underlying volume.
	Capacity resource.Quantity `json:"capacity,omitempty"`
	// LastTransitionTime refers to the time when the phase changes
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// LastUpdateTime refers to the time when last status updated due to any
	// operations
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
	// A human-readable message indicating details about why the volume is in this state.
	Message string `json:"message,omitempty"`
	// Current Condition of cstorvolume. If underlying persistent volume is being
	// resized then the Condition will be set to 'ResizePending'.
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	Conditions []CStorVolumeCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,4,rep,name=conditions"`
	// ReplicaDetails refers to the trusty replica information
	ReplicaDetails CStorVolumeReplicaDetails `json:"replicaDetails,omitempty"`
}

CStorVolumeStatus is for handling status of cvr.

func (*CStorVolumeStatus) DeepCopy

func (in *CStorVolumeStatus) DeepCopy() *CStorVolumeStatus

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

func (*CStorVolumeStatus) DeepCopyInto

func (in *CStorVolumeStatus) DeepCopyInto(out *CStorVolumeStatus)

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

type CVRKey

type CVRKey string

CVRKey represents the properties of a cstorvolumereplica

const (
	// CloneEnableKEY is used to enable/disable cloning for a cstorvolumereplica
	CloneEnableKEY CVRKey = "openebs.io/cloned"

	// SourceVolumeKey stores the name of source volume whose snapshot is used to
	// create this cvr
	SourceVolumeKey CVRKey = "openebs.io/source-volume"

	// SnapshotNameKey stores the name of the snapshot being used to restore this replica
	SnapshotNameKey CVRKey = "openebs.io/snapshot"
)

type CVStatus

type CVStatus struct {
	Name            string          `json:"name"`
	Status          string          `json:"status"`
	ReplicaStatuses []ReplicaStatus `json:"replicaStatus"`
}

CVStatus stores the status of a CstorVolume obtained from response

func (*CVStatus) DeepCopy

func (in *CVStatus) DeepCopy() *CVStatus

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

func (*CVStatus) DeepCopyInto

func (in *CVStatus) DeepCopyInto(out *CVStatus)

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

type CVStatusResponse

type CVStatusResponse struct {
	CVStatuses []CVStatus `json:"volumeStatus"`
}

CVStatusResponse stores the reponse of istgt replica command output It may contain several volumes

func (*CVStatusResponse) DeepCopy

func (in *CVStatusResponse) DeepCopy() *CVStatusResponse

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

func (*CVStatusResponse) DeepCopyInto

func (in *CVStatusResponse) DeepCopyInto(out *CVStatusResponse)

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

type ConditionStatus

type ConditionStatus string

ConditionStatus states in which state condition is present

const (
	// ConditionInProgress states resize of underlying volumes are in progress
	ConditionInProgress ConditionStatus = "InProgress"
	// ConditionSuccess states resizing underlying volumes are successfull
	ConditionSuccess ConditionStatus = "Success"
)

These are valid condition statuses. "ConditionInProgress" means corresponding condition is inprogress. "ConditionSuccess" means corresponding condition is success

type Conditions

type Conditions []CStorVolumeCondition

Conditions enables building CRUD operations on cstorvolume conditions

func (Conditions) AddCondition

func (c Conditions) AddCondition(cond CStorVolumeCondition) []CStorVolumeCondition

AddCondition appends the new condition to existing conditions

func (Conditions) DeepCopy

func (in Conditions) DeepCopy() Conditions

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

func (Conditions) DeepCopyInto

func (in Conditions) DeepCopyInto(out *Conditions)

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

func (Conditions) DeleteCondition

func (c Conditions) DeleteCondition(cond CStorVolumeCondition) []CStorVolumeCondition

DeleteCondition deletes the condition from conditions

func (Conditions) UpdateCondition

func (c Conditions) UpdateCondition(cond CStorVolumeCondition) []CStorVolumeCondition

UpdateCondition updates the condition if it is present in Conditions

type PoolConfig

type PoolConfig struct {
	// DataRaidGroupType is the  raid type.
	DataRaidGroupType string `json:"dataRaidGroupType"`

	// WriteCacheGroupType is the write cache raid type.
	WriteCacheGroupType string `json:"writeCacheGroupType"`

	// ThickProvision to enable thick provisioning
	// Optional -- defaults to false
	ThickProvision bool `json:"thickProvision"`
	// Compression to enable compression
	// Optional -- defaults to off
	// Possible values : lz, off
	Compression string `json:"compression"`
	// Resources are the compute resources required by the cstor-pool
	// container.
	Resources *corev1.ResourceRequirements `json:"resources"`
	// AuxResources are the compute resources required by the cstor-pool pod
	// side car containers.
	AuxResources *corev1.ResourceRequirements `json:"auxResources"`
	// Tolerations, if specified, the pool pod's tolerations.
	Tolerations []corev1.Toleration `json:"tolerations"`

	// PriorityClassName if specified applies to this pool pod
	// If left empty, DefaultPriorityClassName is applied.
	// (See CStorPoolClusterSpec.DefaultPriorityClassName)
	// If both are empty, not priority class is applied.
	PriorityClassName *string `json:"priorityClassName"`

	// ROThresholdLimit is threshold(percentage base) limit
	// for pool read only mode. If ROThresholdLimit(%) amount
	// of pool storage is reached then pool will set to readonly.
	// NOTE:
	// 1. If ROThresholdLimit is set to 100 then entire
	//    pool storage will be used by default it will be set to 85%.
	// 2. ROThresholdLimit value will be 0 <= ROThresholdLimit <= 100.
	ROThresholdLimit *int `json:"roThresholdLimit"` //optional
}

PoolConfig is the default pool config that applies to the pool on node.

func NewPoolConfig

func NewPoolConfig() *PoolConfig

func (*PoolConfig) DeepCopy

func (in *PoolConfig) DeepCopy() *PoolConfig

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

func (*PoolConfig) DeepCopyInto

func (in *PoolConfig) DeepCopyInto(out *PoolConfig)

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

func (*PoolConfig) WithAuxResources

func (pc *PoolConfig) WithAuxResources(auxResources *corev1.ResourceRequirements) *PoolConfig

WithAuxResources sets the auxResources field in PoolConfig

func (*PoolConfig) WithDataRaidGroupType

func (pc *PoolConfig) WithDataRaidGroupType(dataRaidGroupType string) *PoolConfig

WithDataRaidGroupType sets the DataRaidGroupType field in PoolConfig

func (*PoolConfig) WithPriorityClassName

func (pc *PoolConfig) WithPriorityClassName(priorityClassName *string) *PoolConfig

WithPriorityClassName sets the PriorityClassName field in PoolConfig

func (*PoolConfig) WithROThresholdLimit

func (pc *PoolConfig) WithROThresholdLimit(rOThresholdLimit *int) *PoolConfig

WithROThresholdLimit sets the ROThresholdLimit field in PoolConfig

func (*PoolConfig) WithResources

func (pc *PoolConfig) WithResources(resources *corev1.ResourceRequirements) *PoolConfig

WithResources sets the Resources field in PoolConfig

func (*PoolConfig) WithThickProvision

func (pc *PoolConfig) WithThickProvision(thickProvision bool) *PoolConfig

WithThickProvision sets the ThickProvision field in PoolConfig

func (*PoolConfig) WithTolerations

func (pc *PoolConfig) WithTolerations(tolerations []corev1.Toleration) *PoolConfig

WithTolerations sets the Tolerations field in PoolConfig

func (*PoolConfig) WithWriteCacheGroupType

func (pc *PoolConfig) WithWriteCacheGroupType(writeCacheGroupType string) *PoolConfig

WithWriteCacheGroupType sets the WriteCacheGroupType field in PoolConfig

type PoolSpec

type PoolSpec struct {
	// NodeSelector is the labels that will be used to select
	// a node for pool provisioning.
	// Required field
	NodeSelector map[string]string `json:"nodeSelector"`
	// DataRaidGroups is the raid group configuration for the given pool.
	DataRaidGroups []RaidGroup `json:"dataRaidGroups"`
	// WriteCacheRaidGroups is the write cache raid group.
	WriteCacheRaidGroups []RaidGroup `json:"writeCacheRaidGroups"`
	// PoolConfig is the default pool config that applies to the
	// pool on node.
	PoolConfig PoolConfig `json:"poolConfig"`
}

PoolSpec is the spec for pool on node where it should be created.

func NewPoolSpec

func NewPoolSpec() *PoolSpec

func (*PoolSpec) DeepCopy

func (in *PoolSpec) DeepCopy() *PoolSpec

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

func (*PoolSpec) DeepCopyInto

func (in *PoolSpec) DeepCopyInto(out *PoolSpec)

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

func (*PoolSpec) WithDataRaidGroups

func (ps *PoolSpec) WithDataRaidGroups(dataRaidGroups ...RaidGroup) *PoolSpec

WithDataRaidGroups sets the DataRaidGroups field in poolSpec

func (*PoolSpec) WithNodeSelector

func (ps *PoolSpec) WithNodeSelector(nodeSelector map[string]string) *PoolSpec

WithNodeSelector sets the NodeSelector field in poolSpec

func (*PoolSpec) WithPoolConfig

func (ps *PoolSpec) WithPoolConfig(poolConfig PoolConfig) *PoolSpec

WithPoolConfig sets the PoolConfig field in poolSpec

func (*PoolSpec) WithWriteCacheRaidGroups

func (ps *PoolSpec) WithWriteCacheRaidGroups(writeCacheRaidGroups ...RaidGroup) *PoolSpec

WithWriteCacheRaidGroups sets the WriteCacheRaidGroups field in poolSpec

type PoolType

type PoolType string

PoolType is a label for the pool type of a cStor pool.

const (
	// PoolStriped is the striped raid group.
	PoolStriped PoolType = "stripe"
	// PoolMirrored is the mirror raid group.
	PoolMirrored PoolType = "mirror"
	// PoolRaidz is the raidz raid group.
	PoolRaidz PoolType = "raidz"
	// PoolRaidz2 is the raidz2 raid group.
	PoolRaidz2 PoolType = "raidz2"
)

These are the valid pool types of cStor Pool.

type Provision

type Provision struct {
	// replicaAffinity is set to true then volume replica resources need to be
	// distributed across the cstor pool instances based on the given topology
	ReplicaAffinity bool `json:"replicaAffinity"`
	// BlockSize is the logical block size in multiple of 512 bytes
	// BlockSize specifies the block size of the volume. The blocksize
	// cannot be changed once the volume has been written, so it should be
	// set at volume creation time. The default blocksize for volumes is 4 Kbytes.
	// Any power of 2 from 512 bytes to 128 Kbytes is valid.
	BlockSize uint32 `json:"blockSize,omitempty"`
}

Provision represents different provisioning policy for cstor volumes

func (*Provision) DeepCopy

func (in *Provision) DeepCopy() *Provision

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

func (*Provision) DeepCopyInto

func (in *Provision) DeepCopyInto(out *Provision)

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

type RaidGroup

type RaidGroup struct {
	CStorPoolInstanceBlockDevices []CStorPoolInstanceBlockDevice `json:"blockDevices"`
}

RaidGroup contains the details of a raid group for the pool

func NewRaidGroup

func NewRaidGroup() *RaidGroup

NewRaidGroup returns an empty instance of raid group

func (*RaidGroup) DeepCopy

func (in *RaidGroup) DeepCopy() *RaidGroup

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

func (*RaidGroup) DeepCopyInto

func (in *RaidGroup) DeepCopyInto(out *RaidGroup)

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

func (RaidGroup) GetBlockDevices

func (rg RaidGroup) GetBlockDevices() []string

GetBlockDevices returns list of blockdevice names exist in the raid group

func (*RaidGroup) WithCStorPoolInstanceBlockDevices

func (rg *RaidGroup) WithCStorPoolInstanceBlockDevices(cStorPoolInstanceBlockDevices ...CStorPoolInstanceBlockDevice) *RaidGroup

WithROThresholdLimit sets the ROThresholdLimit field in PoolConfig

type ReplicaID

type ReplicaID string

ReplicaID is to hold replicaID information

type ReplicaPoolInfo

type ReplicaPoolInfo struct {
	// PoolName represents the pool name where volume replica exists
	PoolName string `json:"poolName"`
}

ReplicaPoolInfo represents the pool information of volume replica

func (*ReplicaPoolInfo) DeepCopy

func (in *ReplicaPoolInfo) DeepCopy() *ReplicaPoolInfo

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

func (*ReplicaPoolInfo) DeepCopyInto

func (in *ReplicaPoolInfo) DeepCopyInto(out *ReplicaPoolInfo)

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

type ReplicaSpec

type ReplicaSpec struct {
	// IOWorkers represents number of threads that executes client IOs
	IOWorkers string `json:"zvolWorkers,omitempty"`

	// The zle compression algorithm compresses runs of zeros.
	Compression string `json:"compression,omitempty"`
}

ReplicaSpec represents configuration related to replicas resources

func (*ReplicaSpec) DeepCopy

func (in *ReplicaSpec) DeepCopy() *ReplicaSpec

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

func (*ReplicaSpec) DeepCopyInto

func (in *ReplicaSpec) DeepCopyInto(out *ReplicaSpec)

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

type ReplicaStatus

type ReplicaStatus struct {
	// ID is replica unique identifier
	ID string `json:"replicaId"`
	// Mode represents replica status i.e. Healthy, Degraded
	Mode string `json:"mode"`
	// Represents IO number of replica persisted on the disk
	CheckpointedIOSeq string `json:"checkpointedIOSeq"`
	// Ongoing reads I/O from target to replica
	InflightRead string `json:"inflightRead"`
	// ongoing writes I/O from target to replica
	InflightWrite string `json:"inflightWrite"`
	// Ongoing sync I/O from target to replica
	InflightSync string `json:"inflightSync"`
	// time since the replica connected to target
	UpTime int `json:"upTime"`
	// Quorum indicates wheather data wrtitten to the replica
	// is lost or exists.
	// "0" means: data has been lost( might be ephimeral case)
	// and will recostruct data from other Healthy replicas in a write-only
	// mode
	// 1 means: written data is exists on replica
	Quorum string `json:"quorum"`
}

ReplicaStatus stores the status of replicas

func (*ReplicaStatus) DeepCopy

func (in *ReplicaStatus) DeepCopy() *ReplicaStatus

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

func (*ReplicaStatus) DeepCopyInto

func (in *ReplicaStatus) DeepCopyInto(out *ReplicaStatus)

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

type TargetSpec

type TargetSpec struct {
	// QueueDepth sets the queue size at iSCSI target which limits the
	// ongoing IO count from client
	QueueDepth string `json:"queueDepth,omitempty"`

	// IOWorkers sets the number of threads that are working on above queue
	IOWorkers int64 `json:"luWorkers,omitempty"`

	// Monitor enables or disables the target exporter sidecar
	Monitor bool `json:"monitor,omitempty"`

	// ReplicationFactor represents maximum number of replicas
	// that are allowed to connect to the target
	ReplicationFactor int64 `json:"replicationFactor,omitempty"`

	// Resources are the compute resources required by the cstor-target
	// container.
	Resources *corev1.ResourceRequirements `json:"resources,omitempty"`

	// AuxResources are the compute resources required by the cstor-target pod
	// side car containers.
	AuxResources *corev1.ResourceRequirements `json:"auxResources,omitempty"`

	// Tolerations, if specified, are the target pod's tolerations
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// PodAffinity if specified, are the target pod's affinities
	PodAffinity *corev1.PodAffinity `json:"affinity,omitempty"`

	// NodeSelector is the labels that will be used to select
	// a node for target pod scheduleing
	// Required field
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// PriorityClassName if specified applies to this target pod
	// If left empty, no priority class is applied.
	PriorityClassName string `json:"priorityClassName,omitempty"`
}

TargetSpec represents configuration related to cstor target and its resources

func (*TargetSpec) DeepCopy

func (in *TargetSpec) DeepCopy() *TargetSpec

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

func (*TargetSpec) DeepCopyInto

func (in *TargetSpec) DeepCopyInto(out *TargetSpec)

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

type VersionDetails

type VersionDetails struct {
	// If AutoUpgrade is set to true then the resource is
	// upgraded automatically without any manual steps
	AutoUpgrade bool `json:"autoUpgrade"`
	// Desired is the version that we want to
	// upgrade or the control plane version
	Desired string `json:"desired"`
	// Status gives the status of reconciliation triggered
	// when the desired and current version are not same
	Status VersionStatus `json:"status"`
}

VersionDetails provides the details for upgrade

func (*VersionDetails) DeepCopy

func (in *VersionDetails) DeepCopy() *VersionDetails

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

func (*VersionDetails) DeepCopyInto

func (in *VersionDetails) DeepCopyInto(out *VersionDetails)

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

func (*VersionDetails) SetSuccessStatus

func (vd *VersionDetails) SetSuccessStatus()

SetSuccessStatus resets the message and reason and sets the state as Reconciled

type VersionState

type VersionState string

VersionState is the state of reconciliation

const (
	// ReconcileComplete is the state when desired and current version are equal.
	ReconcileComplete VersionState = "Reconciled"
	// ReconcileInProgress is the state when desired and current version are
	// not same and the reconcile functions is retrying to make them same.
	ReconcileInProgress VersionState = "ReconcileInProgress"
	// ReconcilePending is the state the reconciliation is still not started yet
	ReconcilePending VersionState = "ReconcilePending"
)

type VersionStatus

type VersionStatus struct {
	// DependentsUpgraded gives the details whether all children
	// of a resource are upgraded to desired version or not
	DependentsUpgraded bool `json:"dependentsUpgraded"`
	// Current is the version of resource
	Current string `json:"current"`
	// State is the state of reconciliation
	State VersionState `json:"state"`
	// Message is a human readable message if some error occurs
	Message string `json:"message,omitempty"`
	// Reason is the actual reason for the error state
	Reason string `json:"reason,omitempty"`
	// LastUpdateTime is the time the status was last  updated
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
}

VersionStatus is the status of the reconciliation of versions

func (*VersionStatus) DeepCopy

func (in *VersionStatus) DeepCopy() *VersionStatus

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

func (*VersionStatus) DeepCopyInto

func (in *VersionStatus) DeepCopyInto(out *VersionStatus)

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

func (*VersionStatus) SetErrorStatus

func (vs *VersionStatus) SetErrorStatus(msg string, err error)

SetErrorStatus sets the message and reason for the error

func (*VersionStatus) SetInProgressStatus

func (vs *VersionStatus) SetInProgressStatus()

SetInProgressStatus sets the state as ReconcileInProgress

type VolumeProvision

type VolumeProvision struct {
	// Capacity represents initial capacity of volume replica required during
	// volume clone operations to maintain some metadata info related to child
	// resources like snapshot, cloned volumes.
	Capacity corev1.ResourceList `json:"capacity"`
	// ReplicaCount represents initial cstor volume replica count, its will not
	// be updated later on based on scale up/down operations, only readonly
	// operations and validations.
	ReplicaCount int `json:"replicaCount"`
}

func (*VolumeProvision) DeepCopy

func (in *VolumeProvision) DeepCopy() *VolumeProvision

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

func (*VolumeProvision) DeepCopyInto

func (in *VolumeProvision) DeepCopyInto(out *VolumeProvision)

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

type ZFSCapacityAttributes added in v1.11.0

type ZFSCapacityAttributes struct {
	// LogicalUsed is the amount of space that is "logically" consumed
	// by this pool and all its descendents. The logical space ignores
	// the effect of the compression and copies properties, giving a
	// quantity closer to the amount of data that applications see.
	// However, it does include space consumed by metadata.
	LogicalUsed resource.Quantity `json:"logicalUsed"`
}

ZFSCapacityAttributes stores the advanced information about pool capacity related attributes

func (*ZFSCapacityAttributes) DeepCopy added in v1.11.0

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

func (*ZFSCapacityAttributes) DeepCopyInto added in v1.11.0

func (in *ZFSCapacityAttributes) DeepCopyInto(out *ZFSCapacityAttributes)

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