v1alpha1

package
v3.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	// StoragePoolKindCSPC holds the value of CStorPoolCluster
	StoragePoolKindCSPC = "CStorPoolCluster"
	// APIVersion holds the value of OpenEBS version
	APIVersion = "openebs.io/v1alpha1"
)
View Source
const (
	// ResourceStorage defines the storage required as v1.Quantity
	ResourceStorage corev1.ResourceName = "storage"
)

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: openebs.GroupName, Version: apiVersion}

SchemeGroupVersion is group version used to register these objects

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type BlockDevice

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

	Spec   DeviceSpec   `json:"spec,omitempty"`
	Status DeviceStatus `json:"status,omitempty"`
}

BlockDevice is the Schema used to represent a BlockDevice CR

func (*BlockDevice) DeepCopy

func (in *BlockDevice) DeepCopy() *BlockDevice

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

func (*BlockDevice) DeepCopyInto

func (in *BlockDevice) DeepCopyInto(out *BlockDevice)

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

func (*BlockDevice) DeepCopyObject

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

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

type BlockDeviceClaim

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

	Spec   DeviceClaimSpec   `json:"spec,omitempty"`
	Status DeviceClaimStatus `json:"status,omitempty"`
}

BlockDeviceClaim is the Schema for the BlockDeviceClaim CR

func NewBlockDeviceClaim

func NewBlockDeviceClaim() *BlockDeviceClaim

func (*BlockDeviceClaim) DeepCopy

func (in *BlockDeviceClaim) DeepCopy() *BlockDeviceClaim

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

func (*BlockDeviceClaim) DeepCopyInto

func (in *BlockDeviceClaim) DeepCopyInto(out *BlockDeviceClaim)

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

func (*BlockDeviceClaim) DeepCopyObject

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

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

func (*BlockDeviceClaim) RemoveFinalizer

func (bdc *BlockDeviceClaim) RemoveFinalizer(finalizer string)

RemoveFinalizer removes the given finalizer from the object.

func (*BlockDeviceClaim) WithAnnotations

func (bdc *BlockDeviceClaim) WithAnnotations(annotations map[string]string) *BlockDeviceClaim

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

func (*BlockDeviceClaim) WithAnnotationsNew

func (bdc *BlockDeviceClaim) WithAnnotationsNew(annotations map[string]string) *BlockDeviceClaim

WithAnnotationsNew sets the Annotations field of BDC with provided arguments

func (*BlockDeviceClaim) WithBlockDeviceName

func (bdc *BlockDeviceClaim) WithBlockDeviceName(bdName string) *BlockDeviceClaim

WithBlockDeviceName sets the BlockDeviceName field of BDC provided arguments

func (*BlockDeviceClaim) WithBlockDeviceTag

func (bdc *BlockDeviceClaim) WithBlockDeviceTag(bdTagValue string) *BlockDeviceClaim

WithBlockDeviceTag appends (or creates) the BDC Label Selector by setting the provided value to the fixed key openebs.io/block-device-tag This will enable the NDM to pick only devices that match the node (hostname) and block device tag value.

func (*BlockDeviceClaim) WithBlockVolumeMode

func (bdc *BlockDeviceClaim) WithBlockVolumeMode(mode corev1.PersistentVolumeMode) *BlockDeviceClaim

WithBlockVolumeMode sets the volumeMode as volumeModeBlock, if persistentVolumeMode is set to "Block"

func (*BlockDeviceClaim) WithCSPCOwnerReference

func (bdc *BlockDeviceClaim) WithCSPCOwnerReference(reference metav1.OwnerReference) *BlockDeviceClaim

WithCSPCOwnerReference sets the OwnerReference field in BDC with required fields

func (*BlockDeviceClaim) WithCapacity

func (bdc *BlockDeviceClaim) WithCapacity(capacity resource.Quantity) *BlockDeviceClaim

WithCapacity sets the Capacity field in BDC with provided arguments

func (*BlockDeviceClaim) WithDeviceType

func (bdc *BlockDeviceClaim) WithDeviceType(dType string) *BlockDeviceClaim

WithDeviceType sets the DeviceType field of BDC provided arguments

func (*BlockDeviceClaim) WithFinalizer

func (bdc *BlockDeviceClaim) WithFinalizer(finalizers ...string) *BlockDeviceClaim

WithFinalizer sets the finalizer field in the BDC

func (*BlockDeviceClaim) WithHostName

func (bdc *BlockDeviceClaim) WithHostName(hName string) *BlockDeviceClaim

WithHostName sets the hostName field of BDC provided arguments

func (*BlockDeviceClaim) WithLabels

func (bdc *BlockDeviceClaim) WithLabels(labels map[string]string) *BlockDeviceClaim

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

func (*BlockDeviceClaim) WithLabelsNew

func (bdc *BlockDeviceClaim) WithLabelsNew(labels map[string]string) *BlockDeviceClaim

WithLabelsNew sets the Labels field of BDC with provided arguments

func (*BlockDeviceClaim) WithName

func (bdc *BlockDeviceClaim) WithName(name string) *BlockDeviceClaim

WithName sets the Name field of BDC with provided value.

func (*BlockDeviceClaim) WithNamespace

func (bdc *BlockDeviceClaim) WithNamespace(namespace string) *BlockDeviceClaim

WithNamespace sets the Namespace field of BDC provided arguments

func (*BlockDeviceClaim) WithNodeName

func (bdc *BlockDeviceClaim) WithNodeName(nName string) *BlockDeviceClaim

WithNodeName sets the node name field of BDC provided arguments

func (*BlockDeviceClaim) WithSelector

func (bdc *BlockDeviceClaim) WithSelector(labelSelector map[string]string) *BlockDeviceClaim

WithSelector appends (or creates) the BDC Label Selector by setting the provided key and corresponding value This will enable the NDM to pick only devices that match the given label and its value.

type BlockDeviceClaimList

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

BlockDeviceClaimList contains a list of BlockDeviceClaim

func (*BlockDeviceClaimList) DeepCopy

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

func (*BlockDeviceClaimList) DeepCopyInto

func (in *BlockDeviceClaimList) DeepCopyInto(out *BlockDeviceClaimList)

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

func (*BlockDeviceClaimList) DeepCopyObject

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

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

func (*BlockDeviceClaimList) GetBlockDeviceClaimFromBDName

func (bdcl *BlockDeviceClaimList) GetBlockDeviceClaimFromBDName(
	bdName string) (*BlockDeviceClaim, error)

GetBlockDeviceClaimFromBDName return block device claim if claim exists for provided blockdevice name in claim list else return error

type BlockDeviceList

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

BlockDeviceList contains a list of BlockDevice

func (*BlockDeviceList) DeepCopy

func (in *BlockDeviceList) DeepCopy() *BlockDeviceList

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

func (*BlockDeviceList) DeepCopyInto

func (in *BlockDeviceList) DeepCopyInto(out *BlockDeviceList)

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

func (*BlockDeviceList) DeepCopyObject

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

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

type BlockDeviceNodeAttributes

type BlockDeviceNodeAttributes struct {
	// NodeName represents the name of the Kubernetes node resource
	// where the BD should be present
	NodeName string `json:"nodeName,omitempty"`

	// HostName represents the hostname of the Kubernetes node resource
	// where the BD should be present
	HostName string `json:"hostName,omitempty"`
}

BlockDeviceNodeAttributes contains the attributes of the node from which the BD should be selected for claiming. A BDC can specify one or more attributes. When multiple values are specified, the NDM Operator will claim a Block Device that matches all the requested attributes.

func (*BlockDeviceNodeAttributes) DeepCopy

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

func (*BlockDeviceNodeAttributes) DeepCopyInto

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

type BlockDeviceState

type BlockDeviceState string

BlockDeviceState defines the observed state of the disk

const (
	// BlockDeviceActive is the state for a block device that is connected to the node
	BlockDeviceActive BlockDeviceState = "Active"

	// BlockDeviceInactive is the state for a block device that is disconnected from a node
	BlockDeviceInactive BlockDeviceState = "Inactive"

	// BlockDeviceUnknown is the state for a block device whose state (attached/detached) cannot
	// be determined at this time.
	BlockDeviceUnknown BlockDeviceState = "Unknown"
)

type BlockDeviceVolumeMode

type BlockDeviceVolumeMode string

BlockDeviceVolumeMode specifies the type in which the BlockDevice can be used

const (
	// VolumeModeBlock specifies that the block device needs to be used as a raw block
	VolumeModeBlock BlockDeviceVolumeMode = "Block"

	// VolumeModeFileSystem specifies that block device will be used with a filesystem
	// already existing
	VolumeModeFileSystem BlockDeviceVolumeMode = "FileSystem"
)

type CStorBackup

type CStorBackup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              CStorBackupSpec   `json:"spec"`
	Status            CStorBackupStatus `json:"status"`
}

CStorBackup describes a cstor backup resource created as a custom resource

func (*CStorBackup) DeepCopy

func (in *CStorBackup) DeepCopy() *CStorBackup

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

func (*CStorBackup) DeepCopyInto

func (in *CStorBackup) DeepCopyInto(out *CStorBackup)

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

func (*CStorBackup) DeepCopyObject

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

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

type CStorBackupList

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

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

CStorBackupList is a list of CStorBackup resources

func (*CStorBackupList) DeepCopy

func (in *CStorBackupList) DeepCopy() *CStorBackupList

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

func (*CStorBackupList) DeepCopyInto

func (in *CStorBackupList) DeepCopyInto(out *CStorBackupList)

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

func (*CStorBackupList) DeepCopyObject

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

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

type CStorBackupSpec

type CStorBackupSpec struct {
	// BackupName is a name of the backup or scheduled backup
	BackupName string `json:"backupName"`

	// VolumeName is a name of the volume for which this backup is destined
	VolumeName string `json:"volumeName"`

	// SnapName is a name of the current backup snapshot
	SnapName string `json:"snapName"`

	// PrevSnapName is the last completed-backup's snapshot name
	PrevSnapName string `json:"prevSnapName"`

	// BackupDest is the remote address for backup transfer
	BackupDest string `json:"backupDest"`

	// LocalSnap is flag to enable local snapshot only
	LocalSnap bool `json:"localSnap"`
}

CStorBackupSpec is the spec for a CStorBackup resource

func (*CStorBackupSpec) DeepCopy

func (in *CStorBackupSpec) DeepCopy() *CStorBackupSpec

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

func (*CStorBackupSpec) DeepCopyInto

func (in *CStorBackupSpec) DeepCopyInto(out *CStorBackupSpec)

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

type CStorBackupStatus

type CStorBackupStatus string

CStorBackupStatus is to hold status of backup

const (
	// BKPCStorStatusEmpty ensures the create operation is to be done, if import fails.
	BKPCStorStatusEmpty CStorBackupStatus = ""

	// BKPCStorStatusDone , backup is completed.
	BKPCStorStatusDone CStorBackupStatus = "Done"

	// BKPCStorStatusFailed , backup is failed.
	BKPCStorStatusFailed CStorBackupStatus = "Failed"

	// BKPCStorStatusInit , backup is initialized.
	BKPCStorStatusInit CStorBackupStatus = "Init"

	// BKPCStorStatusPending , backup is pending.
	BKPCStorStatusPending CStorBackupStatus = "Pending"

	// BKPCStorStatusInProgress , backup is in progress.
	BKPCStorStatusInProgress CStorBackupStatus = "InProgress"

	// BKPCStorStatusInvalid , backup operation is invalid.
	BKPCStorStatusInvalid CStorBackupStatus = "Invalid"
)

Status written onto CStorBackup objects.

type CStorCompletedBackup

type CStorCompletedBackup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              CStorBackupSpec `json:"spec"`
}

CStorCompletedBackup describes a cstor completed-backup resource created as custom resource

func (*CStorCompletedBackup) DeepCopy

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

func (*CStorCompletedBackup) DeepCopyInto

func (in *CStorCompletedBackup) DeepCopyInto(out *CStorCompletedBackup)

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

func (*CStorCompletedBackup) DeepCopyObject

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

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

type CStorCompletedBackupList

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

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

CStorCompletedBackupList is a list of cstorcompletedbackup resources

func (*CStorCompletedBackupList) DeepCopy

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

func (*CStorCompletedBackupList) DeepCopyInto

func (in *CStorCompletedBackupList) DeepCopyInto(out *CStorCompletedBackupList)

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

func (*CStorCompletedBackupList) DeepCopyObject

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

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

type CStorPool

type CStorPool struct {
	// PoolName contains the name of the cstor pool to be upgraded
	PoolName string `json:"poolName,omitempty"`
	// Options can be used to change the default behaviour of upgrade
	Options *ResourceOptions `json:"options,omitempty"`
}

CStorPool is the ResourceType for cstor pool

func (*CStorPool) DeepCopy

func (in *CStorPool) DeepCopy() *CStorPool

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

func (*CStorPool) DeepCopyInto

func (in *CStorPool) DeepCopyInto(out *CStorPool)

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

type CStorPoolCluster

type CStorPoolCluster struct {
	// CSPCName contains the name of the storage pool claim to be upgraded
	CSPCName string `json:"cspcName,omitempty"`
	// Options can be used to change the default behaviour of upgrade
	Options *ResourceOptions `json:"options,omitempty"`
}

CStorPoolCluster is the ResourceType for cstor pool cluster

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.

type CStorPoolInstance

type CStorPoolInstance struct {
	// CSPCName contains the name of the storage pool claim to be upgraded
	CSPIName string `json:"cspiName,omitempty"`
	// Options can be used to change the default behaviour of upgrade
	Options *ResourceOptions `json:"options,omitempty"`
}

CStorPoolInstance is the ResourceType for cstor pool cluster

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.

type CStorRestore

type CStorRestore struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"` // set name to restore name + volume name + something like csp tag
	Spec              CStorRestoreSpec            `json:"spec"`
	Status            CStorRestoreStatus          `json:"status"`
}

CStorRestore describes a cstor restore resource created as a custom resource

func (*CStorRestore) DeepCopy

func (in *CStorRestore) DeepCopy() *CStorRestore

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

func (*CStorRestore) DeepCopyInto

func (in *CStorRestore) DeepCopyInto(out *CStorRestore)

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

func (*CStorRestore) DeepCopyObject

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

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

type CStorRestoreList

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

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

CStorRestoreList is a list of CStorRestore resources

func (*CStorRestoreList) DeepCopy

func (in *CStorRestoreList) DeepCopy() *CStorRestoreList

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

func (*CStorRestoreList) DeepCopyInto

func (in *CStorRestoreList) DeepCopyInto(out *CStorRestoreList)

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

func (*CStorRestoreList) DeepCopyObject

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

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

type CStorRestoreSpec

type CStorRestoreSpec struct {
	RestoreName   string            `json:"restoreName"` // set restore name
	VolumeName    string            `json:"volumeName"`
	RestoreSrc    string            `json:"restoreSrc"` // it can be ip:port in case of restore from remote or volumeName in case of local restore
	MaxRetryCount int               `json:"maxretrycount"`
	RetryCount    int               `json:"retrycount"`
	StorageClass  string            `json:"storageClass,omitempty"`
	Size          resource.Quantity `json:"size,omitempty"`
	Local         bool              `json:"localRestore,omitempty"` // if restore is from local backup/snapshot
}

CStorRestoreSpec is the spec for a CStorRestore resource

func (*CStorRestoreSpec) DeepCopy

func (in *CStorRestoreSpec) DeepCopy() *CStorRestoreSpec

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

func (*CStorRestoreSpec) DeepCopyInto

func (in *CStorRestoreSpec) DeepCopyInto(out *CStorRestoreSpec)

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

type CStorRestoreStatus

type CStorRestoreStatus string

CStorRestoreStatus is to hold result of action.

const (
	// RSTCStorStatusEmpty ensures the create operation is to be done, if import fails.
	RSTCStorStatusEmpty CStorRestoreStatus = ""

	// RSTCStorStatusDone , restore operation is completed.
	RSTCStorStatusDone CStorRestoreStatus = "Done"

	// RSTCStorStatusFailed , restore operation is failed.
	RSTCStorStatusFailed CStorRestoreStatus = "Failed"

	// RSTCStorStatusInit , restore operation is initialized.
	RSTCStorStatusInit CStorRestoreStatus = "Init"

	// RSTCStorStatusPending , restore operation is pending.
	RSTCStorStatusPending CStorRestoreStatus = "Pending"

	// RSTCStorStatusInProgress , restore operation is in progress.
	RSTCStorStatusInProgress CStorRestoreStatus = "InProgress"

	// RSTCStorStatusInvalid , restore operation is invalid.
	RSTCStorStatusInvalid CStorRestoreStatus = "Invalid"
)

Status written onto CStrorRestore object.

type CStorVolume

type CStorVolume struct {
	// PVName contains the name of the pv associated with the cstor volume
	PVName string `json:"pvName,omitempty"`
	// Options can be used to change the default behaviour of upgrade
	Options *ResourceOptions `json:"options,omitempty"`
}

CStorVolume is the ResourceType for cstor volume

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.

type DeviceCapacity

type DeviceCapacity struct {
	// Storage is the blockdevice capacity in bytes
	Storage uint64 `json:"storage"`

	// PhysicalSectorSize is blockdevice physical-Sector size in bytes
	PhysicalSectorSize uint32 `json:"physicalSectorSize"`

	// LogicalSectorSize is blockdevice logical-sector size in bytes
	LogicalSectorSize uint32 `json:"logicalSectorSize"`
}

DeviceCapacity defines the physical and logical size of the block device

func (*DeviceCapacity) DeepCopy

func (in *DeviceCapacity) DeepCopy() *DeviceCapacity

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

func (*DeviceCapacity) DeepCopyInto

func (in *DeviceCapacity) DeepCopyInto(out *DeviceCapacity)

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

type DeviceClaimDetails

type DeviceClaimDetails struct {
	// BlockVolumeMode represents whether to claim a device in Block mode or Filesystem mode.
	// These are use cases of BlockVolumeMode:
	// 1) Not specified: VolumeMode check will not be effective
	// 2) VolumeModeBlock: BD should not have any filesystem or mountpoint
	// 3) VolumeModeFileSystem: BD should have a filesystem and mountpoint. If DeviceFormat is
	//    specified then the format should match with the FSType in BD
	BlockVolumeMode BlockDeviceVolumeMode `json:"blockVolumeMode,omitempty"`

	//Format of the device required, eg:ext4, xfs
	DeviceFormat string `json:"formatType,omitempty"`

	//AllowPartition represents whether to claim a full block device or a device that is a partition
	AllowPartition bool `json:"allowPartition,omitempty"`
}

DeviceClaimDetails defines the details of the block device that should be claimed

func (*DeviceClaimDetails) DeepCopy

func (in *DeviceClaimDetails) DeepCopy() *DeviceClaimDetails

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

func (*DeviceClaimDetails) DeepCopyInto

func (in *DeviceClaimDetails) DeepCopyInto(out *DeviceClaimDetails)

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

type DeviceClaimPhase

type DeviceClaimPhase string

DeviceClaimPhase is a typed string for phase field of BlockDeviceClaim.

const (
	// BlockDeviceClaimStatusEmpty represents that the BlockDeviceClaim was just created.
	BlockDeviceClaimStatusEmpty DeviceClaimPhase = ""

	// BlockDeviceClaimStatusPending represents BlockDeviceClaim has not been assigned devices yet. Rather
	// search is going on for matching devices.
	BlockDeviceClaimStatusPending DeviceClaimPhase = "Pending"

	// BlockDeviceClaimStatusInvalidCapacity represents BlockDeviceClaim has invalid capacity request i.e. 0/-1
	BlockDeviceClaimStatusInvalidCapacity DeviceClaimPhase = "Invalid Capacity Request"

	// BlockDeviceClaimStatusDone represents BlockDeviceClaim has been assigned backing blockdevice and ready for use.
	BlockDeviceClaimStatusDone DeviceClaimPhase = "Bound"
)

BlockDeviceClaim CR, when created pass through phases before it got some Devices Assigned. Given below table, have all phases which BlockDeviceClaim CR can go before it is marked done.

type DeviceClaimResources

type DeviceClaimResources struct {
	// Requests describes the minimum resources required. eg: if storage resource of 10G is
	// requested minimum capacity of 10G should be available
	Requests corev1.ResourceList `json:"requests"`
}

DeviceClaimResources defines the request by the claim, eg, Capacity, IOPS

func (*DeviceClaimResources) DeepCopy

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

func (*DeviceClaimResources) DeepCopyInto

func (in *DeviceClaimResources) DeepCopyInto(out *DeviceClaimResources)

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

type DeviceClaimSpec

type DeviceClaimSpec struct {

	// Selector is used to find block devices to be considered for claiming
	Selector *metav1.LabelSelector `json:"selector,omitempty"`

	// Resources will help with placing claims on Capacity, IOPS
	Resources DeviceClaimResources `json:"resources"`

	// DeviceType represents the type of drive like SSD, HDD etc.,
	DeviceType string `json:"deviceType"`

	// HostName from where blockdevice has to be claimed.
	HostName string `json:"hostName"`

	// Details of the device to be claimed
	Details DeviceClaimDetails `json:"deviceClaimDetails,omitempty"`

	// BlockDeviceName is the reference to the block-device backing this claim
	BlockDeviceName string `json:"blockDeviceName,omitempty"`

	// BlockDeviceNodeAttributes is the attributes on the node from which a BD should
	// be selected for this claim. It can include nodename, failure domain etc.
	BlockDeviceNodeAttributes BlockDeviceNodeAttributes `json:"blockDeviceNodeAttributes,omitempty"`
}

DeviceClaimSpec defines the request details for a BlockDevice

func (*DeviceClaimSpec) DeepCopy

func (in *DeviceClaimSpec) DeepCopy() *DeviceClaimSpec

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

func (*DeviceClaimSpec) DeepCopyInto

func (in *DeviceClaimSpec) DeepCopyInto(out *DeviceClaimSpec)

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

type DeviceClaimState

type DeviceClaimState string

DeviceClaimState defines the observed state of BlockDevice

const (
	// BlockDeviceUnclaimed represents that the block device is not bound to any BDC,
	// all cleanup jobs have been completed and is available for claiming.
	BlockDeviceUnclaimed DeviceClaimState = "Unclaimed"

	// BlockDeviceReleased represents that the block device is released from the BDC,
	// pending cleanup jobs
	BlockDeviceReleased DeviceClaimState = "Released"

	// BlockDeviceClaimed represents that the block device is bound to a BDC
	BlockDeviceClaimed DeviceClaimState = "Claimed"
)

type DeviceClaimStatus

type DeviceClaimStatus struct {
	Phase DeviceClaimPhase `json:"phase"`
}

DeviceClaimStatus defines the observed state of BlockDeviceClaim

func (*DeviceClaimStatus) DeepCopy

func (in *DeviceClaimStatus) DeepCopy() *DeviceClaimStatus

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

func (*DeviceClaimStatus) DeepCopyInto

func (in *DeviceClaimStatus) DeepCopyInto(out *DeviceClaimStatus)

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

type DeviceDetails

type DeviceDetails struct {
	// DeviceType represents the type of device like
	// sparse, disk, partition, lvm, raid
	DeviceType string `json:"deviceType"`

	// DriveType is the type of backing drive, HDD/SSD
	DriveType string `json:"driveType"`

	// LogicalBlockSize is the logical block size in bytes
	// reported by /sys/class/block/sda/queue/logical_block_size
	LogicalBlockSize uint32 `json:"logicalBlockSize"`

	// PhysicalBlockSize is the physical block size in bytes
	// reported by /sys/class/block/sda/queue/physical_block_size
	PhysicalBlockSize uint32 `json:"physicalBlockSize"`

	// HardwareSectorSize is the hardware sector size in bytes
	HardwareSectorSize uint32 `json:"hardwareSectorSize"`

	// Model is model of disk
	Model string `json:"model"`

	// Compliance is standards/specifications version implmented by device firmware
	//  such as SPC-1, SPC-2, etc
	Compliance string `json:"compliance"`

	// Serial is serial number of disk
	Serial string `json:"serial"`

	// Vendor is vendor of disk
	Vendor string `json:"vendor"`

	// disk firmware revision
	FirmwareRevision string `json:"firmwareRevision"`
}

DeviceDetails represent certain hardware/static attributes of the block device

func (*DeviceDetails) DeepCopy

func (in *DeviceDetails) DeepCopy() *DeviceDetails

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

func (*DeviceDetails) DeepCopyInto

func (in *DeviceDetails) DeepCopyInto(out *DeviceDetails)

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

type DeviceDevLink struct {
	// Kind is the type of link like by-id or by-path.
	Kind string `json:"kind,omitempty"`

	// Links are the soft links of Type type
	Links []string `json:"links,omitempty"`
}

DeviceDevLink holds the maping between type and links like by-id type or by-path type link

func (*DeviceDevLink) DeepCopy

func (in *DeviceDevLink) DeepCopy() *DeviceDevLink

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

func (*DeviceDevLink) DeepCopyInto

func (in *DeviceDevLink) DeepCopyInto(out *DeviceDevLink)

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

type DeviceSpec

type DeviceSpec struct {
	// NodeAttributes has the details of the node on which BD is attached
	NodeAttributes NodeAttribute `json:"nodeAttributes"`

	// Path contain devpath (e.g. /dev/sdb)
	Path string `json:"path"`

	// Capacity
	Capacity DeviceCapacity `json:"capacity"`

	// Details contain static attributes of BD like model,serial, and so forth
	Details DeviceDetails `json:"details"`

	// Reference to the BDC which has claimed this BD
	ClaimRef *v1.ObjectReference `json:"claimRef,omitempty"`

	// DevLinks contains soft links of a block device like
	// /dev/by-id/...
	// /dev/by-uuid/...
	DevLinks []DeviceDevLink `json:"devlinks"`

	// FileSystem contains mountpoint and filesystem type
	FileSystem FileSystemInfo `json:"filesystem,omitempty"`

	// Partitioned represents if BlockDevice has partions or not (YES/NO)
	// Currently always default to NO.
	// TODO @kmova to be implemented/deprecated
	Partitioned string `json:"partitioned"`

	// ParentDevice was intented to store the UUID of the parent
	// Block Device as is the case for partitioned block devices.
	//
	// For example:
	// /dev/sda is the parent for /dev/sdap1
	// TODO @kmova to be implemented/deprecated
	ParentDevice string `json:"parentDevice,omitempty"`

	// AggregateDevice was intended to store the hierachical
	// information in cases of LVM. However this is currently
	// not implemented and may need to be re-looked into for
	// better design.
	// TODO @kmova to be implemented/deprecated
	AggregateDevice string `json:"aggregateDevice,omitempty"`
}

DeviceSpec defines the properties and runtime status of a BlockDevice

func (*DeviceSpec) DeepCopy

func (in *DeviceSpec) DeepCopy() *DeviceSpec

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

func (*DeviceSpec) DeepCopyInto

func (in *DeviceSpec) DeepCopyInto(out *DeviceSpec)

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

type DeviceStatus

type DeviceStatus struct {
	// claim state of the block device
	ClaimState DeviceClaimState `json:"claimState"`

	// State is the current state of the blockdevice (Active/Inactive)
	State BlockDeviceState `json:"state"`
}

DeviceStatus defines the observed state of BlockDevice

func (*DeviceStatus) DeepCopy

func (in *DeviceStatus) DeepCopy() *DeviceStatus

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

func (*DeviceStatus) DeepCopyInto

func (in *DeviceStatus) DeepCopyInto(out *DeviceStatus)

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

type FileSystemInfo

type FileSystemInfo struct {
	//Type represents the FileSystem type of the block device
	Type string `json:"fsType,omitempty"`

	//MountPoint represents the mountpoint of the block device.
	Mountpoint string `json:"mountPoint,omitempty"`
}

FileSystemInfo defines the filesystem type and mountpoint of the device if it exists

func (*FileSystemInfo) DeepCopy

func (in *FileSystemInfo) DeepCopy() *FileSystemInfo

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

func (*FileSystemInfo) DeepCopyInto

func (in *FileSystemInfo) DeepCopyInto(out *FileSystemInfo)

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

type JivaVolume

type JivaVolume struct {
	// PVName contains the name of the pv associated with the jiva volume
	PVName string `json:"pvName,omitempty"`
	// Options can be used to change the default behaviour of upgrade
	Options *ResourceOptions `json:"options,omitempty"`
}

JivaVolume is the ResourceType for jiva volume

func (*JivaVolume) DeepCopy

func (in *JivaVolume) DeepCopy() *JivaVolume

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

func (*JivaVolume) DeepCopyInto

func (in *JivaVolume) DeepCopyInto(out *JivaVolume)

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

type MigrateCStorPool

type MigrateCStorPool struct {
	// SPCName contains the name of the storage pool claim to be migrated
	SPCName string `json:"spcName,omitempty"`
	// If a CSPC with the same name as SPC already exists then we can rename
	// SPC during migration using Rename
	Rename string `json:"rename,omitempty"`
}

MigrateCStorPool is the ResourceType for cstor pool cluster

func (*MigrateCStorPool) DeepCopy

func (in *MigrateCStorPool) DeepCopy() *MigrateCStorPool

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

func (*MigrateCStorPool) DeepCopyInto

func (in *MigrateCStorPool) DeepCopyInto(out *MigrateCStorPool)

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

type MigrateCStorVolume

type MigrateCStorVolume struct {
	// PVName contains the name of the pv associated with the cstor volume to be migrated
	PVName string `json:"pvName,omitempty"`
}

MigrateCStorVolume is the ResourceType for cstor volume

func (*MigrateCStorVolume) DeepCopy

func (in *MigrateCStorVolume) DeepCopy() *MigrateCStorVolume

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

func (*MigrateCStorVolume) DeepCopyInto

func (in *MigrateCStorVolume) DeepCopyInto(out *MigrateCStorVolume)

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

type MigratePhase

type MigratePhase string

MigratePhase defines phase of a MigrationTask

const (
	// MigrateStarted - used for Migrates that are Started
	MigrateStarted MigratePhase = "Started"
	// MigrateSuccess - used for Migrates that are not available
	MigrateSuccess MigratePhase = "Success"
	// MigrateError - used for Migrates that Error for some reason
	MigrateError MigratePhase = "Error"
)

type MigrateResource

type MigrateResource struct {
	// MigrateCStorVolume contains the details of the cstor volume to be migrated
	MigrateCStorVolume *MigrateCStorVolume `json:"cstorVolume,omitempty"`
	// MigrateCStorPool contains the details of the cstor pool to be migrated
	MigrateCStorPool *MigrateCStorPool `json:"cstorPool,omitempty"`
}

MigrateResource is the type of resource which is to be migrated. Exactly one of its members must be set.

func (*MigrateResource) DeepCopy

func (in *MigrateResource) DeepCopy() *MigrateResource

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

func (*MigrateResource) DeepCopyInto

func (in *MigrateResource) DeepCopyInto(out *MigrateResource)

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

type MigrationDetailedStatuses

type MigrationDetailedStatuses struct {
	Step string `json:"step,omitempty"`
	// StartTime of a MigrateStep
	StartTime metav1.Time `json:"startTime,omitempty"`
	// LastUpdatedTime of a MigrateStep
	LastUpdatedTime metav1.Time `json:"lastUpdatedAt,omitempty"`
	// Phase indicates if the MigrateStep is waiting, errored or completed.
	Phase StepPhase `json:"phase,omitempty"`
	// A human-readable message indicating details about why the migrationStep
	// is in this state
	Message string `json:"message,omitempty"`
	// Reason is a brief CamelCase string that describes any failure and is meant
	// for machine parsing and tidy display in the CLI
	Reason string `json:"reason,omitempty"`
}

MigrationDetailedStatuses represents the latest available observations of a MigrationTask current state.

func (*MigrationDetailedStatuses) DeepCopy

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

func (*MigrationDetailedStatuses) DeepCopyInto

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

type MigrationTask

type MigrationTask struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Spec i.e. specifications of the MigrationTask
	Spec MigrationTaskSpec `json:"spec"`
	// Status of MigrationTask
	Status MigrationTaskStatus `json:"status,omitempty"`
}

MigrationTask represents an migration task +kubebuilder:object:root=true +kubebuilder:resource:scope=Namespaced,shortName=mtask

func (*MigrationTask) DeepCopy

func (in *MigrationTask) DeepCopy() *MigrationTask

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

func (*MigrationTask) DeepCopyInto

func (in *MigrationTask) DeepCopyInto(out *MigrationTask)

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

func (*MigrationTask) DeepCopyObject

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

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

type MigrationTaskList

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

	// Items are the list of migration task items
	Items []MigrationTask `json:"items"`
}

MigrationTaskList is a list of MigrationTask resources

func (*MigrationTaskList) DeepCopy

func (in *MigrationTaskList) DeepCopy() *MigrationTaskList

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

func (*MigrationTaskList) DeepCopyInto

func (in *MigrationTaskList) DeepCopyInto(out *MigrationTaskList)

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

func (*MigrationTaskList) DeepCopyObject

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

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

type MigrationTaskSpec

type MigrationTaskSpec struct {
	MigrateResource `json:",inline"`
}

MigrationTaskSpec is the properties of an migration task

func (*MigrationTaskSpec) DeepCopy

func (in *MigrationTaskSpec) DeepCopy() *MigrationTaskSpec

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

func (*MigrationTaskSpec) DeepCopyInto

func (in *MigrationTaskSpec) DeepCopyInto(out *MigrationTaskSpec)

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

type MigrationTaskStatus

type MigrationTaskStatus struct {
	// Phase indicates if a migrationTask is started, success or errored
	Phase MigratePhase `json:"phase,omitempty"`
	// StartTime of Migrate
	StartTime metav1.Time `json:"startTime,omitempty"`
	// CompletedTime of Migrate
	CompletedTime metav1.Time `json:"completedTime,omitempty"`
	// MigrationDetailedStatuses contains the list of statuses of each step
	MigrationDetailedStatuses []MigrationDetailedStatuses `json:"migrationDetailedStatuses,omitempty"`
	// Retries is the number of times the job attempted to migration the resource
	Retries int `json:"retries,omitempty"`
}

MigrationTaskStatus provides status of a migrationTask

func (*MigrationTaskStatus) DeepCopy

func (in *MigrationTaskStatus) DeepCopy() *MigrationTaskStatus

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

func (*MigrationTaskStatus) DeepCopyInto

func (in *MigrationTaskStatus) DeepCopyInto(out *MigrationTaskStatus)

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

type NodeAttribute

type NodeAttribute struct {
	// NodeName is the name of the Kubernetes node resource on which the device is attached
	NodeName string `json:"nodeName"`
}

NodeAttribute defines the attributes of a node where the block device is attached.

Note: Prior to introducing NodeAttributes, the BD would only support gathering hostname and add it as a label to the BD resource.

In some use cases, the caller has access only to node name, not the hostname. node name and hostname are different in certain Kubernetes clusters.

NodeAttributes is added to contain attributes that are not available on the labels like - node name, uuid, etc.

The node attributes are helpful in querying for block devices based on node attributes. Also, adding this in the spec allows for displaying in node name in the `kubectl get bd`

TODO @kmova @akhil Capture and add nodeUUID to BD, that can help in determining if the node was recreated with same node name.

func (*NodeAttribute) DeepCopy

func (in *NodeAttribute) DeepCopy() *NodeAttribute

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

func (*NodeAttribute) DeepCopyInto

func (in *NodeAttribute) DeepCopyInto(out *NodeAttribute)

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

type Options

type Options struct {
	// Timeout is maximum seconds to wait at any given step in the upgrade
	Timeout int `json:"timeout,omitempty"`
}

Options provides additional optional arguments

func (*Options) DeepCopy

func (in *Options) DeepCopy() *Options

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

func (*Options) DeepCopyInto

func (in *Options) DeepCopyInto(out *Options)

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

type ResourceOptions

type ResourceOptions struct {
	// IgnoreStepsOnError allows to ignore steps which failed
	IgnoreStepsOnError []string `json:"ignoreStepsOnError,omitempty"`
}

ResourceOptions provides additional options for a particular resource

func (*ResourceOptions) DeepCopy

func (in *ResourceOptions) DeepCopy() *ResourceOptions

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

func (*ResourceOptions) DeepCopyInto

func (in *ResourceOptions) DeepCopyInto(out *ResourceOptions)

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

type ResourceSpec

type ResourceSpec struct {
	// JivaVolume contains the details of the jiva volume to be upgraded
	JivaVolume *JivaVolume `json:"jivaVolume,omitempty"`
	// CStorVolume contains the details of the cstor volume to be upgraded
	CStorVolume *CStorVolume `json:"cstorVolume,omitempty"`
	// CStorPool contains the details of the cstor pool to be upgraded
	CStorPool *CStorPool `json:"cstorPool,omitempty"`
	// StoragePoolClaim contains the details of the storage pool claim to be upgraded
	StoragePoolClaim *StoragePoolClaim `json:"storagePoolClaim,omitempty"`
	// CStorPoolInstance contains the details of the cstor pool to be upgraded
	CStorPoolInstance *CStorPoolInstance `json:"cstorPoolInstance,omitempty"`
	// CStorPoolCluster contains the details of the storage pool claim to be upgraded
	CStorPoolCluster *CStorPoolCluster `json:"cstorPoolCluster,omitempty"`
}

ResourceSpec is the type of resource which is to be upgraded. Exactly one of its members must be set.

func (*ResourceSpec) DeepCopy

func (in *ResourceSpec) DeepCopy() *ResourceSpec

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

func (*ResourceSpec) DeepCopyInto

func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec)

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

type Status

type Status struct {
	// Phase indicates if the UpgradeStep is waiting, errored or completed.
	Phase StepPhase `json:"phase,omitempty"`
	// A human-readable message indicating details about why the upgradeStep
	// is in this state
	Message string `json:"message,omitempty"`
	// Reason is a brief CamelCase string that describes any failure and is meant
	// for machine parsing and tidy display in the CLI
	Reason string `json:"reason,omitempty"`
}

Status represents the state of the step performed during the upgrade.

func (*Status) DeepCopy

func (in *Status) DeepCopy() *Status

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

func (*Status) DeepCopyInto

func (in *Status) DeepCopyInto(out *Status)

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

type StepPhase

type StepPhase string

StepPhase defines the phase of a UpgradeStep

const (
	// StepWaiting - used for upgrade step that not yet complete
	StepWaiting StepPhase = "Waiting"
	// StepErrored - used for upgrade step that failed
	StepErrored StepPhase = "Errored"
	// StepCompleted - used for upgrade step that completed successfully
	StepCompleted StepPhase = "Completed"
)

type StoragePoolClaim

type StoragePoolClaim struct {
	// SPCName contains the name of the storage pool claim to be upgraded
	SPCName string `json:"spcName,omitempty"`
	// Options can be used to change the default behaviour of upgrade
	Options *ResourceOptions `json:"options,omitempty"`
}

StoragePoolClaim is the ResourceType for storage pool claim

func (*StoragePoolClaim) DeepCopy

func (in *StoragePoolClaim) DeepCopy() *StoragePoolClaim

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

func (*StoragePoolClaim) DeepCopyInto

func (in *StoragePoolClaim) DeepCopyInto(out *StoragePoolClaim)

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

type UpgradeDetailedStatuses

type UpgradeDetailedStatuses struct {
	Step UpgradeStep `json:"step,omitempty"`
	// StartTime of a UpgradeStep
	// +nullable
	StartTime metav1.Time `json:"startTime,omitempty"`
	// LastUpdatedTime of a UpgradeStep
	// +nullable
	LastUpdatedTime metav1.Time `json:"lastUpdatedAt,omitempty"`
	// Status of a UpgradeStep
	Status `json:",inline"`
}

UpgradeDetailedStatuses represents the latest available observations of a UpgradeTask current state.

func (*UpgradeDetailedStatuses) DeepCopy

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

func (*UpgradeDetailedStatuses) DeepCopyInto

func (in *UpgradeDetailedStatuses) DeepCopyInto(out *UpgradeDetailedStatuses)

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

type UpgradePhase

type UpgradePhase string

UpgradePhase defines phase of a UpgradeTask

const (
	// UpgradeStarted - used for Upgrades that are Started
	UpgradeStarted UpgradePhase = "Started"
	// UpgradeSuccess - used for Upgrades that are not available
	UpgradeSuccess UpgradePhase = "Success"
	// UpgradeError - used for Upgrades that Error for some reason
	UpgradeError UpgradePhase = "Error"
)

type UpgradeStep

type UpgradeStep string

UpgradeStep is the current step being performed for a particular resource upgrade

const (
	// PreUpgrade is the step to verify resource before upgrade
	PreUpgrade UpgradeStep = "PRE_UPGRADE"
	// TargetUpgrade is the step to upgrade Target depoyment of resource
	TargetUpgrade UpgradeStep = "TARGET_UPGRADE"
	// ReplicaUpgrade is the step to upgrade replica deployment of resource
	ReplicaUpgrade UpgradeStep = "REPLICA_UPGRADE"
	// Verify is the step to verify the upgrade
	Verify UpgradeStep = "VERIFY"
	// Rollback is the step to rollback to previous version if upgrade fails
	Rollback UpgradeStep = "ROLLBACK"
	// PoolInstanceUpgrade is the step to upgrade a pool (CSP or CSPI and it's deployment)
	PoolInstanceUpgrade UpgradeStep = "POOL_INSTANCE_UPGRADE"
)

type UpgradeTask

type UpgradeTask struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Spec i.e. specifications of the UpgradeTask
	Spec UpgradeTaskSpec `json:"spec"`
	// Status of UpgradeTask
	Status UpgradeTaskStatus `json:"status,omitempty"`
}

UpgradeTask represents an upgrade task

func (*UpgradeTask) DeepCopy

func (in *UpgradeTask) DeepCopy() *UpgradeTask

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

func (*UpgradeTask) DeepCopyInto

func (in *UpgradeTask) DeepCopyInto(out *UpgradeTask)

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

func (*UpgradeTask) DeepCopyObject

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

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

type UpgradeTaskList

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

	// Items are the list of upgrade task items
	Items []UpgradeTask `json:"items"`
}

UpgradeTaskList is a list of UpgradeTask resources

func (*UpgradeTaskList) DeepCopy

func (in *UpgradeTaskList) DeepCopy() *UpgradeTaskList

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

func (*UpgradeTaskList) DeepCopyInto

func (in *UpgradeTaskList) DeepCopyInto(out *UpgradeTaskList)

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

func (*UpgradeTaskList) DeepCopyObject

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

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

type UpgradeTaskSpec

type UpgradeTaskSpec struct {
	// FromVersion is the current version of the resource.
	FromVersion string `json:"fromVersion"`
	// ToVersion is the upgraded version of the resource. It should be same
	// as the version of control plane components version.
	ToVersion string `json:"toVersion"`
	// Options contains the optional flags that can be passed during upgrade.
	Options *Options `json:"options,omitempty"`
	// ResourceSpec contains the details of the resource that has to upgraded.
	ResourceSpec `json:",inline"`
	// ImagePrefix contains the url prefix of the image url. This field is
	// optional. If not present upgrade takes the previously present ImagePrefix.
	ImagePrefix string `json:"imagePrefix,omitempty"`
	// ImageTag contains the customized tag for ToVersion if any. This field is
	// optional. If not present upgrade takes the ToVersion as the ImageTag
	ImageTag string `json:"imageTag,omitempty"`
}

UpgradeTaskSpec is the properties of an upgrade task

func (*UpgradeTaskSpec) DeepCopy

func (in *UpgradeTaskSpec) DeepCopy() *UpgradeTaskSpec

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

func (*UpgradeTaskSpec) DeepCopyInto

func (in *UpgradeTaskSpec) DeepCopyInto(out *UpgradeTaskSpec)

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

type UpgradeTaskStatus

type UpgradeTaskStatus struct {
	// Phase indicates if a upgradeTask is started, success or errored
	Phase UpgradePhase `json:"phase,omitempty"`
	// StartTime of Upgrade
	// +nullable
	StartTime metav1.Time `json:"startTime,omitempty"`
	// CompletedTime of Upgrade
	// +nullable
	CompletedTime metav1.Time `json:"completedTime,omitempty"`
	// UpgradeDetailedStatuses contains the list of statuses of each step
	UpgradeDetailedStatuses []UpgradeDetailedStatuses `json:"upgradeDetailedStatuses,omitempty"`
	// Retries is the number of times the job attempted to upgrade the resource
	Retries int `json:"retries,omitempty"`
}

UpgradeTaskStatus provides status of a upgradeTask

func (*UpgradeTaskStatus) DeepCopy

func (in *UpgradeTaskStatus) DeepCopy() *UpgradeTaskStatus

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

func (*UpgradeTaskStatus) DeepCopyInto

func (in *UpgradeTaskStatus) DeepCopyInto(out *UpgradeTaskStatus)

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